Commit 8184e1db authored by Hans de Goede's avatar Hans de Goede Committed by Mark Brown

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: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20231126214024.300505-7-hdegoede@redhat.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4cd76545
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment