All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>,
	Ion Agorria <ion@agorria.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/4] ASoC: tegra: Specify components string for Nexus 7
Date: Mon, 24 May 2021 17:00:27 +0300	[thread overview]
Message-ID: <99ef3d77-c626-c632-bbd2-92eb15acad20@gmail.com> (raw)
In-Reply-To: <ec2098e0-7918-8488-cf7c-a07e5aa6908c@perex.cz>

24.05.2021 13:54, Jaroslav Kysela пишет:
> Dne 24. 05. 21 v 1:44 Dmitry Osipenko napsal(a):
>> Specify components string for Nexus 7 using the Intel BayTrail components
>> format. This may allow us to create a more generic UCM for RT5640 codec.
>>
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>>  sound/soc/tegra/tegra_asoc_machine.c | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>>
>> diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c
>> index a81f2ebfc00c..87e0a47040a5 100644
>> --- a/sound/soc/tegra/tegra_asoc_machine.c
>> +++ b/sound/soc/tegra/tegra_asoc_machine.c
>> @@ -671,6 +671,24 @@ static const struct tegra_asoc_data tegra_rt5640_data = {
>>  	.add_hp_jack = true,
>>  };
>>  
>> +/*
>> + * Speaker: Connected to SPO L/R P/N pins, stereo.
>> + * Internal Microphone: Digital, connected to DMIC1_DAT IN2P/N pins.
>> + * Headphones: Connected to HPOL/R pins.
>> + * Headset Microphone: Unconnected.
>> + *
>> + * IF2_DAC/ADC are unpopulated.
>> + */
>> +static const struct tegra_asoc_data tegra_rt5640_grouper_data = {
>> +	.components = "codec:rt5640 cfg-spk:2 cfg-mic:dmic1 aif:1",
> 
> Perhaps, it may be better to handle this string via the DT config (create new
> function like snd_soc_of_parse_card_name()).
> 
> The "codec:rt5640" should be set in the driver (it's fixed), but the
> "cfg-spk:2 cfg-mic:dmic1 aif:1" part is suitable for the DT config.

Not sure that this is possible. The DT is an ABI, while components
string has no specification. Any changes to the components string will
require DT update.

I think it's much more feasible to have a database of components within
kernel driver, like Intel sound driver does it for ACPI devices.

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Osipenko <digetx@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>,
	Ion Agorria <ion@agorria.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/4] ASoC: tegra: Specify components string for Nexus 7
Date: Mon, 24 May 2021 17:00:27 +0300	[thread overview]
Message-ID: <99ef3d77-c626-c632-bbd2-92eb15acad20@gmail.com> (raw)
In-Reply-To: <ec2098e0-7918-8488-cf7c-a07e5aa6908c@perex.cz>

24.05.2021 13:54, Jaroslav Kysela пишет:
> Dne 24. 05. 21 v 1:44 Dmitry Osipenko napsal(a):
>> Specify components string for Nexus 7 using the Intel BayTrail components
>> format. This may allow us to create a more generic UCM for RT5640 codec.
>>
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>>  sound/soc/tegra/tegra_asoc_machine.c | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>>
>> diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c
>> index a81f2ebfc00c..87e0a47040a5 100644
>> --- a/sound/soc/tegra/tegra_asoc_machine.c
>> +++ b/sound/soc/tegra/tegra_asoc_machine.c
>> @@ -671,6 +671,24 @@ static const struct tegra_asoc_data tegra_rt5640_data = {
>>  	.add_hp_jack = true,
>>  };
>>  
>> +/*
>> + * Speaker: Connected to SPO L/R P/N pins, stereo.
>> + * Internal Microphone: Digital, connected to DMIC1_DAT IN2P/N pins.
>> + * Headphones: Connected to HPOL/R pins.
>> + * Headset Microphone: Unconnected.
>> + *
>> + * IF2_DAC/ADC are unpopulated.
>> + */
>> +static const struct tegra_asoc_data tegra_rt5640_grouper_data = {
>> +	.components = "codec:rt5640 cfg-spk:2 cfg-mic:dmic1 aif:1",
> 
> Perhaps, it may be better to handle this string via the DT config (create new
> function like snd_soc_of_parse_card_name()).
> 
> The "codec:rt5640" should be set in the driver (it's fixed), but the
> "cfg-spk:2 cfg-mic:dmic1 aif:1" part is suitable for the DT config.

Not sure that this is possible. The DT is an ABI, while components
string has no specification. Any changes to the components string will
require DT update.

I think it's much more feasible to have a database of components within
kernel driver, like Intel sound driver does it for ACPI devices.

  reply	other threads:[~2021-05-24 14:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23 23:44 [PATCH v3 0/4] Unify NVIDIA Tegra ASoC machine drivers Dmitry Osipenko
2021-05-23 23:44 ` Dmitry Osipenko
2021-05-23 23:44 ` [PATCH v3 1/4] ASoC: tegra: Set driver_name=tegra for all " Dmitry Osipenko
2021-05-23 23:44   ` Dmitry Osipenko
2021-05-23 23:44 ` [PATCH v3 2/4] ASoC: tegra: Unify ASoC " Dmitry Osipenko
2021-05-23 23:44   ` Dmitry Osipenko
2021-05-24  2:34   ` kernel test robot
2021-05-24  2:34     ` kernel test robot
2021-05-24  2:34     ` kernel test robot
2021-05-24 14:21     ` Dmitry Osipenko
2021-05-24 14:21       ` Dmitry Osipenko
2021-05-24 14:21       ` Dmitry Osipenko
2021-05-23 23:44 ` [PATCH v3 3/4] ASoC: tegra: Specify components string for each card Dmitry Osipenko
2021-05-23 23:44   ` Dmitry Osipenko
2021-05-24 10:54   ` Jaroslav Kysela
2021-05-24 10:54     ` Jaroslav Kysela
2021-05-23 23:44 ` [PATCH v3 4/4] ASoC: tegra: Specify components string for Nexus 7 Dmitry Osipenko
2021-05-23 23:44   ` Dmitry Osipenko
2021-05-24 10:54   ` Jaroslav Kysela
2021-05-24 10:54     ` Jaroslav Kysela
2021-05-24 14:00     ` Dmitry Osipenko [this message]
2021-05-24 14:00       ` Dmitry Osipenko
2021-05-25 16:24       ` Jaroslav Kysela
2021-05-25 16:24         ` Jaroslav Kysela
2021-05-25 21:09         ` Dmitry Osipenko
2021-05-25 21:09           ` Dmitry Osipenko
2021-05-25  8:40   ` Jon Hunter
2021-05-25  8:40     ` Jon Hunter
2021-05-25 15:40     ` Dmitry Osipenko
2021-05-25 15:40       ` Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99ef3d77-c626-c632-bbd2-92eb15acad20@gmail.com \
    --to=digetx@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=clamor95@gmail.com \
    --cc=ion@agorria.com \
    --cc=jonathanh@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.