ASoC: hdmi-codec: Update to modern DAI terminology
Subsystems (8)
Mark Brown
maintainerPATCH 1/1 ASoC: hdmi-codec: Update to modern DAI terminology
As part of retiring the old defines used to specify DAI formats update the hdmi_codec driver to use the modern names, including the variables in the struct hdmi_codec_daifmt exported to the DRM drivers.
In updating this I did note that the only use of this information in DRM drivers is to reject clock provider settings, thinking about what this hardware is doing I rather suspect that there might not be any hardware out there which needs the configuration so it may be worth considering just having hdmi-codec support only clock consumer.
--- drivers/gpu/drm/bridge/sii902x.c | 5 +++-- .../drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 8 ++++---- drivers/gpu/drm/i2c/tda998x_drv.c | 6 +++--- drivers/gpu/drm/sti/sti_hdmi.c | 8 ++++---- include/sound/hdmi-codec.h | 4 ++-- sound/soc/codecs/hdmi-codec.c | 18 +++++++++--------- 7 files changed, 26 insertions(+), 25 deletions(-)
drivers/gpu/drm/bridge/sii902x.c +3 -2
@@ -549,8 +549,9 @@ static int sii902x_audio_hw_params(struct device *dev, void *data,unsigned long mclk_rate;int i, ret; -if (daifmt->bit_clk_master || daifmt->frame_clk_master) { -dev_dbg (dev,"%s: I2S master mode not supported\n" , __func__); +if (daifmt->bit_clk_provider || daifmt->frame_clk_provider) { +dev_dbg (dev,"%s: I2S clock provider mode not supported\n" , + __func__);return -EINVAL ; }
drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c +1 -1
@@ -45,7 +45,7 @@ static int dw_hdmi_i2s_hw_params(struct device *dev, void *data,u8 inputclkfs =0 ;/* it cares I2S only */ -if (fmt->bit_clk_master | fmt->frame_clk_master) { +if (fmt->bit_clk_provider | fmt->frame_clk_provider) {dev_err (dev,"unsupported clock settings\n" );return -EINVAL ; }
drivers/gpu/drm/exynos/exynos_hdmi.c +4 -4
@@ -1594,12 +1594,12 @@ static int hdmi_audio_hw_params(struct device *dev, void *data,struct hdmi_context *hdata =dev_get_drvdata (dev);if (daifmt->fmt !=HDMI_I2S || daifmt->bit_clk_inv || - daifmt->frame_clk_inv || daifmt->bit_clk_master || - daifmt->frame_clk_master) { + daifmt->frame_clk_inv || daifmt->bit_clk_provider || + daifmt->frame_clk_provider) {dev_err (dev,"%s: Bad flags %d %d %d %d\n" , __func__, daifmt->bit_clk_inv, daifmt->frame_clk_inv, - daifmt->bit_clk_master, - daifmt->frame_clk_master); + daifmt->bit_clk_provider, + daifmt->frame_clk_provider);return -EINVAL ; }
drivers/gpu/drm/i2c/tda998x_drv.c +3 -3
@@ -1095,11 +1095,11 @@ static int tda998x_audio_hw_params(struct device *dev, void *data,if (!spdif && (daifmt->bit_clk_inv || daifmt->frame_clk_inv || - daifmt->bit_clk_master || daifmt->frame_clk_master)) { + daifmt->bit_clk_provider || daifmt->frame_clk_provider)) {dev_err (dev,"%s: Bad flags %d %d %d %d\n" , __func__, daifmt->bit_clk_inv, daifmt->frame_clk_inv, - daifmt->bit_clk_master, - daifmt->frame_clk_master); + daifmt->bit_clk_provider, + daifmt->frame_clk_provider);return -EINVAL ; }
drivers/gpu/drm/sti/sti_hdmi.c +4 -4
@@ -1175,12 +1175,12 @@ static int hdmi_audio_hw_params(struct device *dev,DRM_DEBUG_DRIVER ("\n" );if ((daifmt->fmt !=HDMI_I2S ) || daifmt->bit_clk_inv || - daifmt->frame_clk_inv || daifmt->bit_clk_master || - daifmt->frame_clk_master) { + daifmt->frame_clk_inv || daifmt->bit_clk_providre || + daifmt->frame_clk_provider) {dev_err (dev,"%s: Bad flags %d %d %d %d\n" , __func__, daifmt->bit_clk_inv, daifmt->frame_clk_inv, - daifmt->bit_clk_master, - daifmt->frame_clk_master); + daifmt->bit_clk_provider, + daifmt->frame_clk_provider);return -EINVAL ; }
include/sound/hdmi-codec.h +2 -2
@@ -32,8 +32,8 @@ struct hdmi_codec_daifmt { } fmt; unsigned int bit_clk_inv:1; unsigned int frame_clk_inv:1; - unsigned int bit_clk_master:1; - unsigned int frame_clk_master:1; + unsigned int bit_clk_provider:1; + unsigned int frame_clk_provider:1;/* bit_fmt could be standard PCM format or * IEC958 encoded format. ALSA IEC958 plugin will pass * IEC958_SUBFRAME format to the underneath driver.
sound/soc/codecs/hdmi-codec.c +9 -9
@@ -606,18 +606,18 @@ static int hdmi_codec_i2s_set_fmt(struct snd_soc_dai *dai,/* Reset daifmt */ memset (cf,0 ,sizeof (*cf)); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : - cf->bit_clk_master =1 ; - cf->frame_clk_master =1 ; +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : + cf->bit_clk_provider =1 ; + cf->frame_clk_provider =1 ;break ; -case SND_SOC_DAIFMT_CBS_CFM : - cf->frame_clk_master =1 ; +case SND_SOC_DAIFMT_CBC_CFP : + cf->frame_clk_provider =1 ;break ; -case SND_SOC_DAIFMT_CBM_CFS : - cf->bit_clk_master =1 ; +case SND_SOC_DAIFMT_CBP_CFC : + cf->bit_clk_provider =1 ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_CBC_CFC :break ;default :return -EINVAL ;
Signature · 1 line
2.30.2
Mark Brown
maintainerQuoted 11 lines · Mark Brown
As part of retiring the old defines used to specify DAI formats update the
hdmi_codecdriver to use the modern names, including the variables in the structhdmi_codec_daifmtexported to the DRM drivers.In updating this I did note that the only use of this information in DRM drivers is to reject clock provider settings, thinking about what this hardware is doing I rather suspect that there might not be any hardware out there which needs the configuration so it may be worth considering just having hdmi-codec support only clock consumer.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: hdmi-codec: Update to modern DAI terminology
commit: 9f1c8677724a0e6a6ac7a74d2b0192a584df859d
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