aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-10-22 11:15:47 -0400
committerTakashi Iwai <tiwai@suse.de>2010-10-22 11:15:47 -0400
commit62b7e5e09bcb854ff05e6ee1aa161f8283dc36ee (patch)
tree2e1c90dca82b9c45963b485da0fb6d2cc3fbde47 /sound/pci/hda/hda_intel.c
parenta74ccea51d4314632a81d568d59bf885e5b09d93 (diff)
ALSA: hda - Add workarounds for CT-IBG controllers
Creative IBG controllers require the playback stream-tags to be started from 1, instead of capture+1. Otherwise the stream stalls. Reported-by: Wai Yew CHAY <wychay@ctl.creative.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index ee445bc6e810..21aa9b0e28f6 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1652,7 +1652,7 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
1652 struct azx_dev *azx_dev = get_azx_dev(substream); 1652 struct azx_dev *azx_dev = get_azx_dev(substream);
1653 struct hda_pcm_stream *hinfo = apcm->hinfo[substream->stream]; 1653 struct hda_pcm_stream *hinfo = apcm->hinfo[substream->stream];
1654 struct snd_pcm_runtime *runtime = substream->runtime; 1654 struct snd_pcm_runtime *runtime = substream->runtime;
1655 unsigned int bufsize, period_bytes, format_val; 1655 unsigned int bufsize, period_bytes, format_val, stream_tag;
1656 int err; 1656 int err;
1657 1657
1658 azx_stream_reset(chip, azx_dev); 1658 azx_stream_reset(chip, azx_dev);
@@ -1694,7 +1694,12 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
1694 else 1694 else
1695 azx_dev->fifo_size = 0; 1695 azx_dev->fifo_size = 0;
1696 1696
1697 return snd_hda_codec_prepare(apcm->codec, hinfo, azx_dev->stream_tag, 1697 stream_tag = azx_dev->stream_tag;
1698 /* CA-IBG chips need the playback stream starting from 1 */
1699 if (chip->driver_type == AZX_DRIVER_CTX &&
1700 stream_tag > chip->capture_streams)
1701 stream_tag -= chip->capture_streams;
1702 return snd_hda_codec_prepare(apcm->codec, hinfo, stream_tag,
1698 azx_dev->format_val, substream); 1703 azx_dev->format_val, substream);
1699} 1704}
1700 1705