aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2005-01-04 18:25:23 +0100
committerJaroslav Kysela <perex@suse.cz>2005-01-04 18:25:23 +0100
commitd76a94ae182795c000feaa78f656b2b50482f6fd (patch)
treed0f726b5dbb77122a61e3c487dda4cadeed759fc /sound
parentb0e6d116a44f071f3e97ea2c245c801759e63369 (diff)
downloadhistory-d76a94ae182795c000feaa78f656b2b50482f6fd.tar.gz
[ALSA] Add codec id in component names
AC97 Codec Core Added codec id number to the component names. The component becomes like 'AC97a:12345678'. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/ac97/ac97_codec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index f541806a204038..fd970b1ef9e0d0 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -2051,6 +2051,7 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
snd_ac97_get_name(ac97, ac97->id, name, !ac97_is_audio(ac97));
snd_ac97_get_name(NULL, ac97->id, name, !ac97_is_audio(ac97)); // ac97->id might be changed in the special setup code
if (ac97_is_audio(ac97)) {
+ char comp[16];
if (card->mixername[0] == '\0') {
strcpy(card->mixername, name);
} else {
@@ -2059,7 +2060,8 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
strcat(card->mixername, name);
}
}
- if ((err = snd_component_add(card, "AC97a")) < 0) {
+ sprintf(comp, "AC97a:%08x", ac97->id);
+ if ((err = snd_component_add(card, comp)) < 0) {
snd_ac97_free(ac97);
return err;
}
@@ -2069,6 +2071,7 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
}
}
if (ac97_is_modem(ac97)) {
+ char comp[16];
if (card->mixername[0] == '\0') {
strcpy(card->mixername, name);
} else {
@@ -2077,7 +2080,8 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
strcat(card->mixername, name);
}
}
- if ((err = snd_component_add(card, "AC97m")) < 0) {
+ sprintf(comp, "AC97m:%08x", ac97->id);
+ if ((err = snd_component_add(card, comp)) < 0) {
snd_ac97_free(ac97);
return err;
}