From: Takashi Iwai Date: Mon, 6 Apr 2009 01:47:20 +0000 (+0200) Subject: Merge branch 'topic/asoc' into for-linus X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b114701c0e8d580a05643c874d87e2501ab729cb;hp=-c;p=linux-2.6-omap-h63xx.git Merge branch 'topic/asoc' into for-linus --- b114701c0e8d580a05643c874d87e2501ab729cb diff --combined sound/arm/pxa2xx-ac97-lib.c index 7793d2a511c,71bef45e9d3..0afd1a8226f --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c @@@ -21,6 -21,7 +21,6 @@@ #include #include -#include #include #include #include @@@ -238,6 -239,8 +238,8 @@@ static inline void pxa_ac97_cold_pxa3xx bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) { + unsigned long gsr; + #ifdef CONFIG_PXA25x if (cpu_is_pxa25x()) pxa_ac97_warm_pxa25x(); @@@ -254,10 -257,10 +256,10 @@@ else #endif BUG(); - - if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) { + gsr = GSR | gsr_bits; + if (!(gsr & (GSR_PCR | GSR_SCR))) { printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n", - __func__, gsr_bits); + __func__, gsr); return false; } @@@ -268,6 -271,8 +270,8 @@@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_ bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97) { + unsigned long gsr; + #ifdef CONFIG_PXA25x if (cpu_is_pxa25x()) pxa_ac97_cold_pxa25x(); @@@ -285,9 -290,10 +289,10 @@@ #endif BUG(); - if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) { + gsr = GSR | gsr_bits; + if (!(gsr & (GSR_PCR | GSR_SCR))) { printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n", - __func__, gsr_bits); + __func__, gsr); return false; } diff --combined sound/soc/pxa/pxa-ssp.c index 7acd3febf8b,c7c1996a544..308a657928d --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c @@@ -30,7 -30,7 +30,7 @@@ #include #include -#include +#include #include #include #include @@@ -627,12 -627,18 +627,18 @@@ static int pxa_ssp_hw_params(struct snd u32 sscr0; u32 sspsp; int width = snd_pcm_format_physical_width(params_format(params)); + int ttsa = ssp_read_reg(ssp, SSTSA) & 0xf; /* select correct DMA params */ if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) dma = 1; /* capture DMA offset is 1,3 */ - if (chn == 2) - dma += 2; /* stereo DMA offset is 2, mono is 0 */ + /* Network mode with one active slot (ttsa == 1) can be used + * to force 16-bit frame width on the wire (for S16_LE), even + * with two channels. Use 16-bit DMA transfers for this case. + */ + if (((chn == 2) && (ttsa != 1)) || (width == 32)) + dma += 2; /* 32-bit DMA offset is 2, 16-bit is 0 */ + cpu_dai->dma_data = ssp_dma_params[cpu_dai->id][dma]; dev_dbg(&ssp->pdev->dev, "pxa_ssp_hw_params: dma %d\n", dma); @@@ -712,7 -718,7 +718,7 @@@ /* When we use a network mode, we always require TDM slots * - complain loudly and fail if they've not been set up yet. */ - if ((sscr0 & SSCR0_MOD) && !(ssp_read_reg(ssp, SSTSA) & 0xf)) { + if ((sscr0 & SSCR0_MOD) && !ttsa) { dev_err(&ssp->pdev->dev, "No TDM timeslot configured\n"); return -EINVAL; }