aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Yau <superquad.vortex2@gmail.com>2012-01-05 20:19:29 -0500
committerTakashi Iwai <tiwai@suse.de>2012-01-08 08:38:42 -0500
commit3ae4e1f7a0dab95f7e6049272cdb59c7bdc34365 (patch)
treed6766423086eb992162fd6d5bb9fef9a765d29a2
parent76474da05ff7b1729b36cd2b6d7aa6b1865d68f1 (diff)
ALSA: Au88x0 - Fix IRQ fifo error and channels swap of 4 channels playback
Fix IRQ fifo error when playing stereo by set stereo flag of fifo control. This also fix the swap of front and rear channels on au8830. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/au88x0/au88x0_core.c8
-rw-r--r--sound/pci/au88x0/au88x0_pcm.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
index 489150380eac..d49e2c5ecb75 100644
--- a/sound/pci/au88x0/au88x0_core.c
+++ b/sound/pci/au88x0/au88x0_core.c
@@ -805,7 +805,7 @@ static void vortex_fifo_setadbvalid(vortex_t * vortex, int fifo, int en)
805} 805}
806 806
807static void 807static void
808vortex_fifo_setadbctrl(vortex_t * vortex, int fifo, int b, int priority, 808vortex_fifo_setadbctrl(vortex_t * vortex, int fifo, int stereo, int priority,
809 int empty, int valid, int f) 809 int empty, int valid, int f)
810{ 810{
811 int temp, lifeboat = 0; 811 int temp, lifeboat = 0;
@@ -837,7 +837,7 @@ vortex_fifo_setadbctrl(vortex_t * vortex, int fifo, int b, int priority,
837#else 837#else
838 temp = (this_4 & 0x3f) << 0xc; 838 temp = (this_4 & 0x3f) << 0xc;
839#endif 839#endif
840 temp = (temp & 0xfffffffd) | ((b & 1) << 1); 840 temp = (temp & 0xfffffffd) | ((stereo & 1) << 1);
841 temp = (temp & 0xfffffff3) | ((priority & 3) << 2); 841 temp = (temp & 0xfffffff3) | ((priority & 3) << 2);
842 temp = (temp & 0xffffffef) | ((valid & 1) << 4); 842 temp = (temp & 0xffffffef) | ((valid & 1) << 4);
843 temp |= FIFO_U1; 843 temp |= FIFO_U1;
@@ -1148,11 +1148,11 @@ vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma,
1148 1148
1149static void 1149static void
1150vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, int dir, 1150vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, int dir,
1151 int fmt, int d, u32 offset) 1151 int fmt, int stereo, u32 offset)
1152{ 1152{
1153 stream_t *dma = &vortex->dma_adb[adbdma]; 1153 stream_t *dma = &vortex->dma_adb[adbdma];
1154 1154
1155 dma->dma_unknown = d; 1155 dma->dma_unknown = stereo;
1156 dma->dma_ctrl = 1156 dma->dma_ctrl =
1157 ((offset & OFFSET_MASK) | (dma->dma_ctrl & ~OFFSET_MASK)); 1157 ((offset & OFFSET_MASK) | (dma->dma_ctrl & ~OFFSET_MASK));
1158 /* Enable PCMOUT interrupts. */ 1158 /* Enable PCMOUT interrupts. */
diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
index c5f7ae46afef..509969038ac5 100644
--- a/sound/pci/au88x0/au88x0_pcm.c
+++ b/sound/pci/au88x0/au88x0_pcm.c
@@ -307,8 +307,8 @@ static int snd_vortex_pcm_prepare(struct snd_pcm_substream *substream)
307 fmt = vortex_alsafmt_aspfmt(runtime->format); 307 fmt = vortex_alsafmt_aspfmt(runtime->format);
308 spin_lock_irq(&chip->lock); 308 spin_lock_irq(&chip->lock);
309 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { 309 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
310 vortex_adbdma_setmode(chip, dma, 1, dir, fmt, 0 /*? */ , 310 vortex_adbdma_setmode(chip, dma, 1, dir, fmt,
311 0); 311 runtime->channels == 1 ? 0 : 1, 0);
312 vortex_adbdma_setstartbuffer(chip, dma, 0); 312 vortex_adbdma_setstartbuffer(chip, dma, 0);
313 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_SPDIF) 313 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_SPDIF)
314 vortex_adb_setsrc(chip, dma, runtime->rate, dir); 314 vortex_adb_setsrc(chip, dma, runtime->rate, dir);