Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752904AbdG1WOU (ORCPT ); Fri, 28 Jul 2017 18:14:20 -0400 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:34059 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752700AbdG1WOS (ORCPT ); Fri, 28 Jul 2017 18:14:18 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Sat, 29 Jul 2017 00:14:15 +0200 X-ME-IP: 92.134.93.40 From: Robert Jarzmik To: Charles Keepax Cc: Dmitry Torokhov , Lee Jones , Jaroslav Kysela , Takashi Iwai , Daniel Mack , Haojian Zhuang , Liam Girdwood , Mark Brown , Lars-Peter Clausen , Charles Keepax , , , , , Subject: Re: [PATCH v4 09/12] ASoC: wm9712: add ac97 new bus support References: <20170724204928.29505-1-robert.jarzmik@free.fr> <20170724204928.29505-10-robert.jarzmik@free.fr> <20170725102057.hblyopxycgz55mr7@localhost.localdomain> X-URL: http://belgarath.falguerolles.org/ Date: Sat, 29 Jul 2017 00:14:09 +0200 In-Reply-To: <20170725102057.hblyopxycgz55mr7@localhost.localdomain> (Charles Keepax's message of "Tue, 25 Jul 2017 11:20:57 +0100") Message-ID: <8760ecqkem.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 37 Charles Keepax 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 >> --- >> + } 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