diff options
author | Gabriel M. Beddingfield <gabrbedd@ti.com> | 2011-10-27 16:02:48 -0500 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:56:13 +0200 |
commit | 483505b696227d507f593289464ec913f11c9654 (patch) | |
tree | b1dcf1013e4c0debc2b87c2b5b4f4842ec04d580 /sound | |
parent | 62f928ef00b95d4540f0f91259b6869f225c97ea (diff) | |
download | kernel_samsung_tuna-483505b696227d507f593289464ec913f11c9654.zip kernel_samsung_tuna-483505b696227d507f593289464ec913f11c9654.tar.gz kernel_samsung_tuna-483505b696227d507f593289464ec913f11c9654.tar.bz2 |
ASoC: OMAP ABE: Restore defaults for DMA params
The static struct omap_abe_dai_dma_params is used to both set defaults
and serve as the omap_pcm_dma_data instance for the driver. In some
cases, the values in this struct are overridden to suit the end-use.
When these overrides happen, there was nothing to set them back to the
original default.
This fixes an issue where single-channel headset (AMic) recording
causes subsequent DMic recordings to be rendered at double-speed.
This happened because the the dma data_type was being set to
OMAP_DMA_DATA_TYPE_S16 in the static struct omap_abe_dai_dma_params.
After being set, the value was never restored to
OMAP_DMA_DATA_TYPE_S32 (needed by DMic recording).
Change-Id: Iea2b19d451edc10ab864ca6c1a2b6b3449b05bea
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/omap-abe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-abe.c b/sound/soc/omap/omap-abe.c index b05dfe8..943f9d6 100644 --- a/sound/soc/omap/omap-abe.c +++ b/sound/soc/omap/omap-abe.c @@ -1019,6 +1019,12 @@ static int omap_abe_dai_hw_params(struct snd_pcm_substream *substream, dma_data = &omap_abe_dai_dma_params[dai->id][substream->stream]; + /* Reset DMA info that may have been overridden */ + dma_data->port_addr = 0L; + dma_data->set_threshold = NULL; + dma_data->data_type = OMAP_DMA_DATA_TYPE_S32; + dma_data->packet_size = 0; + switch (params_channels(params)) { case 1: if (params_format(params) == SNDRV_PCM_FORMAT_S16_LE) { |