[PATCH 1/2] ASoC: sun8i-codec: Partial revert to fix clock specifiers
Recent updates accidentally updated the clock producer/consumer specifiers on this device as part of refactoring the CPU side of the DAI links. However, this device sits on the CODEC side and shouldn't have been updated. Partially revert the changes keeping the switch to the new clock terminology but going back to the CODEC defines.
Fixes: 7cc3965fde74 ("ASoC: sunxi: Update to use set_fmt_new callback") Reported-by: Samuel Holland samuel@sholland.org Signed-off-by: Charles Keepax ckeepax@opensource.cirrus.com --- sound/soc/sunxi/sun8i-codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index 90d74a2d53f38..f797c535f2983 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -287,10 +287,10 @@ static int sun8i_codec_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
/* clock masters */ switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { - case SND_SOC_DAIFMT_BP_FP: /* Codec slave, DAI master */ + case SND_SOC_DAIFMT_CBC_CFC: /* Codec slave, DAI master */ value = 0x1; break; - case SND_SOC_DAIFMT_BC_FC: /* Codec Master, DAI slave */ + case SND_SOC_DAIFMT_CBP_CFP: /* Codec Master, DAI slave */ value = 0x0; break; default:
Update this driver to the new direct clock producer/consumer defines. It appears this driver was added with the inversion taken account of but still uses the CODEC defines so no inversion of the producer/consumer is necessary.
Signed-off-by: Charles Keepax ckeepax@opensource.cirrus.com ---
Note this patch is completely untested, I don't have hardware and the mt8186 doesn't seem to be included in any makefiles at the moment so I can't build test either. But the change is trivial and I am pretty confident I have read the code correctly. It would be good if someone from Mediatek could have a quick look over though.
Thanks, Charles
sound/soc/mediatek/mt8186/mt8186-dai-tdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8186/mt8186-dai-tdm.c b/sound/soc/mediatek/mt8186/mt8186-dai-tdm.c index dfff209b60da4..c6ead7c252f01 100644 --- a/sound/soc/mediatek/mt8186/mt8186-dai-tdm.c +++ b/sound/soc/mediatek/mt8186/mt8186-dai-tdm.c @@ -585,10 +585,10 @@ static int mtk_dai_tdm_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) }
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { - case SND_SOC_DAIFMT_CBP_CFP: + case SND_SOC_DAIFMT_BP_FP: tdm_priv->slave_mode = false; break; - case SND_SOC_DAIFMT_CBC_CFC: + case SND_SOC_DAIFMT_BC_FC: tdm_priv->slave_mode = true; break; default:
Hi Charles,
On 6/13/22 11:15 AM, Charles Keepax wrote:
Recent updates accidentally updated the clock producer/consumer specifiers on this device as part of refactoring the CPU side of the DAI links. However, this device sits on the CODEC side and shouldn't have been updated. Partially revert the changes keeping the switch to the new clock terminology but going back to the CODEC defines.
Fixes: 7cc3965fde74 ("ASoC: sunxi: Update to use set_fmt_new callback") Reported-by: Samuel Holland samuel@sholland.org Signed-off-by: Charles Keepax ckeepax@opensource.cirrus.com
Reviewed-by: Samuel Holland samuel@sholland.org Tested-by: Samuel Holland samuel@sholland.org
Thanks for the quick follow-up, and sorry for the confusion my earlier comment caused. I verified that sound is broken (loud static) on a Pine A64-LTS board with for-next, and is fixed by this patch.
Regards, Samuel
On Tue, Jun 14, 2022 at 01:39:20AM -0500, Samuel Holland wrote:
Hi Charles,
On 6/13/22 11:15 AM, Charles Keepax wrote:
Recent updates accidentally updated the clock producer/consumer specifiers on this device as part of refactoring the CPU side of the DAI links. However, this device sits on the CODEC side and shouldn't have been updated. Partially revert the changes keeping the switch to the new clock terminology but going back to the CODEC defines.
Fixes: 7cc3965fde74 ("ASoC: sunxi: Update to use set_fmt_new callback") Reported-by: Samuel Holland samuel@sholland.org Signed-off-by: Charles Keepax ckeepax@opensource.cirrus.com
Reviewed-by: Samuel Holland samuel@sholland.org Tested-by: Samuel Holland samuel@sholland.org
Thanks for the quick follow-up, and sorry for the confusion my earlier comment caused. I verified that sound is broken (loud static) on a Pine A64-LTS board with for-next, and is fixed by this patch.
Not at all man, thank you for spotting my foolish mistake. Glad we got it fixed up for you, and thank you for testing it.
Thanks, Charles
On Mon, 13 Jun 2022 17:15:51 +0100, Charles Keepax wrote:
Recent updates accidentally updated the clock producer/consumer specifiers on this device as part of refactoring the CPU side of the DAI links. However, this device sits on the CODEC side and shouldn't have been updated. Partially revert the changes keeping the switch to the new clock terminology but going back to the CODEC defines.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: sun8i-codec: Partial revert to fix clock specifiers commit: beb89d1d49e9ae1188356d6e37581e5f0b5f62b4 [2/2] ASoC: mediatek: mt8186: Use new direct clock defines commit: 845a215558647acd4290dd773b9c0de62c123335
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (3)
-
Charles Keepax
-
Mark Brown
-
Samuel Holland