diff mbox series

[4/8] ASoC: tegra: Select SND_SOC_RT5659

Message ID 1611920470-24225-5-git-send-email-spujar@nvidia.com (mailing list archive)
State Superseded
Headers show
Series Tegra186 and Tegra194 audio graph card | expand

Commit Message

Sameer Pujar Jan. 29, 2021, 11:41 a.m. UTC
Select SND_SOC_RT5659 to verify external audio over Jetson platforms.
Jetson AGX Xavier has an on-board RT5658 audio codec and to use this
enable required config.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
---
 sound/soc/tegra/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown Jan. 29, 2021, 12:44 p.m. UTC | #1
On Fri, Jan 29, 2021 at 05:11:06PM +0530, Sameer Pujar wrote:
> Select SND_SOC_RT5659 to verify external audio over Jetson platforms.
> Jetson AGX Xavier has an on-board RT5658 audio codec and to use this
> enable required config.
> 
>  config SND_SOC_TEGRA_AUDIO_GRAPH_CARD
>  	tristate "Audio Graph Card based Tegra driver"
>  	depends on SND_AUDIO_GRAPH_CARD
> +	select SND_SOC_RT5659
>  	help

This is a generic device, not something specific to Jetson, why force
on a driver that may not be required on other boards using this driver?
Sameer Pujar Jan. 29, 2021, 3:32 p.m. UTC | #2
On 1/29/2021 6:14 PM, Mark Brown wrote:
> On Fri, Jan 29, 2021 at 05:11:06PM +0530, Sameer Pujar wrote:
>> Select SND_SOC_RT5659 to verify external audio over Jetson platforms.
>> Jetson AGX Xavier has an on-board RT5658 audio codec and to use this
>> enable required config.
>>
>>   config SND_SOC_TEGRA_AUDIO_GRAPH_CARD
>>   	tristate "Audio Graph Card based Tegra driver"
>>   	depends on SND_AUDIO_GRAPH_CARD
>> +	select SND_SOC_RT5659
>>   	help
> This is a generic device, not something specific to Jetson, why force
> on a driver that may not be required on other boards using this driver?

Yes specific boards using 'SND_SOC_TEGRA_AUDIO_GRAPH_CARD' may require 
'SND_SOC_RT5659'. But there is no platform specific config. Is there a 
better way to enable config 'SND_SOC_RT5659' conditionally?
Mark Brown Jan. 29, 2021, 3:48 p.m. UTC | #3
On Fri, Jan 29, 2021 at 09:02:52PM +0530, Sameer Pujar wrote:
> On 1/29/2021 6:14 PM, Mark Brown wrote:

> > This is a generic device, not something specific to Jetson, why force
> > on a driver that may not be required on other boards using this driver?

> Yes specific boards using 'SND_SOC_TEGRA_AUDIO_GRAPH_CARD' may require
> 'SND_SOC_RT5659'. But there is no platform specific config. Is there a
> better way to enable config 'SND_SOC_RT5659' conditionally?

If the user wants a given CODEC driver then they should enable that
driver.
Sameer Pujar Jan. 29, 2021, 4:45 p.m. UTC | #4
On 1/29/2021 9:18 PM, Mark Brown wrote:
> On Fri, Jan 29, 2021 at 09:02:52PM +0530, Sameer Pujar wrote:
>> On 1/29/2021 6:14 PM, Mark Brown wrote:
>>> This is a generic device, not something specific to Jetson, why force
>>> on a driver that may not be required on other boards using this driver?
>> Yes specific boards using 'SND_SOC_TEGRA_AUDIO_GRAPH_CARD' may require
>> 'SND_SOC_RT5659'. But there is no platform specific config. Is there a
>> better way to enable config 'SND_SOC_RT5659' conditionally?
> If the user wants a given CODEC driver then they should enable that
> driver.

Above card driver is intended to be used on multiple platforms. DT has 
already a way for user to describe the CODEC connection required for 
specific platform. So idea is enable these CODECs from driver point of 
view for this card driver and platform DT can use what is required. Also 
the CODEC driver will be a loadable module here.

If above does not seem fine, alternatively can I just enable CODEC 
config independently from defconfig?
Mark Brown Jan. 29, 2021, 5:19 p.m. UTC | #5
On Fri, Jan 29, 2021 at 10:15:51PM +0530, Sameer Pujar wrote:
> On 1/29/2021 9:18 PM, Mark Brown wrote:

> > If the user wants a given CODEC driver then they should enable that
> > driver.

> Above card driver is intended to be used on multiple platforms. DT has
> already a way for user to describe the CODEC connection required for
> specific platform. So idea is enable these CODECs from driver point of view
> for this card driver and platform DT can use what is required. Also the
> CODEC driver will be a loadable module here.

No, you're missing the point of a generic driver here.  This will mean
that if someone wants to build the driver into the kernel for their
embedded board they will be forced to build in every CODEC driver
someone has decided might be used with this generic driver, and even if
they're building things modular someone trying to cut down the size of
their kernel images is going to at least have to spend time building
CODEC drivers they don't want to use.  Distributions should just select
all the CODEC drivers that are available in Kconfig, people configuring
for a particular target audience should be able to build only the
drivers they know they need.

> If above does not seem fine, alternatively can I just enable CODEC config
> independently from defconfig?

Yes.
Sameer Pujar Jan. 29, 2021, 5:28 p.m. UTC | #6
On 1/29/2021 10:49 PM, Mark Brown wrote:
> On Fri, Jan 29, 2021 at 10:15:51PM +0530, Sameer Pujar wrote:
>> On 1/29/2021 9:18 PM, Mark Brown wrote:
>>> If the user wants a given CODEC driver then they should enable that
>>> driver.
>> Above card driver is intended to be used on multiple platforms. DT has
>> already a way for user to describe the CODEC connection required for
>> specific platform. So idea is enable these CODECs from driver point of view
>> for this card driver and platform DT can use what is required. Also the
>> CODEC driver will be a loadable module here.
> No, you're missing the point of a generic driver here.  This will mean
> that if someone wants to build the driver into the kernel for their
> embedded board they will be forced to build in every CODEC driver
> someone has decided might be used with this generic driver, and even if
> they're building things modular someone trying to cut down the size of
> their kernel images is going to at least have to spend time building
> CODEC drivers they don't want to use.  Distributions should just select
> all the CODEC drivers that are available in Kconfig, people configuring
> for a particular target audience should be able to build only the
> drivers they know they need.

OK, will drop this in v2. Thank you for details.

>
>> If above does not seem fine, alternatively can I just enable CODEC config
>> independently from defconfig?
> Yes.
diff mbox series

Patch

diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig
index 6dc83ad..4a45163 100644
--- a/sound/soc/tegra/Kconfig
+++ b/sound/soc/tegra/Kconfig
@@ -120,6 +120,7 @@  config SND_SOC_TEGRA210_ADMAIF
 config SND_SOC_TEGRA_AUDIO_GRAPH_CARD
 	tristate "Audio Graph Card based Tegra driver"
 	depends on SND_AUDIO_GRAPH_CARD
+	select SND_SOC_RT5659
 	help
 	  Config to enable Tegra audio machine driver based on generic
 	  audio graph driver. It is a thin driver written to customize