aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/au88x0
diff options
context:
space:
mode:
authorRaymond Yau <superquad.vortex2@gmail.com>2012-01-12 21:30:08 -0500
committerTakashi Iwai <tiwai@suse.de>2012-01-16 06:16:34 -0500
commit7b32486ca449a20d64fa381262cc5e56893f0ac1 (patch)
treee4cade4011a76062492344e5d05cc7095eccfa7e /sound/pci/au88x0
parentffe535edb9a9c5b4d5fe03dfa3d89a1495580f1b (diff)
ALSA: Au88x0 - Support 4 channels playback when AC97 codecs has SDAC bit
- Check SDAC bit of AC97 codec for supporting 4 channels playback. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/au88x0')
-rw-r--r--sound/pci/au88x0/au88x0.c10
-rw-r--r--sound/pci/au88x0/au88x0_pcm.c1
2 files changed, 6 insertions, 5 deletions
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 762bb108c51c..b8bc11556ed0 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -268,6 +268,11 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
268 card->shortname, chip->io, chip->irq); 268 card->shortname, chip->io, chip->irq);
269 269
270 // (4) Alloc components. 270 // (4) Alloc components.
271 err = snd_vortex_mixer(chip);
272 if (err < 0) {
273 snd_card_free(card);
274 return err;
275 }
271 // ADB pcm. 276 // ADB pcm.
272 if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) { 277 if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) {
273 snd_card_free(card); 278 snd_card_free(card);
@@ -299,11 +304,6 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
299 return err; 304 return err;
300 } 305 }
301#endif 306#endif
302 // snd_ac97_mixer and Vortex mixer.
303 if ((err = snd_vortex_mixer(chip)) < 0) {
304 snd_card_free(card);
305 return err;
306 }
307 if ((err = snd_vortex_midi(chip)) < 0) { 307 if ((err = snd_vortex_midi(chip)) < 0) {
308 snd_card_free(card); 308 snd_card_free(card);
309 return err; 309 return err;
diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
index 0488633ea874..0ef2f9712208 100644
--- a/sound/pci/au88x0/au88x0_pcm.c
+++ b/sound/pci/au88x0/au88x0_pcm.c
@@ -168,6 +168,7 @@ static int snd_vortex_pcm_open(struct snd_pcm_substream *substream)
168 runtime->hw = snd_vortex_playback_hw_adb; 168 runtime->hw = snd_vortex_playback_hw_adb;
169#ifdef CHIP_AU8830 169#ifdef CHIP_AU8830
170 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && 170 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
171 VORTEX_IS_QUAD(vortex) &&
171 VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { 172 VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) {
172 runtime->hw.channels_max = 4; 173 runtime->hw.channels_max = 4;
173 snd_pcm_hw_constraint_list(runtime, 0, 174 snd_pcm_hw_constraint_list(runtime, 0,