Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ucm2: add initial alsa library helpers
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Manage directory for the card specific configuration | ||
# | ||
|
||
Define.LibDir "/var/lib/alsa/card${CardNumber}.conf.d" | ||
|
||
FixedBootSequence [ | ||
exec "/bin/rm -rf ${var:LibDir}/" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
perexg
Author
Member
|
||
exec "/bin/mkdir -p -m 0755 ${var:LibDir}" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# This is generic UCM configuration for alsa-lib | ||
# Only hw devices are exposed to the UCM application | ||
# Users are not allowed to overwrite this configuration | ||
# | ||
|
||
LibraryConfig.generic.SubstiConfig { | ||
|
||
ctl.hw { | ||
@args [ CARD ] | ||
@args.CARD.type string | ||
type hw | ||
card $CARD | ||
} | ||
|
||
pcm.hw { | ||
@args [ CARD DEV SUBDEV ] | ||
@args { | ||
CARD.type string | ||
DEV.type integer | ||
SUBDEV.type integer | ||
} | ||
type hw | ||
card $CARD | ||
device $DEV | ||
subdevice $SUBDEV | ||
} | ||
|
||
} |
@perexg Such trailing slashes always creep me out. If for whatever reason
${var:LibDir}
expands to an empty string, this would call/bin/rm -rf /
and only--no-preserve-root
would be there to save us. Would this work without trailing/
, too? And does it need-f
?