* [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346
@ 2023-12-17 21:32 Hans de Goede
2023-12-17 21:32 ` [PATCH 2/2] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk Hans de Goede
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Hans de Goede @ 2023-12-17 21:32 UTC (permalink / raw)
To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Mark Brown
Cc: Hans de Goede, alsa-devel
Add a quirk for the Medion Lifetab S10346, this BYTCR tablet has no CHAN
package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which
is the default for BYTCR devices.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index ed14d9e4aa53..ea9e562358b7 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -894,6 +894,18 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
BYT_RT5640_SSP0_AIF1 |
BYT_RT5640_MCLK_EN),
},
+ {
+ /* Medion Lifetab S10346 */
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
+ DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
+ /* Above strings are much too generic, also match on BIOS date */
+ DMI_MATCH(DMI_BIOS_DATE, "10/22/2015"),
+ },
+ .driver_data = (void *)(BYTCR_INPUT_DEFAULTS |
+ BYT_RT5640_SSP0_AIF1 |
+ BYT_RT5640_MCLK_EN),
+ },
{ /* Mele PCG03 Mini PC */
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Mini PC"),
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk
2023-12-17 21:32 [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346 Hans de Goede
@ 2023-12-17 21:32 ` Hans de Goede
2023-12-18 9:41 ` Pierre-Louis Bossart
2023-12-18 9:40 ` [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346 Pierre-Louis Bossart
2023-12-18 23:13 ` Mark Brown
2 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2023-12-17 21:32 UTC (permalink / raw)
To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Mark Brown
Cc: Hans de Goede, alsa-devel
Some BYTCR x86 tablets with a rt5640 codec have the left and right channels
of their speakers swapped.
Add a new BYT_RT5640_SWAPPED_SPEAKERS quirk for this which sets
cfg-spk:swapped in the components string to let userspace know
about the swapping so that the UCM profile can configure the mixer
to correct this.
Enable this new quirk on the Medion Lifetab S10346 which has its
speakers swapped.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
sound/soc/intel/boards/bytcr_rt5640.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index ea9e562358b7..42466b4b1ca4 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -83,6 +83,7 @@ enum {
#define BYT_RT5640_HSMIC2_ON_IN1 BIT(27)
#define BYT_RT5640_JD_HP_ELITEP_1000G2 BIT(28)
#define BYT_RT5640_USE_AMCR0F28 BIT(29)
+#define BYT_RT5640_SWAPPED_SPEAKERS BIT(30)
#define BYTCR_INPUT_DEFAULTS \
(BYT_RT5640_IN3_MAP | \
@@ -157,6 +158,8 @@ static void log_quirks(struct device *dev)
dev_info(dev, "quirk MONO_SPEAKER enabled\n");
if (byt_rt5640_quirk & BYT_RT5640_NO_SPEAKERS)
dev_info(dev, "quirk NO_SPEAKERS enabled\n");
+ if (byt_rt5640_quirk & BYT_RT5640_SWAPPED_SPEAKERS)
+ dev_info(dev, "quirk SWAPPED_SPEAKERS enabled\n");
if (byt_rt5640_quirk & BYT_RT5640_LINEOUT)
dev_info(dev, "quirk LINEOUT enabled\n");
if (byt_rt5640_quirk & BYT_RT5640_LINEOUT_AS_HP2)
@@ -903,6 +906,7 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
DMI_MATCH(DMI_BIOS_DATE, "10/22/2015"),
},
.driver_data = (void *)(BYTCR_INPUT_DEFAULTS |
+ BYT_RT5640_SWAPPED_SPEAKERS |
BYT_RT5640_SSP0_AIF1 |
BYT_RT5640_MCLK_EN),
},
@@ -1631,11 +1635,11 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
const char *platform_name;
struct acpi_device *adev;
struct device *codec_dev;
+ const char *cfg_spk;
bool sof_parent;
int ret_val = 0;
int dai_index = 0;
- int i, cfg_spk;
- int aif;
+ int i, aif;
is_bytcr = false;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -1795,13 +1799,16 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
}
if (byt_rt5640_quirk & BYT_RT5640_NO_SPEAKERS) {
- cfg_spk = 0;
+ cfg_spk = "0";
spk_type = "none";
} else if (byt_rt5640_quirk & BYT_RT5640_MONO_SPEAKER) {
- cfg_spk = 1;
+ cfg_spk = "1";
spk_type = "mono";
+ } else if (byt_rt5640_quirk & BYT_RT5640_SWAPPED_SPEAKERS) {
+ cfg_spk = "swapped";
+ spk_type = "swapped";
} else {
- cfg_spk = 2;
+ cfg_spk = "2";
spk_type = "stereo";
}
@@ -1816,7 +1823,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
headset2_string = " cfg-hs2:in1";
snprintf(byt_rt5640_components, sizeof(byt_rt5640_components),
- "cfg-spk:%d cfg-mic:%s aif:%d%s%s", cfg_spk,
+ "cfg-spk:%s cfg-mic:%s aif:%d%s%s", cfg_spk,
map_name[BYT_RT5640_MAP(byt_rt5640_quirk)], aif,
lineout_string, headset2_string);
byt_rt5640_card.components = byt_rt5640_components;
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346
2023-12-17 21:32 [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346 Hans de Goede
2023-12-17 21:32 ` [PATCH 2/2] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk Hans de Goede
@ 2023-12-18 9:40 ` Pierre-Louis Bossart
2023-12-18 23:13 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2023-12-18 9:40 UTC (permalink / raw)
To: Hans de Goede, Cezary Rojewski, Liam Girdwood, Peter Ujfalusi,
Mark Brown
Cc: alsa-devel
On 12/17/23 15:32, Hans de Goede wrote:
> Add a quirk for the Medion Lifetab S10346, this BYTCR tablet has no CHAN
> package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which
> is the default for BYTCR devices.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++++++++++
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk
2023-12-17 21:32 ` [PATCH 2/2] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk Hans de Goede
@ 2023-12-18 9:41 ` Pierre-Louis Bossart
0 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2023-12-18 9:41 UTC (permalink / raw)
To: Hans de Goede, Cezary Rojewski, Liam Girdwood, Peter Ujfalusi,
Mark Brown
Cc: alsa-devel
On 12/17/23 15:32, Hans de Goede wrote:
> Some BYTCR x86 tablets with a rt5640 codec have the left and right channels
> of their speakers swapped.
>
> Add a new BYT_RT5640_SWAPPED_SPEAKERS quirk for this which sets
> cfg-spk:swapped in the components string to let userspace know
> about the swapping so that the UCM profile can configure the mixer
> to correct this.
>
> Enable this new quirk on the Medion Lifetab S10346 which has its
> speakers swapped.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346
2023-12-17 21:32 [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346 Hans de Goede
2023-12-17 21:32 ` [PATCH 2/2] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk Hans de Goede
2023-12-18 9:40 ` [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346 Pierre-Louis Bossart
@ 2023-12-18 23:13 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-12-18 23:13 UTC (permalink / raw)
To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Hans de Goede
Cc: alsa-devel
On Sun, 17 Dec 2023 22:32:20 +0100, Hans de Goede wrote:
> Add a quirk for the Medion Lifetab S10346, this BYTCR tablet has no CHAN
> package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which
> is the default for BYTCR devices.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346
commit: 99c7bb44f5749373bc01b73af02b50b69bcbf43d
[2/2] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk
commit: b1b6131bca35a55a69fadc39d51577968fa2ee97
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-18 23:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-17 21:32 [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346 Hans de Goede
2023-12-17 21:32 ` [PATCH 2/2] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk Hans de Goede
2023-12-18 9:41 ` Pierre-Louis Bossart
2023-12-18 9:40 ` [PATCH 1/2] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346 Pierre-Louis Bossart
2023-12-18 23:13 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox