aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/arizona.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/arizona.c')
-rw-r--r--sound/soc/codecs/arizona.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index bd41ee4da078..2c71f16bd661 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1278,6 +1278,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
1278 else 1278 else
1279 rates = &arizona_48k_bclk_rates[0]; 1279 rates = &arizona_48k_bclk_rates[0];
1280 1280
1281 wl = snd_pcm_format_width(params_format(params));
1282
1281 if (tdm_slots) { 1283 if (tdm_slots) {
1282 arizona_aif_dbg(dai, "Configuring for %d %d bit TDM slots\n", 1284 arizona_aif_dbg(dai, "Configuring for %d %d bit TDM slots\n",
1283 tdm_slots, tdm_width); 1285 tdm_slots, tdm_width);
@@ -1285,6 +1287,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
1285 channels = tdm_slots; 1287 channels = tdm_slots;
1286 } else { 1288 } else {
1287 bclk_target = snd_soc_params_to_bclk(params); 1289 bclk_target = snd_soc_params_to_bclk(params);
1290 tdm_width = wl;
1288 } 1291 }
1289 1292
1290 if (chan_limit && chan_limit < channels) { 1293 if (chan_limit && chan_limit < channels) {
@@ -1319,8 +1322,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
1319 arizona_aif_dbg(dai, "BCLK %dHz LRCLK %dHz\n", 1322 arizona_aif_dbg(dai, "BCLK %dHz LRCLK %dHz\n",
1320 rates[bclk], rates[bclk] / lrclk); 1323 rates[bclk], rates[bclk] / lrclk);
1321 1324
1322 wl = snd_pcm_format_width(params_format(params)); 1325 frame = wl << ARIZONA_AIF1TX_WL_SHIFT | tdm_width;
1323 frame = wl << ARIZONA_AIF1TX_WL_SHIFT | wl;
1324 1326
1325 reconfig = arizona_aif_cfg_changed(codec, base, bclk, lrclk, frame); 1327 reconfig = arizona_aif_cfg_changed(codec, base, bclk, lrclk, frame);
1326 1328