summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-11-26 22:40:23 +0100
committerMark Brown <broonie@kernel.org>2023-12-21 22:00:47 +0100
commit8184e1db699befc5101bcfe401283becfc228a0b (patch)
treef1b853f62e77edb09966eaa07ef95fe9c93ecdb9 /sound
parentASoC: rt5645: Add a rt5645_components() helper (diff)
downloadlinux-8184e1db699befc5101bcfe401283becfc228a0b.tar.xz
linux-8184e1db699befc5101bcfe401283becfc228a0b.zip
ASoC: rt5645: Add mono speaker information to the components string
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> Link: https://msgid.link/r/20231126214024.300505-7-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rt5645.c14
1 files changed, 13 insertions, 1 deletions
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)