Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b9c789c authored by Vangala, Amarnath's avatar Vangala, Amarnath Committed by Gerrit - the friendly Code Review server
Browse files

ASOC: Sampling rate fix for for WSA_CDC_DMA_TX_0.



 Removed hardcoding of sampling rate for WSA_CDC_DMA_TX_0.
 Updated the Sampling rate in the cdc_dmx_tx_cfg table.

Change-Id: Ie9a611fbcc364ded53f3c8c668a8acdb40e16327
Signed-off-by: default avatarVangala, Amarnath <avangala@codeaurora.org>
parent 1038df1f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -647,7 +647,7 @@ static struct dev_config cdc_dma_rx_cfg[] = {

/* Default configuration of Codec DMA Interface TX */
static struct dev_config cdc_dma_tx_cfg[] = {
	[WSA_CDC_DMA_TX_0] = {SAMPLING_RATE_48KHZ, SNDRV_PCM_FORMAT_S16_LE, 2},
	[WSA_CDC_DMA_TX_0] = {SAMPLING_RATE_8KHZ, SNDRV_PCM_FORMAT_S16_LE, 2},
	[WSA_CDC_DMA_TX_1] = {SAMPLING_RATE_48KHZ, SNDRV_PCM_FORMAT_S16_LE, 2},
	[WSA_CDC_DMA_TX_2] = {SAMPLING_RATE_48KHZ, SNDRV_PCM_FORMAT_S16_LE, 2},
	[TX_CDC_DMA_TX_0] = {SAMPLING_RATE_48KHZ, SNDRV_PCM_FORMAT_S16_LE, 2},
@@ -4430,9 +4430,10 @@ static int msm_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
		break;

	case MSM_BACKEND_DAI_WSA_CDC_DMA_TX_0:
		idx = msm_cdc_dma_get_idx_from_beid(dai_link->id);
		param_set_mask(params, SNDRV_PCM_HW_PARAM_FORMAT,
				SNDRV_PCM_FORMAT_S32_LE);
		rate->min = rate->max = SAMPLING_RATE_8KHZ;
		rate->min = rate->max = cdc_dma_tx_cfg[idx].sample_rate;
		channels->min = channels->max = msm_vi_feed_tx_ch;
		break;