All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket
@ 2017-12-11 21:26 Hans de Goede
  2017-12-12 11:16 ` Applied "ASoC: rt5645: Set card long_name for GPD win / pocket" to the asoc tree Mark Brown
  2017-12-18 14:16 ` [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2017-12-11 21:26 UTC (permalink / raw)
  To: Mark Brown, Bard Liao, Oder Chiou; +Cc: Hans de Goede, alsa-devel, Takashi Iwai

The GPD win and pocket devices both use the same codec setup and both
have too generic dmi strings making snd_soc_set_dmi_name() not work.

As these devices have only a single speaker we want a separate ucm
file for them, which requires a unique long_name, use the existing
GPD quirk handling to also provide a unique long_name.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 include/sound/rt5645.h    | 3 +++
 sound/soc/codecs/rt5645.c | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/include/sound/rt5645.h b/include/sound/rt5645.h
index d0c33a9972b9..f218c742f08e 100644
--- a/include/sound/rt5645.h
+++ b/include/sound/rt5645.h
@@ -25,6 +25,9 @@ struct rt5645_platform_data {
 	bool level_trigger_irq;
 	/* Invert JD1_1 status polarity */
 	bool inv_jd1_1;
+
+	/* Value to asign to snd_soc_card.long_name */
+	const char *long_name;
 };
 
 #endif
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index f020d2d1eef4..5e34e24c01ab 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3394,6 +3394,9 @@ static int rt5645_probe(struct snd_soc_codec *codec)
 		snd_soc_dapm_sync(dapm);
 	}
 
+	if (rt5645->pdata.long_name)
+		codec->component.card->long_name = rt5645->pdata.long_name;
+
 	rt5645->eq_param = devm_kzalloc(codec->dev,
 		RT5645_HWEQ_NUM * sizeof(struct rt5645_eq_param_s), GFP_KERNEL);
 
@@ -3624,6 +3627,7 @@ static const struct dmi_system_id dmi_platform_intel_broadwell[] = {
 static const struct rt5645_platform_data gpd_win_platform_data = {
 	.jd_mode = 3,
 	.inv_jd1_1 = true,
+	.long_name = "gpd-win-pocket-rt5645",
 };
 
 static const struct dmi_system_id dmi_platform_gpd_win[] = {
-- 
2.14.3

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

* Applied "ASoC: rt5645: Set card long_name for GPD win / pocket" to the asoc tree
  2017-12-11 21:26 [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket Hans de Goede
@ 2017-12-12 11:16 ` Mark Brown
  2017-12-18 14:16 ` [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2017-12-12 11:16 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Oder Chiou, Bard Liao, alsa-devel, Mark Brown, Takashi Iwai

The patch

   ASoC: rt5645: Set card long_name for GPD win / pocket

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From aa9c387c2dc25597b730cd8386cac8ccfe75de07 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 11 Dec 2017 22:26:40 +0100
Subject: [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket

The GPD win and pocket devices both use the same codec setup and both
have too generic dmi strings making snd_soc_set_dmi_name() not work.

As these devices have only a single speaker we want a separate ucm
file for them, which requires a unique long_name, use the existing
GPD quirk handling to also provide a unique long_name.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/rt5645.h    | 3 +++
 sound/soc/codecs/rt5645.c | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/include/sound/rt5645.h b/include/sound/rt5645.h
index d0c33a9972b9..f218c742f08e 100644
--- a/include/sound/rt5645.h
+++ b/include/sound/rt5645.h
@@ -25,6 +25,9 @@ struct rt5645_platform_data {
 	bool level_trigger_irq;
 	/* Invert JD1_1 status polarity */
 	bool inv_jd1_1;
+
+	/* Value to asign to snd_soc_card.long_name */
+	const char *long_name;
 };
 
 #endif
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index fcd02c2c76f1..a1a7bb770745 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3394,6 +3394,9 @@ static int rt5645_probe(struct snd_soc_codec *codec)
 		snd_soc_dapm_sync(dapm);
 	}
 
+	if (rt5645->pdata.long_name)
+		codec->component.card->long_name = rt5645->pdata.long_name;
+
 	rt5645->eq_param = devm_kzalloc(codec->dev,
 		RT5645_HWEQ_NUM * sizeof(struct rt5645_eq_param_s), GFP_KERNEL);
 
@@ -3624,6 +3627,7 @@ static const struct dmi_system_id dmi_platform_intel_broadwell[] = {
 static const struct rt5645_platform_data gpd_win_platform_data = {
 	.jd_mode = 3,
 	.inv_jd1_1 = true,
+	.long_name = "gpd-win-pocket-rt5645",
 };
 
 static const struct dmi_system_id dmi_platform_gpd_win[] = {
-- 
2.15.1

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

* Re: [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket
  2017-12-11 21:26 [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket Hans de Goede
  2017-12-12 11:16 ` Applied "ASoC: rt5645: Set card long_name for GPD win / pocket" to the asoc tree Mark Brown
@ 2017-12-18 14:16 ` Takashi Iwai
  2017-12-24 10:45   ` Hans de Goede
  1 sibling, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2017-12-18 14:16 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Oder Chiou, Bard Liao, alsa-devel, Mark Brown, Takashi Iwai

On Mon, 11 Dec 2017 22:26:40 +0100,
Hans de Goede wrote:
> 
> The GPD win and pocket devices both use the same codec setup and both
> have too generic dmi strings making snd_soc_set_dmi_name() not work.
> 
> As these devices have only a single speaker we want a separate ucm
> file for them, which requires a unique long_name, use the existing
> GPD quirk handling to also provide a unique long_name.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Since Mark already took this patch, could you provide the UCM profile
for the corresponding update, too?


thanks,

Takashi

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

* Re: [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket
  2017-12-18 14:16 ` [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket Takashi Iwai
@ 2017-12-24 10:45   ` Hans de Goede
  0 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2017-12-24 10:45 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Oder Chiou, Bard Liao, alsa-devel, Mark Brown, Takashi Iwai

Hi,

On 18-12-17 15:16, Takashi Iwai wrote:
> On Mon, 11 Dec 2017 22:26:40 +0100,
> Hans de Goede wrote:
>>
>> The GPD win and pocket devices both use the same codec setup and both
>> have too generic dmi strings making snd_soc_set_dmi_name() not work.
>>
>> As these devices have only a single speaker we want a separate ucm
>> file for them, which requires a unique long_name, use the existing
>> GPD quirk handling to also provide a unique long_name.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> Since Mark already took this patch, could you provide the UCM profile
> for the corresponding update, too?

I've been trying to get the analog microphone input on these devices
to work, so that I can submit a complete UCM profile in one go.

But all my attempts have failed, I've send Bard Liao a mail about this,
with alsa-devel in the Cc. I hope Bard can help me to get the microphone
to work. If that fails / take to long I will submit a version with
just the monospeaker routing in a couple of weeks.

Regards,

Hans

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

end of thread, other threads:[~2017-12-24 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11 21:26 [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket Hans de Goede
2017-12-12 11:16 ` Applied "ASoC: rt5645: Set card long_name for GPD win / pocket" to the asoc tree Mark Brown
2017-12-18 14:16 ` [PATCH] ASoC: rt5645: Set card long_name for GPD win / pocket Takashi Iwai
2017-12-24 10:45   ` Hans de Goede

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.