[alsa-devel] [PATCH] ASoC: da7219: read fmw property to get mclk for non-dts systems

kbuild test robot lkp at intel.com
Mon Apr 30 11:28:34 CEST 2018


Hi Akshu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on asoc/for-next]
[also build test ERROR on v4.17-rc3 next-20180426]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Akshu-Agrawal/ASoC-da7219-read-fmw-property-to-get-mclk-for-non-dts-systems/20180430-150614
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-randconfig-x015-201817 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   sound/soc/codecs/da7219.c: In function 'da7219_probe':
>> sound/soc/codecs/da7219.c:1913:31: error: 'codec' undeclared (first use in this function); did you mean 'node'?
      da7219->mclk = devm_clk_get(codec->dev, "mclk");
                                  ^~~~~
                                  node
   sound/soc/codecs/da7219.c:1913:31: note: each undeclared identifier is reported only once for each function it appears in

vim +1913 sound/soc/codecs/da7219.c

  1867	
  1868	static int da7219_probe(struct snd_soc_component *component)
  1869	{
  1870		struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component);
  1871		unsigned int rev;
  1872		int ret;
  1873	
  1874		mutex_init(&da7219->ctrl_lock);
  1875		mutex_init(&da7219->pll_lock);
  1876	
  1877		/* Regulator configuration */
  1878		ret = da7219_handle_supplies(component);
  1879		if (ret)
  1880			return ret;
  1881	
  1882		ret = regmap_read(da7219->regmap, DA7219_CHIP_REVISION, &rev);
  1883		if (ret) {
  1884			dev_err(component->dev, "Failed to read chip revision: %d\n", ret);
  1885			goto err_disable_reg;
  1886		}
  1887	
  1888		switch (rev & DA7219_CHIP_MINOR_MASK) {
  1889		case 0:
  1890			ret = regmap_register_patch(da7219->regmap, da7219_rev_aa_patch,
  1891						    ARRAY_SIZE(da7219_rev_aa_patch));
  1892			if (ret) {
  1893				dev_err(component->dev, "Failed to register AA patch: %d\n",
  1894					ret);
  1895				goto err_disable_reg;
  1896			}
  1897			break;
  1898		default:
  1899			break;
  1900		}
  1901	
  1902		/* Handle DT/ACPI/Platform data */
  1903		da7219->pdata = dev_get_platdata(component->dev);
  1904		if (!da7219->pdata)
  1905			da7219->pdata = da7219_fw_to_pdata(component);
  1906	
  1907		da7219_handle_pdata(component);
  1908	
  1909		/* Check if MCLK provided */
  1910		if (da7219->pdata->mclk_name)
  1911			da7219->mclk = clk_get(NULL, da7219->pdata->mclk_name);
  1912		if (!da7219->mclk)
> 1913			da7219->mclk = devm_clk_get(codec->dev, "mclk");
  1914		if (IS_ERR(da7219->mclk)) {
  1915			if (PTR_ERR(da7219->mclk) != -ENOENT) {
  1916				ret = PTR_ERR(da7219->mclk);
  1917				goto err_disable_reg;
  1918			} else {
  1919				da7219->mclk = NULL;
  1920			}
  1921		}
  1922	
  1923		/* Default PC counter to free-running */
  1924		snd_soc_component_update_bits(component, DA7219_PC_COUNT, DA7219_PC_FREERUN_MASK,
  1925				    DA7219_PC_FREERUN_MASK);
  1926	
  1927		/* Default gain ramping */
  1928		snd_soc_component_update_bits(component, DA7219_MIXIN_L_CTRL,
  1929				    DA7219_MIXIN_L_AMP_RAMP_EN_MASK,
  1930				    DA7219_MIXIN_L_AMP_RAMP_EN_MASK);
  1931		snd_soc_component_update_bits(component, DA7219_ADC_L_CTRL, DA7219_ADC_L_RAMP_EN_MASK,
  1932				    DA7219_ADC_L_RAMP_EN_MASK);
  1933		snd_soc_component_update_bits(component, DA7219_DAC_L_CTRL, DA7219_DAC_L_RAMP_EN_MASK,
  1934				    DA7219_DAC_L_RAMP_EN_MASK);
  1935		snd_soc_component_update_bits(component, DA7219_DAC_R_CTRL, DA7219_DAC_R_RAMP_EN_MASK,
  1936				    DA7219_DAC_R_RAMP_EN_MASK);
  1937		snd_soc_component_update_bits(component, DA7219_HP_L_CTRL,
  1938				    DA7219_HP_L_AMP_RAMP_EN_MASK,
  1939				    DA7219_HP_L_AMP_RAMP_EN_MASK);
  1940		snd_soc_component_update_bits(component, DA7219_HP_R_CTRL,
  1941				    DA7219_HP_R_AMP_RAMP_EN_MASK,
  1942				    DA7219_HP_R_AMP_RAMP_EN_MASK);
  1943	
  1944		/* Default minimum gain on HP to avoid pops during DAPM sequencing */
  1945		snd_soc_component_update_bits(component, DA7219_HP_L_CTRL,
  1946				    DA7219_HP_L_AMP_MIN_GAIN_EN_MASK,
  1947				    DA7219_HP_L_AMP_MIN_GAIN_EN_MASK);
  1948		snd_soc_component_update_bits(component, DA7219_HP_R_CTRL,
  1949				    DA7219_HP_R_AMP_MIN_GAIN_EN_MASK,
  1950				    DA7219_HP_R_AMP_MIN_GAIN_EN_MASK);
  1951	
  1952		/* Default infinite tone gen, start/stop by Kcontrol */
  1953		snd_soc_component_write(component, DA7219_TONE_GEN_CYCLES, DA7219_BEEP_CYCLES_MASK);
  1954	
  1955		/* Initialise AAD block */
  1956		ret = da7219_aad_init(component);
  1957		if (ret)
  1958			goto err_disable_reg;
  1959	
  1960		return 0;
  1961	
  1962	err_disable_reg:
  1963		regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies);
  1964	
  1965		return ret;
  1966	}
  1967	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29167 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180430/d22f8b5a/attachment-0001.bin>


More information about the Alsa-devel mailing list