diff mbox series

[14/14] ASoC: amd: enable build for RN machine driver

Message ID 20200505205327.642282-15-alexander.deucher@amd.com (mailing list archive)
State New, archived
Headers show
Series Add Renoir ACP driver | expand

Commit Message

Alex Deucher May 5, 2020, 8:53 p.m. UTC
From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>

This patch enables build for RN machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 sound/soc/amd/Kconfig         | 7 +++++++
 sound/soc/amd/renoir/Makefile | 1 +
 2 files changed, 8 insertions(+)

Comments

Pierre-Louis Bossart May 5, 2020, 9:39 p.m. UTC | #1
> diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig
> index 5f57a47382b4..77ffdb41bee5 100644
> --- a/sound/soc/amd/Kconfig
> +++ b/sound/soc/amd/Kconfig
> @@ -42,3 +42,10 @@ config SND_SOC_AMD_RENOIR
>   	depends on X86 && PCI
>   	help
>   	 This option enables ACP support for Renoir platform
> +
> +config SND_SOC_AMD_RENOIR_MACH
> +	tristate "AMD Renoir support for DMIC"
> +	select SND_SOC_DMIC

there could be a missing dependency if GPIOLIB is not selected 
(SND_SOC_DMIC depends on it).

> +	depends on SND_SOC_AMD_RENOIR
> +	help
> +	 This option enables machine driver for DMIC
Mukunda,Vijendar May 6, 2020, 3:54 p.m. UTC | #2
[AMD Official Use Only - Internal Distribution Only]



> -----Original Message-----
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Sent: Wednesday, May 6, 2020 3:10 AM
> To: Alex Deucher <alexdeucher@gmail.com>; alsa-devel@alsa-project.org;
> broonie@kernel.org; Mukunda, Vijendar <Vijendar.Mukunda@amd.com>;
> tiwai@suse.de
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH 14/14] ASoC: amd: enable build for RN machine driver
> 
> 
> 
> > diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig
> > index 5f57a47382b4..77ffdb41bee5 100644
> > --- a/sound/soc/amd/Kconfig
> > +++ b/sound/soc/amd/Kconfig
> > @@ -42,3 +42,10 @@ config SND_SOC_AMD_RENOIR
> >   	depends on X86 && PCI
> >   	help
> >   	 This option enables ACP support for Renoir platform
> > +
> > +config SND_SOC_AMD_RENOIR_MACH
> > +	tristate "AMD Renoir support for DMIC"
> > +	select SND_SOC_DMIC
> 
> there could be a missing dependency if GPIOLIB is not selected
> (SND_SOC_DMIC depends on it).

Will fix it and share a new patch.
due to covid19 I don't have access to my regular email client so apologies for the formatting.
- Vijendar
> 
> > +	depends on SND_SOC_AMD_RENOIR
> > +	help
> > +	 This option enables machine driver for DMIC
Mark Brown May 6, 2020, 4:26 p.m. UTC | #3
On Tue, May 05, 2020 at 04:39:37PM -0500, Pierre-Louis Bossart wrote:

> > +config SND_SOC_AMD_RENOIR_MACH
> > +	tristate "AMD Renoir support for DMIC"
> > +	select SND_SOC_DMIC

> there could be a missing dependency if GPIOLIB is not selected (SND_SOC_DMIC
> depends on it).

That dependency is wrong, DMICs don't need GPIOs so while a given system
might need DMIC the code should be fine with the stub gpiolib
implementation.  It will mean it won't work on some boards though.
Mukunda,Vijendar May 6, 2020, 4:33 p.m. UTC | #4
[AMD Official Use Only - Internal Distribution Only]



> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Wednesday, May 6, 2020 9:57 PM
> To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Cc: Alex Deucher <alexdeucher@gmail.com>; alsa-devel@alsa-project.org;
> Mukunda, Vijendar <Vijendar.Mukunda@amd.com>; tiwai@suse.de; Deucher,
> Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH 14/14] ASoC: amd: enable build for RN machine driver
> 
> On Tue, May 05, 2020 at 04:39:37PM -0500, Pierre-Louis Bossart wrote:
> 
> > > +config SND_SOC_AMD_RENOIR_MACH
> > > +	tristate "AMD Renoir support for DMIC"
> > > +	select SND_SOC_DMIC
> 
> > there could be a missing dependency if GPIOLIB is not selected
> (SND_SOC_DMIC
> > depends on it).
> 
> That dependency is wrong, DMICs don't need GPIOs so while a given system
> might need DMIC the code should be fine with the stub gpiolib
> implementation.  It will mean it won't work on some boards though.

For our current implementation, we don't have any GPIOLIB dependency.
We just need a generic DMIC driver which should provide codec dai for
sound card registration.
Mark Brown May 6, 2020, 4:43 p.m. UTC | #5
On Wed, May 06, 2020 at 04:33:00PM +0000, Mukunda, Vijendar wrote:

> > > > +config SND_SOC_AMD_RENOIR_MACH
> > > > +	tristate "AMD Renoir support for DMIC"
> > > > +	select SND_SOC_DMIC

> > > there could be a missing dependency if GPIOLIB is not selected
> > (SND_SOC_DMIC
> > > depends on it).

> > That dependency is wrong, DMICs don't need GPIOs so while a given system
> > might need DMIC the code should be fine with the stub gpiolib
> > implementation.  It will mean it won't work on some boards though.

> For our current implementation, we don't have any GPIOLIB dependency.
> We just need a generic DMIC driver which should provide codec dai for
> sound card registration.

What you've got should be fine then, you should test with a !GPIOLIB
build just to be sure though and ideally submit a patch fixing the
SND_SOC_DMIC Kconfig.
Pierre-Louis Bossart May 6, 2020, 5:17 p.m. UTC | #6
On 5/6/20 11:43 AM, Mark Brown wrote:
> On Wed, May 06, 2020 at 04:33:00PM +0000, Mukunda, Vijendar wrote:
> 
>>>>> +config SND_SOC_AMD_RENOIR_MACH
>>>>> +	tristate "AMD Renoir support for DMIC"
>>>>> +	select SND_SOC_DMIC
> 
>>>> there could be a missing dependency if GPIOLIB is not selected
>>> (SND_SOC_DMIC
>>>> depends on it).
> 
>>> That dependency is wrong, DMICs don't need GPIOs so while a given system
>>> might need DMIC the code should be fine with the stub gpiolib
>>> implementation.  It will mean it won't work on some boards though.
> 
>> For our current implementation, we don't have any GPIOLIB dependency.
>> We just need a generic DMIC driver which should provide codec dai for
>> sound card registration.
> 
> What you've got should be fine then, you should test with a !GPIOLIB
> build just to be sure though and ideally submit a patch fixing the
> SND_SOC_DMIC Kconfig.

if you don't care about gpios, then the only reason to use the dmic 
codec would be the modeswitch and wakeup delays properties. If you don't 
care then a dummy codec would be just fine.
Mark Brown May 6, 2020, 5:25 p.m. UTC | #7
On Wed, May 06, 2020 at 12:17:03PM -0500, Pierre-Louis Bossart wrote:
> On 5/6/20 11:43 AM, Mark Brown wrote:

> > What you've got should be fine then, you should test with a !GPIOLIB
> > build just to be sure though and ideally submit a patch fixing the
> > SND_SOC_DMIC Kconfig.

> if you don't care about gpios, then the only reason to use the dmic codec
> would be the modeswitch and wakeup delays properties. If you don't care then
> a dummy codec would be just fine.

Yes, it just decays to a dummy eventually if you don't use enough of the
features - the constraints aren't particularly useful here.  Still it
doesn't hurt to explicitly say what the device is.
Mukunda,Vijendar May 6, 2020, 5:27 p.m. UTC | #8
[AMD Official Use Only - Internal Distribution Only]



> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Wednesday, May 6, 2020 10:55 PM
> To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Cc: Mukunda, Vijendar <Vijendar.Mukunda@amd.com>; Alex Deucher
> <alexdeucher@gmail.com>; tiwai@suse.de; alsa-devel@alsa-project.org;
> Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH 14/14] ASoC: amd: enable build for RN machine driver
> 
> On Wed, May 06, 2020 at 12:17:03PM -0500, Pierre-Louis Bossart wrote:
> > On 5/6/20 11:43 AM, Mark Brown wrote:
> 
> > > What you've got should be fine then, you should test with a !GPIOLIB
> > > build just to be sure though and ideally submit a patch fixing the
> > > SND_SOC_DMIC Kconfig.
> 
> > if you don't care about gpios, then the only reason to use the dmic codec
> > would be the modeswitch and wakeup delays properties. If you don't care
> then
> > a dummy codec would be just fine.
> 
> Yes, it just decays to a dummy eventually if you don't use enough of the
> features - the constraints aren't particularly useful here.  Still it
> doesn't hurt to explicitly say what the device is.

Our requirement is more are like instead of going with  a dummy codec driver,
We want to stick to existing generic dmic driver .
Mark Brown May 6, 2020, 5:28 p.m. UTC | #9
On Wed, May 06, 2020 at 05:27:37PM +0000, Mukunda, Vijendar wrote:

> > Yes, it just decays to a dummy eventually if you don't use enough of the
> > features - the constraints aren't particularly useful here.  Still it
> > doesn't hurt to explicitly say what the device is.

> Our requirement is more are like instead of going with  a dummy codec driver,
> We want to stick to existing generic dmic driver .

That's good, please do so.
diff mbox series

Patch

diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig
index 5f57a47382b4..77ffdb41bee5 100644
--- a/sound/soc/amd/Kconfig
+++ b/sound/soc/amd/Kconfig
@@ -42,3 +42,10 @@  config SND_SOC_AMD_RENOIR
 	depends on X86 && PCI
 	help
 	 This option enables ACP support for Renoir platform
+
+config SND_SOC_AMD_RENOIR_MACH
+	tristate "AMD Renoir support for DMIC"
+	select SND_SOC_DMIC
+	depends on SND_SOC_AMD_RENOIR
+	help
+	 This option enables machine driver for DMIC
diff --git a/sound/soc/amd/renoir/Makefile b/sound/soc/amd/renoir/Makefile
index 43100515c7db..e4371932a55a 100644
--- a/sound/soc/amd/renoir/Makefile
+++ b/sound/soc/amd/renoir/Makefile
@@ -4,3 +4,4 @@  snd-rn-pci-acp3x-objs	:= rn-pci-acp3x.o
 snd-acp3x-pdm-dma-objs	:= acp3x-pdm-dma.o
 obj-$(CONFIG_SND_SOC_AMD_RENOIR)	 += snd-rn-pci-acp3x.o
 obj-$(CONFIG_SND_SOC_AMD_RENOIR)	 += snd-acp3x-pdm-dma.o
+obj-$(CONFIG_SND_SOC_AMD_RENOIR_MACH)	+= acp3x-rn.o