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