From 483505b696227d507f593289464ec913f11c9654 Mon Sep 17 00:00:00 2001 From: "Gabriel M. Beddingfield" Date: Thu, 27 Oct 2011 16:02:48 -0500 Subject: 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 --- sound/soc/omap/omap-abe.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sound/soc') 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) { -- cgit v1.1