All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Oder Chiou <oder_chiou@realtek.com>,
	alsa-devel@alsa-project.org
Subject: [PATCH 6/7] ASoC: rt5645: Add mono speaker information to the components string
Date: Sun, 26 Nov 2023 22:40:23 +0100	[thread overview]
Message-ID: <20231126214024.300505-7-hdegoede@redhat.com> (raw)
In-Reply-To: <20231126214024.300505-1-hdegoede@redhat.com>

The GPD Win and Teclast X80 Pro both only have 1 speaker add information
about this to the components string.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/codecs/rt5645.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 4f3ef004f555..e109ee2e321c 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -428,6 +428,9 @@ struct rt5645_platform_data {
 	/* Invert HP detect status polarity */
 	bool inv_hp_pol;
 
+	/* Only 1 speaker connected */
+	bool mono_speaker;
+
 	/* Value to assign to snd_soc_card.long_name */
 	const char *long_name;
 
@@ -3653,6 +3656,7 @@ static const struct rt5645_platform_data buddy_platform_data = {
 static const struct rt5645_platform_data gpd_win_platform_data = {
 	.jd_mode = 3,
 	.inv_jd1_1 = true,
+	.mono_speaker = true,
 	.long_name = "gpd-win-pocket-rt5645",
 	/* The GPD pocket has a diff. mic, for the win this does not matter. */
 	.in2_diff = true,
@@ -3676,6 +3680,11 @@ static const struct rt5645_platform_data lenovo_ideapad_miix_310_pdata = {
 	.in2_diff = true,
 };
 
+static const struct rt5645_platform_data jd_mode3_monospk_platform_data = {
+	.jd_mode = 3,
+	.mono_speaker = true,
+};
+
 static const struct rt5645_platform_data jd_mode3_platform_data = {
 	.jd_mode = 3,
 };
@@ -3795,7 +3804,7 @@ static const struct dmi_system_id dmi_platform_data[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "X80 Pro"),
 		},
-		.driver_data = (void *)&jd_mode3_platform_data,
+		.driver_data = (void *)&jd_mode3_monospk_platform_data,
 	},
 	{
 		.ident = "Lenovo Ideapad Miix 310",
@@ -3911,6 +3920,9 @@ const char *rt5645_components(struct device *codec_dev)
 
 	rt5645_get_pdata(codec_dev, &pdata);
 
+	if (pdata.mono_speaker)
+		spk = 1;
+
 	if (pdata.dmic1_data_pin && pdata.dmic2_data_pin)
 		mic = "dmics12";
 	else if (pdata.dmic1_data_pin)
-- 
2.41.0


  parent reply	other threads:[~2023-11-26 21:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26 21:40 [PATCH 0/7] ASoC: rt5645: Add Acer Switch V 10 quirk + report quirks in components string Hans de Goede
2023-11-26 21:40 ` [PATCH 1/7] ASoC: rt5645: Drop double EF20 entry from dmi_platform_data[] Hans de Goede
2023-11-26 21:40 ` [PATCH 2/7] ASoC: rt5645: Add platform-data for Acer Switch V 10 Hans de Goede
2023-11-26 21:40 ` [PATCH 3/7] ASoC: rt5645: Refactor rt5645_parse_dt() Hans de Goede
2023-11-26 21:40 ` [PATCH 4/7] ASoC: rt5645: Add rt5645_get_pdata() helper Hans de Goede
2023-11-26 21:40 ` [PATCH 5/7] ASoC: rt5645: Add a rt5645_components() helper Hans de Goede
2023-11-26 21:40 ` Hans de Goede [this message]
2023-11-26 21:40 ` [PATCH 7/7] ASoC: Intel: cht_bsw_rt5645: Set card.components string Hans de Goede
2023-12-22 13:29 ` [PATCH 0/7] ASoC: rt5645: Add Acer Switch V 10 quirk + report quirks in components string Mark Brown

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=20231126214024.300505-7-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.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.