mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 01:20:01 -04:00
ASoC: rockchip: Update to use set_fmt_new callback
As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Link: https://lore.kernel.org/r/20220519154318.2153729-19-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
1148e16b33
commit
27646d265d
@@ -199,13 +199,13 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
|
||||
pm_runtime_get_sync(cpu_dai->dev);
|
||||
mask = I2S_CKR_MSS_MASK;
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
|
||||
case SND_SOC_DAIFMT_BP_FP:
|
||||
/* Set source clock in Master mode */
|
||||
val = I2S_CKR_MSS_MASTER;
|
||||
i2s->is_master_mode = true;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_BC_FC:
|
||||
val = I2S_CKR_MSS_SLAVE;
|
||||
i2s->is_master_mode = false;
|
||||
break;
|
||||
@@ -486,7 +486,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_dai_ops = {
|
||||
.hw_params = rockchip_i2s_hw_params,
|
||||
.set_bclk_ratio = rockchip_i2s_set_bclk_ratio,
|
||||
.set_sysclk = rockchip_i2s_set_sysclk,
|
||||
.set_fmt = rockchip_i2s_set_fmt,
|
||||
.set_fmt_new = rockchip_i2s_set_fmt,
|
||||
.trigger = rockchip_i2s_trigger,
|
||||
};
|
||||
|
||||
|
||||
@@ -411,12 +411,12 @@ static int rockchip_i2s_tdm_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
}
|
||||
|
||||
mask = I2S_CKR_MSS_MASK;
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
|
||||
case SND_SOC_DAIFMT_BP_FP:
|
||||
val = I2S_CKR_MSS_MASTER;
|
||||
i2s_tdm->is_master_mode = true;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
case SND_SOC_DAIFMT_BC_FC:
|
||||
val = I2S_CKR_MSS_SLAVE;
|
||||
i2s_tdm->is_master_mode = false;
|
||||
break;
|
||||
@@ -1113,7 +1113,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_tdm_dai_ops = {
|
||||
.hw_params = rockchip_i2s_tdm_hw_params,
|
||||
.set_bclk_ratio = rockchip_i2s_tdm_set_bclk_ratio,
|
||||
.set_sysclk = rockchip_i2s_tdm_set_sysclk,
|
||||
.set_fmt = rockchip_i2s_tdm_set_fmt,
|
||||
.set_fmt_new = rockchip_i2s_tdm_set_fmt,
|
||||
.set_tdm_slot = rockchip_dai_tdm_slot,
|
||||
.trigger = rockchip_i2s_tdm_trigger,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user