ASoC: DAI clocking terminology modernisation
Subsystems (3)
Mark Brown
maintainercover ASoC: DAI clocking terminology modernisation
Update the last batch of CODEC drivers without specific maintainers to use the new defines for DAI clocking.
Mark Brown (20):
ASoC: cx2072x: Use modern ASoC DAI format terminology
ASoC: max98090: Use modern ASoC DAI format terminology
ASoC: rk3328: Use modern ASoC DAI format terminology
ASoC: sta32x: Use modern ASoC DAI format terminology
ASoC: sta350: Use modern ASoC DAI format terminology
ASoC: sti-sas: Use modern ASoC DAI format terminology
ASoC: tas2552: Use modern ASoC DAI format terminology
ASoC: tas2770: Use modern ASoC DAI format terminology
ASoC: tas5086: Use modern ASoC DAI format terminology
ASoC: tas5720: Use modern ASoC DAI format terminology
ASoC: tas6424: Use modern ASoC DAI format terminology
ASoC: uda1334: Use modern ASoC DAI format terminology
ASoC: tlv320adc3xxx: Use modern ASoC DAI format terminology
ASoC: tlv320adcx140: Use modern ASoC DAI format terminology
ASoC: tlv320aic23: Use modern ASoC DAI format terminology
ASoC: tlv320aic26: Use modern ASoC DAI format terminology
ASoC: tlv320aic31xx: Use modern ASoC DAI format terminology
ASoC: tlv320aic32x4: Use modern ASoC DAI format terminology
ASoC: tlv320aic33: Use modern ASoC DAI format terminology
ASoC: tlv320dac3x: Use modern ASoC DAI format terminology
sound/soc/codecs/cx2072x.c | 17 +++++++---------- sound/soc/codecs/max98090.c | 12 +++++------- sound/soc/codecs/rk3328_codec.c | 6 +++--- sound/soc/codecs/sta32x.c | 4 ++-- sound/soc/codecs/sta350.c | 4 ++-- sound/soc/codecs/sti-sas.c | 6 +++--- sound/soc/codecs/tas2552.c | 10 +++++----- sound/soc/codecs/tas2770.c | 6 +++--- sound/soc/codecs/tas5086.c | 2 +- sound/soc/codecs/tas5720.c | 4 ++-- sound/soc/codecs/tas6424.c | 6 +++--- sound/soc/codecs/tlv320adc3xxx.c | 3 +-- sound/soc/codecs/tlv320adcx140.c | 10 ++++------ sound/soc/codecs/tlv320aic23.c | 7 +++---- sound/soc/codecs/tlv320aic26.c | 13 ++++++------- sound/soc/codecs/tlv320aic31xx.c | 19 +++++++++---------- sound/soc/codecs/tlv320aic32x4.c | 9 ++++----- sound/soc/codecs/tlv320aic3x.c | 11 +++++------ sound/soc/codecs/tlv320dac33.c | 12 +++++------- sound/soc/codecs/uda1334.c | 2 +- 20 files changed, 74 insertions(+), 89 deletions(-)
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 1/20 ASoC: cx2072x: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update the cx2072x driver to use more modern terminology for clocking.
--- sound/soc/codecs/cx2072x.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
sound/soc/codecs/cx2072x.c +7 -10
@@ -710,22 +710,19 @@ static int cx2072x_config_i2spcm(struct cx2072x_priv *cx2072x) regdbt2.ulval =0xac ; -/* set master/slave */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : reg2.r.tx_master =1 ; reg3.r.rx_master =1 ; -dev_dbg (dev,"Sets Master mode\n" );break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_CBC_CFC : reg2.r.tx_master =0 ; reg3.r.rx_master =0 ; -dev_dbg (dev,"Sets Slave mode\n" );break ;default : -dev_err (dev,"Unsupported DAI master mode\n" ); +dev_err (dev,"Unsupported DAI clocking mode\n" );return -EINVAL ; }
@@ -1009,9 +1006,9 @@ static int cx2072x_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)dev_dbg (dev,"set_dai_fmt- %08x\n" , fmt);/* set master/slave */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_CBC_CFC :break ;default :
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 2/20 ASoC: max98090: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the max98090 driver to use more modern terminology for clocking.
--- sound/soc/codecs/max98090.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
sound/soc/codecs/max98090.c +5 -7
@@ -1591,9 +1591,9 @@ static int max98090_dai_set_fmt(struct snd_soc_dai *codec_dai, cdata->fmt = fmt; regval =0 ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : -/* Set to slave mode PLL - MAS mode off */ +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBC_CFC : +/* Set to consumer mode PLL - MAS mode off */ snd_soc_component_write (component,M98090_REG_CLOCK_RATIO_NI_MSB ,0x00 ); snd_soc_component_write(component,
@@ -1602,8 +1602,8 @@ static int max98090_dai_set_fmt(struct snd_soc_dai *codec_dai, M98090_USE_M1_MASK, 0); max98090->master = false;break ; -case SND_SOC_DAIFMT_CBM_CFM : -/* Set to master mode */ +case SND_SOC_DAIFMT_CBP_CFP : +/* Set to provider mode */ if (max98090->tdm_slots ==4 ) {/* TDM */ regval |= M98090_MAS_MASK |
@@ -1619,8 +1619,6 @@ static int max98090_dai_set_fmt(struct snd_soc_dai *codec_dai, } max98090->master = true;break ; -case SND_SOC_DAIFMT_CBS_CFM : -case SND_SOC_DAIFMT_CBM_CFS :default :dev_err (component->dev,"DAI clock mode unsupported" );return -EINVAL ;
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 3/20 ASoC: rk3328: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the rk3328 driver to use more modern terminology for clocking.
--- sound/soc/codecs/rk3328_codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rk3328_codec.c +3 -3
@@ -69,11 +69,11 @@ static int rk3328_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)snd_soc_component_get_drvdata (dai->component);unsigned int val; -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_CBC_CFC : val =PIN_DIRECTION_IN |DAC_I2S_MODE_SLAVE ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_CBP_CFP : val =PIN_DIRECTION_OUT |DAC_I2S_MODE_MASTER ;break ;default :
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 4/20 ASoC: sta32x: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the sta32x driver to use more modern terminology for clocking.
--- sound/soc/codecs/sta32x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/sta32x.c +2 -2
@@ -601,8 +601,8 @@ static int sta32x_set_dai_fmt(struct snd_soc_dai *codec_dai,struct sta32x_priv *sta32x =snd_soc_component_get_drvdata (component);u8 confb =0 ; -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_CBC_CFC :break ;default :return -EINVAL ;
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 5/20 ASoC: sta350: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the sta350 driver to use more modern terminology for clocking.
--- sound/soc/codecs/sta350.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/sta350.c +2 -2
@@ -630,8 +630,8 @@ static int sta350_set_dai_fmt(struct snd_soc_dai *codec_dai,struct sta350_priv *sta350 =snd_soc_component_get_drvdata (component);unsigned int confb =0 ; -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_CBC_CFC :break ;default :return -EINVAL ;
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 6/20 ASoC: sti-sas: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the sti-sas driver to use more modern terminology for clocking.
--- sound/soc/codecs/sti-sas.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/sti-sas.c +3 -3
@@ -199,10 +199,10 @@ static int stih407_sas_dac_mute(struct snd_soc_dai *dai, int mute, int stream)static int sti_sas_spdif_set_fmt (struct snd_soc_dai *dai,unsigned int fmt) { -if ((fmt &SND_SOC_DAIFMT_MASTER_MASK ) !=SND_SOC_DAIFMT_CBS_CFS ) { +if ((fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) !=SND_SOC_DAIFMT_CBC_CFC ) {dev_err (dai->component->dev, -"%s: ERROR: Unsupporter master mask 0x%x\n" , - __func__, fmt &SND_SOC_DAIFMT_MASTER_MASK ); +"%s: ERROR: Unsupported clocking mask 0x%x\n" , + __func__, fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK );return -EINVAL ; }
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 7/20 ASoC: tas2552: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tas2552 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tas2552.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/codecs/tas2552.c +5 -5
@@ -347,17 +347,17 @@ static int tas2552_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)struct tas2552_data *tas2552 =dev_get_drvdata (component->dev);u8 serial_format; -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_CBC_CFC : serial_format =0x00 ;break ; -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_CBC_CFP : serial_format =TAS2552_WCLKDIR ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_CBP_CFC : serial_format =TAS2552_BCLKDIR ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_CBP_CFP : serial_format = (TAS2552_BCLKDIR |TAS2552_WCLKDIR );break ;default :
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 8/20 ASoC: tas2770: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tas2770 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tas2770.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/tas2770.c +3 -3
@@ -340,11 +340,11 @@ static int tas2770_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)u8 tdm_rx_start_slot =0 , asi_cfg_1 =0 ;int ret; -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_CBC_CFC :break ;default : -dev_err (tas2770->dev,"ASI format master is not found\n" ); +dev_err (tas2770->dev,"ASI invalid DAI clocking\n" );return -EINVAL ; }
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 9/20 ASoC: tas5086: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tas5086 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tas5086.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tas5086.c +1 -1
@@ -318,7 +318,7 @@ static int tas5086_set_dai_fmt(struct snd_soc_dai *codec_dai,struct tas5086_private *priv =snd_soc_component_get_drvdata (component);/* The TAS5086 can only be slave to all clocks */ -if ((format &SND_SOC_DAIFMT_MASTER_MASK ) !=SND_SOC_DAIFMT_CBS_CFS ) { +if ((format &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) !=SND_SOC_DAIFMT_CBC_CFC ) {dev_err (component->dev,"Invalid clocking mode\n" );return -EINVAL ; }
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 10/20 ASoC: tas5720: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tas5720 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tas5720.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/tas5720.c +2 -2
@@ -89,8 +89,8 @@ static int tas5720_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)u8 serial_format;int ret; -if ((fmt &SND_SOC_DAIFMT_MASTER_MASK ) !=SND_SOC_DAIFMT_CBS_CFS ) { -dev_vdbg (component->dev,"DAI Format master is not found\n" ); +if ((fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) !=SND_SOC_DAIFMT_CBC_CFC ) { +dev_vdbg (component->dev,"DAI clocking invalid\n" );return -EINVAL ; }
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 11/20 ASoC: tas6424: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tas6424 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tas6424.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/tas6424.c +3 -3
@@ -160,11 +160,11 @@ static int tas6424_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)dev_dbg (component->dev,"%s() fmt=0x%0x\n" , __func__, fmt);/* clock masters */ -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_CBC_CFC :break ;default : -dev_err (component->dev,"Invalid DAI master/slave interface\n" ); +dev_err (component->dev,"Invalid DAI clocking\n" );return -EINVAL ; }
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 12/20 ASoC: uda1334: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the uda1334 driver to use more modern terminology for clocking.
--- sound/soc/codecs/uda1334.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/uda1334.c +1 -1
@@ -169,7 +169,7 @@ static int uda1334_set_dai_sysclk(struct snd_soc_dai *codec_dai,static int uda1334_set_fmt (struct snd_soc_dai *codec_dai,unsigned int fmt) { fmt &= (SND_SOC_DAIFMT_FORMAT_MASK |SND_SOC_DAIFMT_INV_MASK | -SND_SOC_DAIFMT_MASTER_MASK ); +SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK );if (fmt != (SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBC_CFC )) {
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 13/20 ASoC: tlv320adc3xxx: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tlv320aic3xxx driver to use more modern terminology for clocking.
--- sound/soc/codecs/tlv320adc3xxx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/codecs/tlv320adc3xxx.c +1 -2
@@ -1255,8 +1255,7 @@ static int adc3xxx_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)int master =0 ;int ret; -/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) {case SND_SOC_DAIFMT_CBP_CFP : master =1 ; clkdir =ADC3XXX_BCLK_MASTER |ADC3XXX_WCLK_MASTER ;
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 14/20 ASoC: tlv320adcx140: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tlv320adcx140 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tlv320adcx140.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
sound/soc/codecs/tlv320adcx140.c +4 -6
@@ -713,16 +713,14 @@ static int adcx140_set_dai_fmt(struct snd_soc_dai *codec_dai,bool inverted_bclk = false;/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : iface_reg2 |=ADCX140_BCLK_FSYNC_MASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_CBC_CFC :break ; -case SND_SOC_DAIFMT_CBS_CFM : -case SND_SOC_DAIFMT_CBM_CFS :default : -dev_err (component->dev,"Invalid DAI master/slave interface\n" ); +dev_err (component->dev,"Invalid DAI clock provider\n" );return -EINVAL ; }
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 15/20 ASoC: tlv320aic23: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tlv320aic23 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tlv320aic23.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/tlv320aic23.c +3 -4
@@ -429,12 +429,11 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai, iface_reg =snd_soc_component_read (component,TLV320AIC23_DIGT_FMT ) & (~0x03 ); -/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt & SND_SOC_DAIFMT_CLOCk_PROVIDER_MASK) { +case SND_SOC_DAIFMT_CBP_CFP : iface_reg |=TLV320AIC23_MS_MASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_CBC_CFC : iface_reg &= ~TLV320AIC23_MS_MASTER ;break ;default :
Signature · 1 line
2.30.2
kernel test robot
build botRe: [PATCH 15/20] ASoC: tlv320aic23: Use modern ASoC DAI format terminology
I love your patch! Yet something to improve:
Hi Mark,
I love your patch! Yet something to improve:
[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on v5.18 next-20220602]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Mark-Brown/ASoC-DAI-clocking-terminology-modernisation/20220602-220124 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: i386-randconfig-a006 (https://download.01.org/0day-ci/archive/20220603/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b364c76683f8ef241025a9556300778c07b590c2)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/3ef04fe7b323f8132d917a0f3b54ff93e003db5c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Mark-Brown/ASoC-DAI-clocking-terminology-modernisation/20220602-220124 git checkout 3ef04fe7b323f8132d917a0f3b54ff93e003db5c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash sound/soc/codecs/
If you fix the issue, kindly add following tag where applicable
All errors (new ones prefixed by >>):
>> sound/soc/codecs/tlv320aic23.c:432:16: error: use of undeclared identifier 'SND_SOC_DAIFMT_CLOCk_PROVIDER_MASK'
switch (fmt & SND_SOC_DAIFMT_CLOCk_PROVIDER_MASK) {
^1 error generated.
vim +/SND_SOC_DAIFMT_CLOCk_PROVIDER_MASK +432 sound/soc/codecs/tlv320aic23.c
423
424 static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai,
425 unsigned int fmt)
426 {
427 struct snd_soc_component *component = codec_dai->component;
428 u16 iface_reg;
429
430 iface_reg = snd_soc_component_read(component, TLV320AIC23_DIGT_FMT) & (~0x03);
431
> 432 switch (fmt & SND_SOC_DAIFMT_CLOCk_PROVIDER_MASK) { 433 case SND_SOC_DAIFMT_CBP_CFP:
434 iface_reg |= TLV320AIC23_MS_MASTER;
435 break;
436 case SND_SOC_DAIFMT_CBC_CFC:
437 iface_reg &= ~TLV320AIC23_MS_MASTER;
438 break;
439 default:
440 return -EINVAL;
441
442 }
443
444 /* interface format */
445 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
446 case SND_SOC_DAIFMT_I2S:
447 iface_reg |= TLV320AIC23_FOR_I2S;
448 break;
449 case SND_SOC_DAIFMT_DSP_A:
450 iface_reg |= TLV320AIC23_LRP_ON;
451 fallthrough;
452 case SND_SOC_DAIFMT_DSP_B:
453 iface_reg |= TLV320AIC23_FOR_DSP;
454 break;
455 case SND_SOC_DAIFMT_RIGHT_J:
456 break;
457 case SND_SOC_DAIFMT_LEFT_J:
458 iface_reg |= TLV320AIC23_FOR_LJUST;
459 break;
460 default:
461 return -EINVAL;
462
463 }
464
465 snd_soc_component_write(component, TLV320AIC23_DIGT_FMT, iface_reg);
466
467 return 0;
468 }
469
Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp
Mark Brown
maintainerPATCH 16/20 ASoC: tlv320aic26: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tlv320aic26 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tlv320aic26.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
sound/soc/codecs/tlv320aic26.c +6 -7
@@ -32,7 +32,7 @@ struct aic26 {struct spi_device *spi;struct regmap *regmap;struct snd_soc_component *component; -int master; +int clock_provider;int datfm;int mclk;
@@ -117,8 +117,8 @@ static int aic26_hw_params(struct snd_pcm_substream *substream, reg = dval <<2 ;snd_soc_component_write (component,AIC26_REG_PLL_PROG2 , reg); -/* Audio Control 3 (master mode, fsref rate) */ -if (aic26->master) +/* Audio Control 3 (clock provider mode, fsref rate) */ +if (aic26->clock_provider) reg =0x0800 ;if (fsref ==48000 ) reg =0x2000 ;
@@ -178,10 +178,9 @@ static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)dev_dbg (&aic26->spi->dev,"aic26_set_fmt(dai=%p, fmt==%i)\n" , codec_dai, fmt); -/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : aic26->master =1 ;break ; -case SND_SOC_DAIFMT_CBS_CFS : aic26->master =0 ;break ; +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : aic26->clock_provider =1 ;break ; +case SND_SOC_DAIFMT_CBC_CFC : aic26->clock_provider =0 ;break ;default :dev_dbg (&aic26->spi->dev,"bad master\n" );return -EINVAL ; }
Signature · 1 line
2.30.2
kernel test robot
build botRe: [PATCH 16/20] ASoC: tlv320aic26: Use modern ASoC DAI format terminology
I love your patch! Yet something to improve:
Hi Mark,
I love your patch! Yet something to improve:
[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on v5.18 next-20220603]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Mark-Brown/ASoC-DAI-clocking-terminology-modernisation/20220602-220124 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: hexagon-randconfig-r034-20220531 (https://download.01.org/0day-ci/archive/20220603/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b364c76683f8ef241025a9556300778c07b590c2)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/dbeb676b530a8a641b9444a092dcab1d5af2a71f
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Mark-Brown/ASoC-DAI-clocking-terminology-modernisation/20220602-220124 git checkout dbeb676b530a8a641b9444a092dcab1d5af2a71f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash sound/soc/codecs/
If you fix the issue, kindly add following tag where applicable
All errors (new ones prefixed by >>):
>> sound/soc/codecs/tlv320aic26.c:365:9: error: no member named 'master' in 'struct aic26'
aic26->master = 1;
~~~~~ ^1 error generated.
vim +365 sound/soc/codecs/tlv320aic26.c
7fbdeb809050cb Mark Brown 2013-09-25 341
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 342 /* ---------------------------------------------------------------------
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 343 * SPI device portion of driver: probe and release routines and SPI
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 344 * driver registration.
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 345 */
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 346 static int aic26_spi_probe(struct spi_device *spi)
d8e3bb7385da0b Grant Likely 2008-07-29 347 {
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 348 struct aic26 *aic26;
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 349 int ret;
d8e3bb7385da0b Grant Likely 2008-07-29 350
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 351 dev_dbg(&spi->dev, "probing tlv320aic26 spi device\n");
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 352
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 353 /* Allocate driver data */
a8163023d29c14 Axel Lin 2011-12-29 354 aic26 = devm_kzalloc(&spi->dev, sizeof *aic26, GFP_KERNEL);
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 355 if (!aic26)
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 356 return -ENOMEM;
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 357
7fbdeb809050cb Mark Brown 2013-09-25 358 aic26->regmap = devm_regmap_init_spi(spi, &aic26_regmap);
7fbdeb809050cb Mark Brown 2013-09-25 359 if (IS_ERR(aic26->regmap))
7fbdeb809050cb Mark Brown 2013-09-25 360 return PTR_ERR(aic26->regmap);
7fbdeb809050cb Mark Brown 2013-09-25 361
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 362 /* Initialize the driver data */
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 363 aic26->spi = spi;
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 364 dev_set_drvdata(&spi->dev, aic26);
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 @365 aic26->master = 1;
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 366
1514613a7a4480 Kuninori Morimoto 2018-01-29 367 ret = devm_snd_soc_register_component(&spi->dev,
1514613a7a4480 Kuninori Morimoto 2018-01-29 368 &aic26_soc_component_dev, &aic26_dai, 1);
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 369 return ret;
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 370 }
f0fba2ad1b6b53 Liam Girdwood 2010-03-17 371 Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp
Mark Brown
maintainerPATCH 17/20 ASoC: tlv320aic31xx: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tlv320aic31xx driver to use more modern terminology for clocking.
--- sound/soc/codecs/tlv320aic31xx.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
sound/soc/codecs/tlv320aic31xx.c +9 -10
@@ -1033,8 +1033,8 @@ static int aic31xx_clock_master_routes(struct snd_soc_component *component,struct aic31xx_priv *aic31xx =snd_soc_component_get_drvdata (component);int ret; - fmt &=SND_SOC_DAIFMT_MASTER_MASK ; -if (fmt ==SND_SOC_DAIFMT_CBS_CFS && + fmt &=SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ; +if (fmt ==SND_SOC_DAIFMT_CBC_CFC && aic31xx->master_dapm_route_applied) {/* * Remove the DAPM route(s) for codec clock master modes,
@@ -1051,7 +1051,7 @@ static int aic31xx_clock_master_routes(struct snd_soc_component *component,return ret; aic31xx->master_dapm_route_applied = false; - }else if (fmt !=SND_SOC_DAIFMT_CBS_CFS && + }else if (fmt !=SND_SOC_DAIFMT_CBC_CFC && !aic31xx->master_dapm_route_applied) {/* * Add the needed DAPM route(s) for codec clock master modes,
@@ -1083,21 +1083,20 @@ static int aic31xx_set_dai_fmt(struct snd_soc_dai *codec_dai,dev_dbg (component->dev,"## %s: fmt = 0x%x\n" , __func__, fmt); -/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : iface_reg1 |=AIC31XX_BCLK_MASTER |AIC31XX_WCLK_MASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_CBC_CFP : iface_reg1 |=AIC31XX_WCLK_MASTER ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_CBP_CFC : iface_reg1 |=AIC31XX_BCLK_MASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_CBC_CFC :break ;default : -dev_err (component->dev,"Invalid DAI master/slave interface\n" ); +dev_err (component->dev,"Invalid DAI clock provider\n" );return -EINVAL ; }
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 18/20 ASoC: tlv320aic32x4: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tlv320aic32x4 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tlv320aic32x4.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
sound/soc/codecs/tlv320aic32x4.c +4 -5
@@ -615,15 +615,14 @@ static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)u8 iface_reg_2 =0 ;u8 iface_reg_3 =0 ; -/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : iface_reg_1 |=AIC32X4_BCLKMASTER |AIC32X4_WCLKMASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_CBC_CFC :break ;default : -printk (KERN_ERR "aic32x4: invalid DAI master/slave interface\n" ); +printk (KERN_ERR "aic32x4: invalid clock provider\n" );return -EINVAL ; }
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 19/20 ASoC: tlv320aic33: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tlv320aic33 driver to use more modern terminology for clocking.
--- sound/soc/codecs/tlv320aic3x.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
sound/soc/codecs/tlv320aic3x.c +5 -6
@@ -1253,22 +1253,21 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai, iface_areg =snd_soc_component_read (component,AIC3X_ASD_INTF_CTRLA ) &0x3f ; iface_breg =snd_soc_component_read (component,AIC3X_ASD_INTF_CTRLB ) &0x3f ; -/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : aic3x->master =1 ; iface_areg |=BIT_CLK_MASTER |WORD_CLK_MASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_CBC_CFC : aic3x->master =0 ; iface_areg &= ~(BIT_CLK_MASTER |WORD_CLK_MASTER );break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_CBP_CFC : aic3x->master =1 ; iface_areg |=BIT_CLK_MASTER ; iface_areg &= ~WORD_CLK_MASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_CBC_CFP : aic3x->master =1 ; iface_areg |=WORD_CLK_MASTER ; iface_areg &= ~BIT_CLK_MASTER ;
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 20/20 ASoC: tlv320dac3x: Use modern ASoC DAI format terminology
In reply to Mark BrownAs part of moving to remove the old style defines for the bus clocks update the tlv320dac3x driver to use more modern terminology for clocking.
--- sound/soc/codecs/tlv320dac33.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
sound/soc/codecs/tlv320dac33.c +5 -7
@@ -1317,16 +1317,14 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai, aictrl_a =dac33_read_reg_cache (component,DAC33_SER_AUDIOIF_CTRL_A ); aictrl_b =dac33_read_reg_cache (component,DAC33_SER_AUDIOIF_CTRL_B ); -/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : -/* Codec Master */ + +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_CBP_CFP : aictrl_a |= (DAC33_MSBCLK |DAC33_MSWCLK );break ; -case SND_SOC_DAIFMT_CBS_CFS : -/* Codec Slave */ +case SND_SOC_DAIFMT_CBC_CFC :if (dac33->fifo_mode) { -dev_err (component->dev,"FIFO mode requires master mode\n" ); +dev_err (component->dev,"FIFO mode requires provider mode\n" );return -EINVAL ; }else aictrl_a &= ~(DAC33_MSBCLK |DAC33_MSWCLK );
Signature · 1 line
2.30.2
Mark Brown
maintainerQuoted 25 lines · Mark Brown
Update the last batch of CODEC drivers without specific maintainers to use the new defines for DAI clocking.
Mark Brown (20):
ASoC: cx2072x: Use modern ASoC DAI format terminology
ASoC: max98090: Use modern ASoC DAI format terminology
ASoC: rk3328: Use modern ASoC DAI format terminology
ASoC: sta32x: Use modern ASoC DAI format terminology
ASoC: sta350: Use modern ASoC DAI format terminology
ASoC: sti-sas: Use modern ASoC DAI format terminology
ASoC: tas2552: Use modern ASoC DAI format terminology
ASoC: tas2770: Use modern ASoC DAI format terminology
ASoC: tas5086: Use modern ASoC DAI format terminology
ASoC: tas5720: Use modern ASoC DAI format terminology
ASoC: tas6424: Use modern ASoC DAI format terminology
ASoC: uda1334: Use modern ASoC DAI format terminology
ASoC: tlv320adc3xxx: Use modern ASoC DAI format terminology
ASoC: tlv320adcx140: Use modern ASoC DAI format terminology
ASoC: tlv320aic23: Use modern ASoC DAI format terminology
ASoC: tlv320aic26: Use modern ASoC DAI format terminology
ASoC: tlv320aic31xx: Use modern ASoC DAI format terminology
ASoC: tlv320aic32x4: Use modern ASoC DAI format terminology
ASoC: tlv320aic33: Use modern ASoC DAI format terminology
ASoC: tlv320dac3x: Use modern ASoC DAI format terminology
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/20] ASoC: cx2072x: Use modern ASoC DAI format terminology
commit: eff8f2aeaf0c1b529d918c9f9569577dff600dc5
[02/20] ASoC: max98090: Use modern ASoC DAI format terminology
commit: 573a9a37b6fcef6dc3977ca11a671f82b1c1b606
[03/20] ASoC: rk3328: Use modern ASoC DAI format terminology
commit: cd0df1706d181bf103d0f02e6c008c2386772eb1
[04/20] ASoC: sta32x: Use modern ASoC DAI format terminology
commit: ef08b481ae78eb89672bdf67ed306a43065253b3
[05/20] ASoC: sta350: Use modern ASoC DAI format terminology
commit: def5b3774a48ed06e69b56af8317cb563bbd9ceb
[06/20] ASoC: sti-sas: Use modern ASoC DAI format terminology
commit: d7e98b570e801375130ed4796bcbb35a39669d44
[07/20] ASoC: tas2552: Use modern ASoC DAI format terminology
commit: 6b486af2ab946cbcad5c95f8daa1f4a8a53f25c5
[08/20] ASoC: tas2770: Use modern ASoC DAI format terminology
commit: f8a4018c826fde6137425bbdbe524d5973feb173
[09/20] ASoC: tas5086: Use modern ASoC DAI format terminology
commit: 7c5c399fb97e3f7a88d1b154f610cab4d9253955
[10/20] ASoC: tas5720: Use modern ASoC DAI format terminology
commit: 9f6654c3162a4e64265c62bea433550fce4beffd
[11/20] ASoC: tas6424: Use modern ASoC DAI format terminology
commit: f025fcc466cc03fa4f5ae245b6848629b846edff
[12/20] ASoC: uda1334: Use modern ASoC DAI format terminology
commit: 5fc4ed4bda465fb826bea7c6a7b15657154787ce
[13/20] ASoC: tlv320adc3xxx: Use modern ASoC DAI format terminology
commit: ad60ff09801fa1841dcdcf1f6ad1fa0e09ad0693
[14/20] ASoC: tlv320adcx140: Use modern ASoC DAI format terminology
commit: 10649fa392c9abb6e9b258f7af9577596339fbe2
[15/20] ASoC: tlv320aic23: Use modern ASoC DAI format terminology
commit: b9ff35c7afc6ae1bddca3f84fb23a3d903a62a23
[16/20] ASoC: tlv320aic26: Use modern ASoC DAI format terminology
commit: 8d322f170b09989f47614c1a663371647f03176f
[17/20] ASoC: tlv320aic31xx: Use modern ASoC DAI format terminology
commit: 2fd8298aed2228b8c6b94edf820121da25b3f5e2
[18/20] ASoC: tlv320aic32x4: Use modern ASoC DAI format terminology
commit: 0cc5a137f7a3ba6fec069d8d222020f0927a18ef
[19/20] ASoC: tlv320aic33: Use modern ASoC DAI format terminology
commit: 83a5f86903fbaf9c47c13975eb6f2fbd16d7f865
[20/20] ASoC: tlv320dac3x: Use modern ASoC DAI format terminology
commit: 894bf75bb1f6c274cdd877879d9215abd6ed4b1bAll 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