Skip to content

Commit 8184e1d

Browse files
jwrdegoedebroonie
authored andcommitted
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>
1 parent 4cd7654 commit 8184e1d

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

sound/soc/codecs/rt5645.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@ struct rt5645_platform_data {
428428
/* Invert HP detect status polarity */
429429
bool inv_hp_pol;
430430

431+
/* Only 1 speaker connected */
432+
bool mono_speaker;
433+
431434
/* Value to assign to snd_soc_card.long_name */
432435
const char *long_name;
433436

@@ -3653,6 +3656,7 @@ static const struct rt5645_platform_data buddy_platform_data = {
36533656
static const struct rt5645_platform_data gpd_win_platform_data = {
36543657
.jd_mode = 3,
36553658
.inv_jd1_1 = true,
3659+
.mono_speaker = true,
36563660
.long_name = "gpd-win-pocket-rt5645",
36573661
/* The GPD pocket has a diff. mic, for the win this does not matter. */
36583662
.in2_diff = true,
@@ -3676,6 +3680,11 @@ static const struct rt5645_platform_data lenovo_ideapad_miix_310_pdata = {
36763680
.in2_diff = true,
36773681
};
36783682

3683+
static const struct rt5645_platform_data jd_mode3_monospk_platform_data = {
3684+
.jd_mode = 3,
3685+
.mono_speaker = true,
3686+
};
3687+
36793688
static const struct rt5645_platform_data jd_mode3_platform_data = {
36803689
.jd_mode = 3,
36813690
};
@@ -3795,7 +3804,7 @@ static const struct dmi_system_id dmi_platform_data[] = {
37953804
DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
37963805
DMI_MATCH(DMI_PRODUCT_NAME, "X80 Pro"),
37973806
},
3798-
.driver_data = (void *)&jd_mode3_platform_data,
3807+
.driver_data = (void *)&jd_mode3_monospk_platform_data,
37993808
},
38003809
{
38013810
.ident = "Lenovo Ideapad Miix 310",
@@ -3911,6 +3920,9 @@ const char *rt5645_components(struct device *codec_dev)
39113920

39123921
rt5645_get_pdata(codec_dev, &pdata);
39133922

3923+
if (pdata.mono_speaker)
3924+
spk = 1;
3925+
39143926
if (pdata.dmic1_data_pin && pdata.dmic2_data_pin)
39153927
mic = "dmics12";
39163928
else if (pdata.dmic1_data_pin)

0 commit comments

Comments
 (0)