lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8760ecqkem.fsf@belgarion.home>
Date:   Sat, 29 Jul 2017 00:14:09 +0200
From:   Robert Jarzmik <robert.jarzmik@...e.fr>
To:     Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Lee Jones <lee.jones@...aro.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, Daniel Mack <daniel@...que.org>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>,
        <linux-kernel@...r.kernel.org>, <linux-input@...r.kernel.org>,
        <patches@...nsource.wolfsonmicro.com>,
        <alsa-devel@...a-project.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v4 09/12] ASoC: wm9712: add ac97 new bus support

Charles Keepax <ckeepax@...nsource.cirrus.com> writes:

> On Mon, Jul 24, 2017 at 10:49:25PM +0200, Robert Jarzmik wrote:
>> Add support for the new ac97 bus model, where devices are automatically
>> discovered on AC-Links.
>> 
>> Signed-off-by: Robert Jarzmik <robert.jarzmik@...e.fr>
>> ---
>> +	} else {
>> +		wm9712->ac97 = snd_soc_new_ac97_codec(codec, WM9712_VENDOR_ID,
>> +						      WM9712_VENDOR_ID_MASK);
>> +		if (IS_ERR(wm9712->ac97)) {
>> +			ret = PTR_ERR(wm9712->ac97);
>> +			dev_err(codec->dev,
>> +				"Failed to register AC97 codec: %d\n", ret);
>> +			return ret;
>> +		}
>> +
>> +		regmap = regmap_init_ac97(wm9712->ac97, &wm9712_regmap_config);
>> +		if (IS_ERR(regmap)) {
>> +			ret = PTR_ERR(regmap);
>> +			goto err_free_ac97_codec;
>
> For the 9713 you had this wrapped in an ifdef? Why did it need an
> ifdef there but doesn't for this driver?
I have forgotten the ifdef, it's a very good catch, thanks.
The trick is that in :
  - include/sound/soc.h
  - snd_soc_new_ac97_codec() is only defined under this ifdef

And with the new ac97 bus support, these drivers can be compiled now with
CONFIG_SND_SOC_AC97_BUS not defined, so I need to add the ifdef.

Cheers.

-- 
Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ