aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs46xx
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-07-29 09:32:58 -0400
committerJaroslav Kysela <perex@suse.cz>2005-08-30 02:43:22 -0400
commit67ed4161f60d76b3b27efc085b36357a6a90768c (patch)
treed69bd70f968a1e439d8b9a43ff8d4b60eb3c8bdf /sound/pci/cs46xx
parent42dfd0adab83c95890e562623264999914771763 (diff)
[ALSA] sound - fix .iface field of mixer control elements
Documentation,CS46xx driver,EMU10K1/EMU10K2 driver,AD1848 driver SB16/AWE driver,CMIPCI driver,ENS1370/1+ driver,RME32 driver RME96 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver RME HDSP driver,RME9652 driver This patch changes .iface to SNDRV_CTL_ELEM_IFACE_MIXER whre _PCM or _HWDEP was used in controls that are not associated with a specific PCM (sub)stream or hwdep device, and changes some controls that got inconsitent .iface values due to copy+paste errors. Furthermore, it makes sure that all control that do use _PCM or _HWDEP use the correct number in the .device field. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/pci/cs46xx')
-rw-r--r--sound/pci/cs46xx/cs46xx.c2
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c
index db212ecd792..b9fff4ee6f9 100644
--- a/sound/pci/cs46xx/cs46xx.c
+++ b/sound/pci/cs46xx/cs46xx.c
@@ -113,7 +113,7 @@ static int __devinit snd_card_cs46xx_probe(struct pci_dev *pci,
113 return err; 113 return err;
114 } 114 }
115#endif 115#endif
116 if ((err = snd_cs46xx_mixer(chip)) < 0) { 116 if ((err = snd_cs46xx_mixer(chip, 2)) < 0) {
117 snd_card_free(card); 117 snd_card_free(card);
118 return err; 118 return err;
119 } 119 }
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index ff28af1f658..1546aec02ea 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -2440,7 +2440,7 @@ static int __devinit cs46xx_detect_codec(cs46xx_t *chip, int codec)
2440 return -ENXIO; 2440 return -ENXIO;
2441} 2441}
2442 2442
2443int __devinit snd_cs46xx_mixer(cs46xx_t *chip) 2443int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device)
2444{ 2444{
2445 snd_card_t *card = chip->card; 2445 snd_card_t *card = chip->card;
2446 snd_ctl_elem_id_t id; 2446 snd_ctl_elem_id_t id;
@@ -2476,6 +2476,8 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip)
2476 for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) { 2476 for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) {
2477 snd_kcontrol_t *kctl; 2477 snd_kcontrol_t *kctl;
2478 kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip); 2478 kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip);
2479 if (kctl && kctl->id.iface == SNDRV_CTL_ELEM_IFACE_PCM)
2480 kctl->id.device = spdif_device;
2479 if ((err = snd_ctl_add(card, kctl)) < 0) 2481 if ((err = snd_ctl_add(card, kctl)) < 0)
2480 return err; 2482 return err;
2481 } 2483 }