alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components
@ 2019-11-26 10:34 Jaroslav Kysela
  2019-11-26 12:33 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 8+ messages in thread
From: Jaroslav Kysela @ 2019-11-26 10:34 UTC (permalink / raw)
  To: ALSA development; +Cc: Takashi Iwai, Mark Brown, Pierre-Louis Bossart

It is required for the auto-detection in the user space (for UCM).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/skl_hda_dsp_generic.c | 8 ++++++++
 sound/soc/sof/intel/hda.c                    | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c
index 4e45901e3a2f..11eaee9ae41f 100644
--- a/sound/soc/intel/boards/skl_hda_dsp_generic.c
+++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c
@@ -100,6 +100,8 @@ static struct snd_soc_card hda_soc_card = {
 	.late_probe = skl_hda_card_late_probe,
 };
 
+static char hda_soc_components[30];
+
 #define IDISP_DAI_COUNT		3
 #define HDAC_DAI_COUNT		2
 #define DMIC_DAI_COUNT		2
@@ -183,6 +185,12 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
 	hda_soc_card.dev = &pdev->dev;
 	snd_soc_card_set_drvdata(&hda_soc_card, ctx);
 
+	if (mach->mach_params.dmic_num > 0) {
+		snprintf(hda_soc_components, sizeof(hda_soc_components),
+				"cfg-dmics:%d", mach->mach_params.dmic_num);
+		hda_soc_card.components = hda_soc_components;
+	}
+
 	return devm_snd_soc_register_card(&pdev->dev, &hda_soc_card);
 }
 
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 7dc0018dc4c3..92fffca76af5 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -351,7 +351,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
 	const char *tplg_filename;
 	const char *idisp_str;
 	const char *dmic_str;
-	int dmic_num;
+	int dmic_num = 0;
 	int codec_num = 0;
 	int i;
 #endif
@@ -465,6 +465,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
 		mach_params->codec_mask = bus->codec_mask;
 		mach_params->platform = dev_name(sdev->dev);
 		mach_params->common_hdmi_codec_drv = hda_codec_use_common_hdmi;
+		mach_params->dmic_num = dmic_num;
 	}
 
 	/* create codec instances */
-- 
2.20.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components
  2019-11-26 10:34 [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components Jaroslav Kysela
@ 2019-11-26 12:33 ` Pierre-Louis Bossart
  2019-11-26 13:51   ` Jaroslav Kysela
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre-Louis Bossart @ 2019-11-26 12:33 UTC (permalink / raw)
  To: Jaroslav Kysela, ALSA development; +Cc: Takashi Iwai, Mark Brown



On 11/26/19 4:34 AM, Jaroslav Kysela wrote:
> It is required for the auto-detection in the user space (for UCM).
> 
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Cc: Mark Brown <broonie@kernel.org>

Thanks Jaroslav.
The changes are fine, but the code changes in hda.c will conflict with 
the cleanups done by Ranjani (which I was planning to send next week).

Any objections if we take this patch into the SOF tree (without changes 
to authorship) and provide it on alsa-devel next week with the cleanups, 
so that we don't have any conflicts?

> ---
>   sound/soc/intel/boards/skl_hda_dsp_generic.c | 8 ++++++++
>   sound/soc/sof/intel/hda.c                    | 3 ++-
>   2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c
> index 4e45901e3a2f..11eaee9ae41f 100644
> --- a/sound/soc/intel/boards/skl_hda_dsp_generic.c
> +++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c
> @@ -100,6 +100,8 @@ static struct snd_soc_card hda_soc_card = {
>   	.late_probe = skl_hda_card_late_probe,
>   };
>   
> +static char hda_soc_components[30];
> +
>   #define IDISP_DAI_COUNT		3
>   #define HDAC_DAI_COUNT		2
>   #define DMIC_DAI_COUNT		2
> @@ -183,6 +185,12 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
>   	hda_soc_card.dev = &pdev->dev;
>   	snd_soc_card_set_drvdata(&hda_soc_card, ctx);
>   
> +	if (mach->mach_params.dmic_num > 0) {
> +		snprintf(hda_soc_components, sizeof(hda_soc_components),
> +				"cfg-dmics:%d", mach->mach_params.dmic_num);
> +		hda_soc_card.components = hda_soc_components;
> +	}
> +
>   	return devm_snd_soc_register_card(&pdev->dev, &hda_soc_card);
>   }
>   
> diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
> index 7dc0018dc4c3..92fffca76af5 100644
> --- a/sound/soc/sof/intel/hda.c
> +++ b/sound/soc/sof/intel/hda.c
> @@ -351,7 +351,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
>   	const char *tplg_filename;
>   	const char *idisp_str;
>   	const char *dmic_str;
> -	int dmic_num;
> +	int dmic_num = 0;
>   	int codec_num = 0;
>   	int i;
>   #endif
> @@ -465,6 +465,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
>   		mach_params->codec_mask = bus->codec_mask;
>   		mach_params->platform = dev_name(sdev->dev);
>   		mach_params->common_hdmi_codec_drv = hda_codec_use_common_hdmi;
> +		mach_params->dmic_num = dmic_num;
>   	}
>   
>   	/* create codec instances */
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components
  2019-11-26 12:33 ` Pierre-Louis Bossart
@ 2019-11-26 13:51   ` Jaroslav Kysela
  2019-11-26 14:57     ` Pierre-Louis Bossart
  2019-11-26 16:29     ` Mark Brown
  0 siblings, 2 replies; 8+ messages in thread
From: Jaroslav Kysela @ 2019-11-26 13:51 UTC (permalink / raw)
  To: Pierre-Louis Bossart, ALSA development; +Cc: Takashi Iwai, Mark Brown

Dne 26. 11. 19 v 13:33 Pierre-Louis Bossart napsal(a):
> 
> 
> On 11/26/19 4:34 AM, Jaroslav Kysela wrote:
>> It is required for the auto-detection in the user space (for UCM).
>>
>> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
>> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>> Cc: Mark Brown <broonie@kernel.org>
> 
> Thanks Jaroslav.
> The changes are fine, but the code changes in hda.c will conflict with
> the cleanups done by Ranjani (which I was planning to send next week).
> 
> Any objections if we take this patch into the SOF tree (without changes
> to authorship) and provide it on alsa-devel next week with the cleanups,
> so that we don't have any conflicts?

I'm fine with that, if we don't miss the 5.5 merge window. Otherwise, you may 
rebase your changes on top. Mark?

				Thank you,
					Jaroslav

> 
>> ---
>>    sound/soc/intel/boards/skl_hda_dsp_generic.c | 8 ++++++++
>>    sound/soc/sof/intel/hda.c                    | 3 ++-
>>    2 files changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c
>> index 4e45901e3a2f..11eaee9ae41f 100644
>> --- a/sound/soc/intel/boards/skl_hda_dsp_generic.c
>> +++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c
>> @@ -100,6 +100,8 @@ static struct snd_soc_card hda_soc_card = {
>>    	.late_probe = skl_hda_card_late_probe,
>>    };
>>    
>> +static char hda_soc_components[30];
>> +
>>    #define IDISP_DAI_COUNT		3
>>    #define HDAC_DAI_COUNT		2
>>    #define DMIC_DAI_COUNT		2
>> @@ -183,6 +185,12 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
>>    	hda_soc_card.dev = &pdev->dev;
>>    	snd_soc_card_set_drvdata(&hda_soc_card, ctx);
>>    
>> +	if (mach->mach_params.dmic_num > 0) {
>> +		snprintf(hda_soc_components, sizeof(hda_soc_components),
>> +				"cfg-dmics:%d", mach->mach_params.dmic_num);
>> +		hda_soc_card.components = hda_soc_components;
>> +	}
>> +
>>    	return devm_snd_soc_register_card(&pdev->dev, &hda_soc_card);
>>    }
>>    
>> diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
>> index 7dc0018dc4c3..92fffca76af5 100644
>> --- a/sound/soc/sof/intel/hda.c
>> +++ b/sound/soc/sof/intel/hda.c
>> @@ -351,7 +351,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
>>    	const char *tplg_filename;
>>    	const char *idisp_str;
>>    	const char *dmic_str;
>> -	int dmic_num;
>> +	int dmic_num = 0;
>>    	int codec_num = 0;
>>    	int i;
>>    #endif
>> @@ -465,6 +465,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
>>    		mach_params->codec_mask = bus->codec_mask;
>>    		mach_params->platform = dev_name(sdev->dev);
>>    		mach_params->common_hdmi_codec_drv = hda_codec_use_common_hdmi;
>> +		mach_params->dmic_num = dmic_num;
>>    	}
>>    
>>    	/* create codec instances */
>>


-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components
  2019-11-26 13:51   ` Jaroslav Kysela
@ 2019-11-26 14:57     ` Pierre-Louis Bossart
  2019-11-26 16:29     ` Mark Brown
  1 sibling, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2019-11-26 14:57 UTC (permalink / raw)
  To: Jaroslav Kysela, ALSA development; +Cc: Takashi Iwai, Mark Brown



On 11/26/19 7:51 AM, Jaroslav Kysela wrote:
> Dne 26. 11. 19 v 13:33 Pierre-Louis Bossart napsal(a):
>>
>>
>> On 11/26/19 4:34 AM, Jaroslav Kysela wrote:
>>> It is required for the auto-detection in the user space (for UCM).
>>>
>>> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
>>> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>>> Cc: Mark Brown <broonie@kernel.org>
>>
>> Thanks Jaroslav.
>> The changes are fine, but the code changes in hda.c will conflict with
>> the cleanups done by Ranjani (which I was planning to send next week).
>>
>> Any objections if we take this patch into the SOF tree (without changes
>> to authorship) and provide it on alsa-devel next week with the cleanups,
>> so that we don't have any conflicts?
> 
> I'm fine with that, if we don't miss the 5.5 merge window. Otherwise, 
> you may rebase your changes on top. Mark?

I just shared the changes, but I wasn't planning to see those changes in 
5.5 since they are quite big, so if you want this in 5.5 I'll rebase.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components
  2019-11-26 13:51   ` Jaroslav Kysela
  2019-11-26 14:57     ` Pierre-Louis Bossart
@ 2019-11-26 16:29     ` Mark Brown
  2019-11-28 14:28       ` Jaroslav Kysela
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Brown @ 2019-11-26 16:29 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Takashi Iwai, ALSA development, Pierre-Louis Bossart


[-- Attachment #1.1: Type: text/plain, Size: 516 bytes --]

On Tue, Nov 26, 2019 at 02:51:19PM +0100, Jaroslav Kysela wrote:
> Dne 26. 11. 19 v 13:33 Pierre-Louis Bossart napsal(a):

> > Any objections if we take this patch into the SOF tree (without changes
> > to authorship) and provide it on alsa-devel next week with the cleanups,
> > so that we don't have any conflicts?

> I'm fine with that, if we don't miss the 5.5 merge window. Otherwise, you
> may rebase your changes on top. Mark?

You've missed the merge window already - it was open before this patch
was sent.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components
  2019-11-26 16:29     ` Mark Brown
@ 2019-11-28 14:28       ` Jaroslav Kysela
  2019-11-28 17:59         ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Jaroslav Kysela @ 2019-11-28 14:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: Takashi Iwai, ALSA development, Pierre-Louis Bossart

Dne 26. 11. 19 v 17:29 Mark Brown napsal(a):
> On Tue, Nov 26, 2019 at 02:51:19PM +0100, Jaroslav Kysela wrote:
>> Dne 26. 11. 19 v 13:33 Pierre-Louis Bossart napsal(a):
> 
>>> Any objections if we take this patch into the SOF tree (without changes
>>> to authorship) and provide it on alsa-devel next week with the cleanups,
>>> so that we don't have any conflicts?
> 
>> I'm fine with that, if we don't miss the 5.5 merge window. Otherwise, you
>> may rebase your changes on top. Mark?
> 
> You've missed the merge window already - it was open before this patch
> was sent.

So, what now? Rebase on top of Pierre patches? You added another patches to 
your for-5.5 branch today.

I'd also merge the other two trivial component patches:

https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/thread.html#159158

				Thanks,
					Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components
  2019-11-28 14:28       ` Jaroslav Kysela
@ 2019-11-28 17:59         ` Mark Brown
  2019-11-28 18:03           ` Jaroslav Kysela
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2019-11-28 17:59 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Takashi Iwai, ALSA development, Pierre-Louis Bossart


[-- Attachment #1.1: Type: text/plain, Size: 629 bytes --]

On Thu, Nov 28, 2019 at 03:28:19PM +0100, Jaroslav Kysela wrote:
> Dne 26. 11. 19 v 17:29 Mark Brown napsal(a):

> > You've missed the merge window already - it was open before this patch
> > was sent.

> So, what now? Rebase on top of Pierre patches? You added another patches to
> your for-5.5 branch today.

Since Pierre seems happy with it even if he didn't ack it explicitly
I'll guess I'll apply it.  If git can figure out applying it after the
merge window and it doesn't get negative reviews there's no need to
resend.  If it can't and it doesn't turn up in a bigger series before
then I'll let you know.  

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components
  2019-11-28 17:59         ` Mark Brown
@ 2019-11-28 18:03           ` Jaroslav Kysela
  0 siblings, 0 replies; 8+ messages in thread
From: Jaroslav Kysela @ 2019-11-28 18:03 UTC (permalink / raw)
  To: Mark Brown; +Cc: Takashi Iwai, ALSA development, Pierre-Louis Bossart

Dne 28. 11. 19 v 18:59 Mark Brown napsal(a):
> On Thu, Nov 28, 2019 at 03:28:19PM +0100, Jaroslav Kysela wrote:
>> Dne 26. 11. 19 v 17:29 Mark Brown napsal(a):
> 
>>> You've missed the merge window already - it was open before this patch
>>> was sent.
> 
>> So, what now? Rebase on top of Pierre patches? You added another patches to
>> your for-5.5 branch today.
> 
> Since Pierre seems happy with it even if he didn't ack it explicitly
> I'll guess I'll apply it.  If git can figure out applying it after the
> merge window and it doesn't get negative reviews there's no need to
> resend.  If it can't and it doesn't turn up in a bigger series before
> then I'll let you know.
> 

Thank you Mark.

				Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-11-28 18:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 10:34 [alsa-devel] [PATCH] ASoC: intel/skl/hda - export number of digital microphones via control components Jaroslav Kysela
2019-11-26 12:33 ` Pierre-Louis Bossart
2019-11-26 13:51   ` Jaroslav Kysela
2019-11-26 14:57     ` Pierre-Louis Bossart
2019-11-26 16:29     ` Mark Brown
2019-11-28 14:28       ` Jaroslav Kysela
2019-11-28 17:59         ` Mark Brown
2019-11-28 18:03           ` Jaroslav Kysela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).