Merge branch 'fix/asoc' into for-linus

* fix/asoc:
ASoC: Only disable pxa2xx-i2s clocks if we enabled them
ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
ASoC: remove BROKEN from Efika and pcm030 fabric drivers
ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig

+16 -8
+3 -3
sound/soc/fsl/Kconfig
··· 33 33 config SND_SOC_MPC5200_AC97 34 34 tristate "Freescale MPC5200 PSC in AC97 mode driver" 35 35 depends on PPC_MPC52xx && PPC_BESTCOMM 36 - select AC97_BUS 36 + select SND_SOC_AC97_BUS 37 37 select SND_MPC52xx_DMA 38 38 select PPC_BESTCOMM_GEN_BD 39 39 help ··· 41 41 42 42 config SND_MPC52xx_SOC_PCM030 43 43 tristate "SoC AC97 Audio support for Phytec pcm030 and WM9712" 44 - depends on PPC_MPC5200_SIMPLE && BROKEN 44 + depends on PPC_MPC5200_SIMPLE 45 45 select SND_SOC_MPC5200_AC97 46 46 select SND_SOC_WM9712 47 47 help ··· 50 50 51 51 config SND_MPC52xx_SOC_EFIKA 52 52 tristate "SoC AC97 Audio support for bbplan Efika and STAC9766" 53 - depends on PPC_EFIKA && BROKEN 53 + depends on PPC_EFIKA 54 54 select SND_SOC_MPC5200_AC97 55 55 select SND_SOC_STAC9766 56 56 help
+7 -4
sound/soc/omap/omap-pcm.c
··· 216 216 dma_addr_t ptr; 217 217 snd_pcm_uframes_t offset; 218 218 219 - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 220 - ptr = omap_get_dma_src_pos(prtd->dma_ch); 221 - else 219 + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { 222 220 ptr = omap_get_dma_dst_pos(prtd->dma_ch); 221 + offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); 222 + } else if (!(cpu_is_omap1510())) { 223 + ptr = omap_get_dma_src_pos(prtd->dma_ch); 224 + offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); 225 + } else 226 + offset = prtd->period_index * runtime->period_size; 223 227 224 - offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); 225 228 if (offset >= runtime->buffer_size) 226 229 offset = 0; 227 230
+6 -1
sound/soc/pxa/pxa2xx-i2s.c
··· 167 167 168 168 BUG_ON(IS_ERR(clk_i2s)); 169 169 clk_enable(clk_i2s); 170 + dai->private_data = dai; 170 171 pxa_i2s_wait(); 171 172 172 173 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ··· 256 255 if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) { 257 256 SACR0 &= ~SACR0_ENB; 258 257 pxa_i2s_wait(); 259 - clk_disable(clk_i2s); 258 + if (dai->private_data != NULL) { 259 + clk_disable(clk_i2s); 260 + dai->private_data = NULL; 261 + } 260 262 } 261 263 } 262 264 ··· 340 336 return PTR_ERR(clk_i2s); 341 337 342 338 pxa_i2s_dai.dev = &dev->dev; 339 + pxa_i2s_dai.private_data = NULL; 343 340 ret = snd_soc_register_dai(&pxa_i2s_dai); 344 341 if (ret != 0) 345 342 clk_put(clk_i2s);