Commit 36c4dc42 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Skip ac97 SPDIF controls

CA0106 driver
Skip building ac97 SPDIF controls via AC97_SCAP_NO_SPDIF.
Clean up the code.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c3010982
...@@ -810,6 +810,7 @@ static int snd_ca0106_ac97(ca0106_t *chip) ...@@ -810,6 +810,7 @@ static int snd_ca0106_ac97(ca0106_t *chip)
memset(&ac97, 0, sizeof(ac97)); memset(&ac97, 0, sizeof(ac97));
ac97.private_data = chip; ac97.private_data = chip;
ac97.scaps = AC97_SCAP_NO_SPDIF;
return snd_ac97_mixer(pbus, &ac97, &chip->ac97); return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
} }
......
...@@ -620,11 +620,6 @@ int __devinit snd_ca0106_mixer(ca0106_t *emu) ...@@ -620,11 +620,6 @@ int __devinit snd_ca0106_mixer(ca0106_t *emu)
return -ENOMEM; return -ENOMEM;
if ((err = snd_ctl_add(card, kctl))) if ((err = snd_ctl_add(card, kctl)))
return err; return err;
if ((kctl = ctl_find(card, SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT))) != NULL) {
/* already defined by ac97, remove it */
/* FIXME: or do we need both controls? */
remove_ctl(card, SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT));
}
if ((kctl = snd_ctl_new1(&snd_ca0106_spdif_control, emu)) == NULL) if ((kctl = snd_ctl_new1(&snd_ca0106_spdif_control, emu)) == NULL)
return -ENOMEM; return -ENOMEM;
if ((err = snd_ctl_add(card, kctl))) if ((err = snd_ctl_add(card, kctl)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment