summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-04-16 07:58:21 -0400
committerMark Brown <broonie@kernel.org>2018-04-16 07:58:21 -0400
commit953de782cccf7a84e8a20cea72aea2a056fea3bf (patch)
treedfe61f7d4b7addd15ac6ce7978a4bb632f5bf626 /sound/soc/fsl
parent3fd391fb7c97ab6dfb9e44926a265566d1d1ab79 (diff)
parentd0f8b9c5a350ca6fa842b52bfb88b77b34ee485b (diff)
Merge branch 'asoc-4.17' into asoc-4.18 to get adau17x1 changes so
further patches can be applied.
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/fsl_esai.c7
-rw-r--r--sound/soc/fsl/fsl_ssi.c14
2 files changed, 18 insertions, 3 deletions
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 40a700493f4c..da8fd98c7f51 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -144,6 +144,13 @@ static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio,
144 144
145 psr = ratio <= 256 * maxfp ? ESAI_xCCR_xPSR_BYPASS : ESAI_xCCR_xPSR_DIV8; 145 psr = ratio <= 256 * maxfp ? ESAI_xCCR_xPSR_BYPASS : ESAI_xCCR_xPSR_DIV8;
146 146
147 /* Do not loop-search if PM (1 ~ 256) alone can serve the ratio */
148 if (ratio <= 256) {
149 pm = ratio;
150 fp = 1;
151 goto out;
152 }
153
147 /* Set the max fluctuation -- 0.1% of the max devisor */ 154 /* Set the max fluctuation -- 0.1% of the max devisor */
148 savesub = (psr ? 1 : 8) * 256 * maxfp / 1000; 155 savesub = (psr ? 1 : 8) * 256 * maxfp / 1000;
149 156
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 0823b08923b5..89df2d9f63d7 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -217,6 +217,7 @@ struct fsl_ssi_soc_data {
217 * @dai_fmt: DAI configuration this device is currently used with 217 * @dai_fmt: DAI configuration this device is currently used with
218 * @streams: Mask of current active streams: BIT(TX) and BIT(RX) 218 * @streams: Mask of current active streams: BIT(TX) and BIT(RX)
219 * @i2s_net: I2S and Network mode configurations of SCR register 219 * @i2s_net: I2S and Network mode configurations of SCR register
220 * (this is the initial settings based on the DAI format)
220 * @synchronous: Use synchronous mode - both of TX and RX use STCK and SFCK 221 * @synchronous: Use synchronous mode - both of TX and RX use STCK and SFCK
221 * @use_dma: DMA is used or FIQ with stream filter 222 * @use_dma: DMA is used or FIQ with stream filter
222 * @use_dual_fifo: DMA with support for dual FIFO mode 223 * @use_dual_fifo: DMA with support for dual FIFO mode
@@ -829,16 +830,23 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream,
829 } 830 }
830 831
831 if (!fsl_ssi_is_ac97(ssi)) { 832 if (!fsl_ssi_is_ac97(ssi)) {
833 /*
834 * Keep the ssi->i2s_net intact while having a local variable
835 * to override settings for special use cases. Otherwise, the
836 * ssi->i2s_net will lose the settings for regular use cases.
837 */
838 u8 i2s_net = ssi->i2s_net;
839
832 /* Normal + Network mode to send 16-bit data in 32-bit frames */ 840 /* Normal + Network mode to send 16-bit data in 32-bit frames */
833 if (fsl_ssi_is_i2s_cbm_cfs(ssi) && sample_size == 16) 841 if (fsl_ssi_is_i2s_cbm_cfs(ssi) && sample_size == 16)
834 ssi->i2s_net = SSI_SCR_I2S_MODE_NORMAL | SSI_SCR_NET; 842 i2s_net = SSI_SCR_I2S_MODE_NORMAL | SSI_SCR_NET;
835 843
836 /* Use Normal mode to send mono data at 1st slot of 2 slots */ 844 /* Use Normal mode to send mono data at 1st slot of 2 slots */
837 if (channels == 1) 845 if (channels == 1)
838 ssi->i2s_net = SSI_SCR_I2S_MODE_NORMAL; 846 i2s_net = SSI_SCR_I2S_MODE_NORMAL;
839 847
840 regmap_update_bits(regs, REG_SSI_SCR, 848 regmap_update_bits(regs, REG_SSI_SCR,
841 SSI_SCR_I2S_NET_MASK, ssi->i2s_net); 849 SSI_SCR_I2S_NET_MASK, i2s_net);
842 } 850 }
843 851
844 /* In synchronous mode, the SSI uses STCCR for capture */ 852 /* In synchronous mode, the SSI uses STCCR for capture */