Commit 7b32486c authored by Raymond Yau's avatar Raymond Yau Committed by Takashi Iwai

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: default avatarRaymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ffe535ed
...@@ -268,6 +268,11 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) ...@@ -268,6 +268,11 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
card->shortname, chip->io, chip->irq); card->shortname, chip->io, chip->irq);
// (4) Alloc components. // (4) Alloc components.
err = snd_vortex_mixer(chip);
if (err < 0) {
snd_card_free(card);
return err;
}
// ADB pcm. // ADB pcm.
if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) { if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) {
snd_card_free(card); snd_card_free(card);
...@@ -299,11 +304,6 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) ...@@ -299,11 +304,6 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
return err; return err;
} }
#endif #endif
// snd_ac97_mixer and Vortex mixer.
if ((err = snd_vortex_mixer(chip)) < 0) {
snd_card_free(card);
return err;
}
if ((err = snd_vortex_midi(chip)) < 0) { if ((err = snd_vortex_midi(chip)) < 0) {
snd_card_free(card); snd_card_free(card);
return err; return err;
......
...@@ -168,6 +168,7 @@ static int snd_vortex_pcm_open(struct snd_pcm_substream *substream) ...@@ -168,6 +168,7 @@ static int snd_vortex_pcm_open(struct snd_pcm_substream *substream)
runtime->hw = snd_vortex_playback_hw_adb; runtime->hw = snd_vortex_playback_hw_adb;
#ifdef CHIP_AU8830 #ifdef CHIP_AU8830
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
VORTEX_IS_QUAD(vortex) &&
VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) {
runtime->hw.channels_max = 4; runtime->hw.channels_max = 4;
snd_pcm_hw_constraint_list(runtime, 0, snd_pcm_hw_constraint_list(runtime, 0,
......
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