[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>
This commit is contained in:

committed by
Jaroslav Kysela

parent
42dfd0adab
commit
67ed4161f6
@@ -2440,7 +2440,7 @@ static int __devinit cs46xx_detect_codec(cs46xx_t *chip, int codec)
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
int __devinit snd_cs46xx_mixer(cs46xx_t *chip)
|
||||
int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device)
|
||||
{
|
||||
snd_card_t *card = chip->card;
|
||||
snd_ctl_elem_id_t id;
|
||||
@@ -2476,6 +2476,8 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip)
|
||||
for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) {
|
||||
snd_kcontrol_t *kctl;
|
||||
kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip);
|
||||
if (kctl && kctl->id.iface == SNDRV_CTL_ELEM_IFACE_PCM)
|
||||
kctl->id.device = spdif_device;
|
||||
if ((err = snd_ctl_add(card, kctl)) < 0)
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user