-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alsactl: 90-alsa-restore.rules - add support for AMD ACP digital micr…
…ophone The UCM configuration for AMD ACP digital microphones combines HDA analog card with ASoC AMD ACP digital microphone card. When the ACP microphone card is detected later than HDA analog card, the UCM initialization for HDA analog card should be executed again. Additional changes: Added --with-alsactl-udev-extra-test argument to handle the tests for directories. The default value was kept. Added --alsactl-udev-args argument to pass extra arguments to alsactl in the udev rule. Note: The autoconf does not handle correctly spaces so configure call like 'configure --alsactl-udev-args="-E ENV=abcd"' is not allowed. Substitue '__' string as ' ' for this reason. Example: configure --with-alsactl-udev-args="-E__ENV=abcd" \ --with-alsactl-udev-extra-test='TEST=="/abcd",__TEST=="/xyz",' Closes: #278 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
- Loading branch information
Showing
3 changed files
with
42 additions
and
3 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 |
---|---|---|
@@ -1,8 +1,28 @@ | ||
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST=="@sbindir@", TEST=="@mydatadir@", GOTO="alsa_restore_go" | ||
# do not edit this file, it will be overwritten on update | ||
|
||
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*",@extratest@ GOTO="alsa_restore_go" | ||
GOTO="alsa_restore_end" | ||
|
||
ENV{ALSA_CARD_NUMBER}="$attr{device/number}" | ||
|
||
# mark HDA analog card; HDMI/DP card does not have capture devices | ||
DRIVERS=="snd_hda_intel", TEST=="device/pcmC$env{ALSA_CARD_NUMBER}D0p", RUN+="/bin/sh -c 'echo ALSA_CARD_HDA_ANALOG=$env{ALSA_CARD_NUMBER} >> /run/udev/alsa-hda-analog-card'" | ||
|
||
# check for ACP hardware | ||
TEST=="device/device/acp3x-dmic-capture", GOTO="alsa_hda_analog" | ||
TEST=="device/device/acp6x-dmic-capture", GOTO="alsa_hda_analog" | ||
TEST=="device/device/acp63-dmic-capture", GOTO="alsa_hda_analog" | ||
TEST=="device/device/acp-pdm-dmic", GOTO="alsa_hda_analog" | ||
GOTO="alsa_restore_std" | ||
|
||
LABEL="alsa_hda_analog" | ||
# restore configuration for profile with combined cards (HDA + digital mic) | ||
TEST!="/run/udev/alsa-hda-analog-card", GOTO="alsa_restore_std" | ||
IMPORT{program}="/usr/bin/cat /run/udev/alsa-hda-analog-card" | ||
ENV{ALSA_CARD_HDA_ANALOG}!="", ENV{ALSA_CARD_NUMBER}="$env{ALSA_CARD_HDA_ANALOG}" | ||
|
||
LABEL="alsa_restore_go" | ||
TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $devnode" | ||
TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $devnode" | ||
TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl@args@ restore $env{ALSA_CARD_NUMBER}" | ||
TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl@args@ nrestore $env{ALSA_CARD_NUMBER}" | ||
|
||
LABEL="alsa_restore_end" |
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
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