ASoC: arizona: Fix TDM slot length handling in arizona_hw_params
Subsystems (3)
PATCH 1/1 ASoC: arizona: Fix TDM slot length handling in arizona_hw_params
From: Nikesh Oswal <[email protected]>
TDM slot length was set same as word length, regardless of the value received in set_tdm_slot. This patch sets the TDM slot length correctly as received in set_tdm_slot DAI callback
Signed-off-by Nikesh Oswal <[email protected]>
Signed-off-by Charles Keepax <[email protected]>
--- sound/soc/codecs/arizona.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
sound/soc/codecs/arizona.c +4 -2
@@ -1278,6 +1278,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,else rates = &arizona_48k_bclk_rates[0 ]; + wl =snd_pcm_format_width (params_format (params)); +if (tdm_slots) {arizona_aif_dbg (dai,"Configuring for %d %d bit TDM slots\n" , tdm_slots, tdm_width);
@@ -1285,6 +1287,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream, channels = tdm_slots; }else { bclk_target =snd_soc_params_to_bclk (params); + tdm_width = wl; }if (chan_limit && chan_limit < channels) {
@@ -1319,8 +1322,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,arizona_aif_dbg (dai,"BCLK %dHz LRCLK %dHz\n" , rates[bclk], rates[bclk] / lrclk); - wl =snd_pcm_format_width (params_format (params)); - frame = wl <<ARIZONA_AIF1TX_WL_SHIFT | wl; + frame = wl <<ARIZONA_AIF1TX_WL_SHIFT | tdm_width; reconfig =arizona_aif_cfg_changed (codec, base, bclk, lrclk, frame);
Signature · 1 line
1.7.2.5
Quoted 5 lines · Charles Keepax
From: Nikesh Oswal <[email protected]>
TDM slot length was set same as word length, regardless of the value received in
set_tdm_slot. This patch sets the TDM slot length correctly as received inset_tdm_slotDAI callback
Applied, thanks.