diff mbox series

[4/7] ASoC: arizona: Allow codecs to be selected from kernel config

Message ID 20201014145418.31838-5-rf@opensource.cirrus.com
State Superseded
Headers show
Series Add dts for Rpi4 + Cirrus Lochnagar and codecs | expand

Commit Message

Richard Fitzgerald Oct. 14, 2020, 2:54 p.m. UTC
The codec Kconfig options were hidden and intended to be selected by
the machine driver that requires them. But that means having either a
dedicated machine driver or building all codecs.

This patch makes the Kconfig options visible so that they can be
selected independently of the machine driver, allowing the codec to be
used with simple-card and other machine drivers that are not hardcoded
to use a fixed set of codecs.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/soc/codecs/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

kernel test robot Oct. 15, 2020, 12:19 a.m. UTC | #1
Hi Richard,

I love your patch! Perhaps something to improve:

[auto build test WARNING on asoc/for-next]
[also build test WARNING on robh/for-next sound/for-next v5.9 next-20201013]
[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/0day-ci/linux/commits/Richard-Fitzgerald/Add-dts-for-Rpi4-Cirrus-Lochnagar-and-codecs/20201014-225648
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: xtensa-randconfig-s032-20201014 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-rc1-dirty
        # https://github.com/0day-ci/linux/commit/7ddf8ce197a5426e13fe9422a3ed17f0b02a94df
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Richard-Fitzgerald/Add-dts-for-Rpi4-Cirrus-Lochnagar-and-codecs/20201014-225648
        git checkout 7ddf8ce197a5426e13fe9422a3ed17f0b02a94df
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
>> sound/soc/codecs/wm5102.c:687:35: sparse: sparse: cast to restricted __be16

vim +687 sound/soc/codecs/wm5102.c

cc9e92431ee9c7f Charles Keepax     2014-06-06  677  
cc9e92431ee9c7f Charles Keepax     2014-06-06  678  static int wm5102_out_comp_coeff_put(struct snd_kcontrol *kcontrol,
cc9e92431ee9c7f Charles Keepax     2014-06-06  679  				     struct snd_ctl_elem_value *ucontrol)
cc9e92431ee9c7f Charles Keepax     2014-06-06  680  {
0fe1daa6663ae94 Kuninori Morimoto  2018-02-13  681  	struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
0fe1daa6663ae94 Kuninori Morimoto  2018-02-13  682  	struct arizona *arizona = dev_get_drvdata(component->dev->parent);
cc9e92431ee9c7f Charles Keepax     2014-06-06  683  
d74bcaaeb668261 Lars-Peter Clausen 2014-11-09  684  	mutex_lock(&arizona->dac_comp_lock);
cc9e92431ee9c7f Charles Keepax     2014-06-06  685  	memcpy(&arizona->dac_comp_coeff, ucontrol->value.bytes.data,
cc9e92431ee9c7f Charles Keepax     2014-06-06  686  	       sizeof(arizona->dac_comp_coeff));
cc9e92431ee9c7f Charles Keepax     2014-06-06 @687  	arizona->dac_comp_coeff = be16_to_cpu(arizona->dac_comp_coeff);
d74bcaaeb668261 Lars-Peter Clausen 2014-11-09  688  	mutex_unlock(&arizona->dac_comp_lock);
cc9e92431ee9c7f Charles Keepax     2014-06-06  689  
cc9e92431ee9c7f Charles Keepax     2014-06-06  690  	return 0;
cc9e92431ee9c7f Charles Keepax     2014-06-06  691  }
cc9e92431ee9c7f Charles Keepax     2014-06-06  692  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 34c6dd04b85a..4a8d503bdd38 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -661,7 +661,7 @@  config SND_SOC_CS47L15
 	tristate
 
 config SND_SOC_CS47L24
-	tristate
+	tristate "Cirrus Logic CS47L24 CODEC"
 	depends on MFD_CS47L24
 
 config SND_SOC_CS47L35
@@ -1484,11 +1484,11 @@  config SND_SOC_WM5100
 	depends on I2C
 
 config SND_SOC_WM5102
-	tristate
+	tristate "Cirrus Logic WM5102 CODEC"
 	depends on MFD_WM5102
 
 config SND_SOC_WM5110
-	tristate
+	tristate "Cirrus Logic WM5110 CODEC"
 	depends on MFD_WM5110
 
 config SND_SOC_WM8350
@@ -1657,7 +1657,7 @@  config SND_SOC_WM8997
 	depends on MFD_WM8997
 
 config SND_SOC_WM8998
-	tristate
+	tristate "Cirrus Logic WM8998 CODEC"
 	depends on MFD_WM8998
 
 config SND_SOC_WM9081