diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-07-02 11:48:31 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-07-02 11:48:31 -0400 |
| commit | dc8a4f3fc3c32954c9fd46cb027b959380be2d65 (patch) | |
| tree | 71899d9d8fddbd5ef528067da06933c51d2da164 | |
| parent | 9ea5ca75a2aebb7172094a7d77acf6ff7600cc56 (diff) | |
| parent | da9ff1f796e81976935407251815838bef9868d4 (diff) | |
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
| -rw-r--r-- | sound/soc/fsl/Kconfig | 6 | ||||
| -rw-r--r-- | sound/soc/omap/omap-pcm.c | 11 | ||||
| -rw-r--r-- | sound/soc/pxa/pxa2xx-i2s.c | 7 |
3 files changed, 16 insertions, 8 deletions
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index 5dbebf82249c..8cb65ccad35f 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig | |||
| @@ -33,7 +33,7 @@ config SND_SOC_MPC5200_I2S | |||
| 33 | config SND_SOC_MPC5200_AC97 | 33 | config SND_SOC_MPC5200_AC97 |
| 34 | tristate "Freescale MPC5200 PSC in AC97 mode driver" | 34 | tristate "Freescale MPC5200 PSC in AC97 mode driver" |
| 35 | depends on PPC_MPC52xx && PPC_BESTCOMM | 35 | depends on PPC_MPC52xx && PPC_BESTCOMM |
| 36 | select AC97_BUS | 36 | select SND_SOC_AC97_BUS |
| 37 | select SND_MPC52xx_DMA | 37 | select SND_MPC52xx_DMA |
| 38 | select PPC_BESTCOMM_GEN_BD | 38 | select PPC_BESTCOMM_GEN_BD |
| 39 | help | 39 | help |
| @@ -41,7 +41,7 @@ config SND_SOC_MPC5200_AC97 | |||
| 41 | 41 | ||
| 42 | config SND_MPC52xx_SOC_PCM030 | 42 | config SND_MPC52xx_SOC_PCM030 |
| 43 | tristate "SoC AC97 Audio support for Phytec pcm030 and WM9712" | 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 | select SND_SOC_MPC5200_AC97 | 45 | select SND_SOC_MPC5200_AC97 |
| 46 | select SND_SOC_WM9712 | 46 | select SND_SOC_WM9712 |
| 47 | help | 47 | help |
| @@ -50,7 +50,7 @@ config SND_MPC52xx_SOC_PCM030 | |||
| 50 | 50 | ||
| 51 | config SND_MPC52xx_SOC_EFIKA | 51 | config SND_MPC52xx_SOC_EFIKA |
| 52 | tristate "SoC AC97 Audio support for bbplan Efika and STAC9766" | 52 | tristate "SoC AC97 Audio support for bbplan Efika and STAC9766" |
| 53 | depends on PPC_EFIKA && BROKEN | 53 | depends on PPC_EFIKA |
| 54 | select SND_SOC_MPC5200_AC97 | 54 | select SND_SOC_MPC5200_AC97 |
| 55 | select SND_SOC_STAC9766 | 55 | select SND_SOC_STAC9766 |
| 56 | help | 56 | help |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 6454e15f7d28..84a1950880eb 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
| @@ -216,12 +216,15 @@ static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream) | |||
| 216 | dma_addr_t ptr; | 216 | dma_addr_t ptr; |
| 217 | snd_pcm_uframes_t offset; | 217 | snd_pcm_uframes_t offset; |
| 218 | 218 | ||
| 219 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 219 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
| 220 | ptr = omap_get_dma_src_pos(prtd->dma_ch); | ||
| 221 | else | ||
| 222 | ptr = omap_get_dma_dst_pos(prtd->dma_ch); | 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 | if (offset >= runtime->buffer_size) | 228 | if (offset >= runtime->buffer_size) |
| 226 | offset = 0; | 229 | offset = 0; |
| 227 | 230 | ||
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 4743e262895d..6b8f655d1ad8 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c | |||
| @@ -167,6 +167,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
| 167 | 167 | ||
| 168 | BUG_ON(IS_ERR(clk_i2s)); | 168 | BUG_ON(IS_ERR(clk_i2s)); |
| 169 | clk_enable(clk_i2s); | 169 | clk_enable(clk_i2s); |
| 170 | dai->private_data = dai; | ||
| 170 | pxa_i2s_wait(); | 171 | pxa_i2s_wait(); |
| 171 | 172 | ||
| 172 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 173 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
| @@ -255,7 +256,10 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream, | |||
| 255 | if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) { | 256 | if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) { |
| 256 | SACR0 &= ~SACR0_ENB; | 257 | SACR0 &= ~SACR0_ENB; |
| 257 | pxa_i2s_wait(); | 258 | pxa_i2s_wait(); |
| 258 | clk_disable(clk_i2s); | 259 | if (dai->private_data != NULL) { |
| 260 | clk_disable(clk_i2s); | ||
| 261 | dai->private_data = NULL; | ||
| 262 | } | ||
| 259 | } | 263 | } |
| 260 | } | 264 | } |
| 261 | 265 | ||
| @@ -336,6 +340,7 @@ static int pxa2xx_i2s_probe(struct platform_device *dev) | |||
| 336 | return PTR_ERR(clk_i2s); | 340 | return PTR_ERR(clk_i2s); |
| 337 | 341 | ||
| 338 | pxa_i2s_dai.dev = &dev->dev; | 342 | pxa_i2s_dai.dev = &dev->dev; |
| 343 | pxa_i2s_dai.private_data = NULL; | ||
| 339 | ret = snd_soc_register_dai(&pxa_i2s_dai); | 344 | ret = snd_soc_register_dai(&pxa_i2s_dai); |
| 340 | if (ret != 0) | 345 | if (ret != 0) |
| 341 | clk_put(clk_i2s); | 346 | clk_put(clk_i2s); |
