2020-05-01 09:58:50 -05:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
// Copyright (c) 2020 Intel Corporation
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sof_sdw - ASOC Machine driver for Intel SoundWire platforms
|
|
|
|
*/
|
|
|
|
|
2024-08-19 08:55:46 +08:00
|
|
|
#include <linux/acpi.h>
|
2024-03-26 11:04:04 -05:00
|
|
|
#include <linux/bitmap.h>
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/dmi.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/soundwire/sdw.h>
|
|
|
|
#include <linux/soundwire/sdw_type.h>
|
2024-08-19 08:55:46 +08:00
|
|
|
#include <linux/soundwire/sdw_intel.h>
|
2025-02-04 13:39:41 +08:00
|
|
|
#include <sound/core.h>
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
#include <sound/soc-acpi.h>
|
|
|
|
#include "sof_sdw_common.h"
|
2021-07-12 15:32:39 -05:00
|
|
|
#include "../../codecs/rt711.h"
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-08-27 20:31:59 +08:00
|
|
|
static unsigned long sof_sdw_quirk = RT711_JD1;
|
2020-06-25 14:12:56 -05:00
|
|
|
static int quirk_override = -1;
|
|
|
|
module_param_named(quirk, quirk_override, int, 0444);
|
|
|
|
MODULE_PARM_DESC(quirk, "Board-specific quirk override");
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-12-06 15:58:54 +08:00
|
|
|
#define DMIC_DEFAULT_CHANNELS 2
|
|
|
|
|
2020-06-25 14:12:56 -05:00
|
|
|
static void log_quirks(struct device *dev)
|
|
|
|
{
|
2024-08-01 14:44:17 +05:30
|
|
|
if (SOC_SDW_JACK_JDSRC(sof_sdw_quirk))
|
2020-06-25 14:12:56 -05:00
|
|
|
dev_dbg(dev, "quirk realtek,jack-detect-source %ld\n",
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_JACK_JDSRC(sof_sdw_quirk));
|
|
|
|
if (sof_sdw_quirk & SOC_SDW_FOUR_SPK)
|
|
|
|
dev_err(dev, "quirk SOC_SDW_FOUR_SPK enabled but no longer supported\n");
|
2020-06-25 14:12:56 -05:00
|
|
|
if (sof_sdw_quirk & SOF_SDW_TGL_HDMI)
|
|
|
|
dev_dbg(dev, "quirk SOF_SDW_TGL_HDMI enabled\n");
|
2024-08-01 14:44:17 +05:30
|
|
|
if (sof_sdw_quirk & SOC_SDW_PCH_DMIC)
|
|
|
|
dev_dbg(dev, "quirk SOC_SDW_PCH_DMIC enabled\n");
|
2020-06-25 14:12:56 -05:00
|
|
|
if (SOF_SSP_GET_PORT(sof_sdw_quirk))
|
|
|
|
dev_dbg(dev, "SSP port %ld\n",
|
|
|
|
SOF_SSP_GET_PORT(sof_sdw_quirk));
|
2024-08-01 14:44:17 +05:30
|
|
|
if (sof_sdw_quirk & SOC_SDW_NO_AGGREGATION)
|
|
|
|
dev_err(dev, "quirk SOC_SDW_NO_AGGREGATION enabled but no longer supported\n");
|
|
|
|
if (sof_sdw_quirk & SOC_SDW_CODEC_SPKR)
|
|
|
|
dev_dbg(dev, "quirk SOC_SDW_CODEC_SPKR enabled\n");
|
|
|
|
if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS)
|
|
|
|
dev_dbg(dev, "quirk SOC_SDW_SIDECAR_AMPS enabled\n");
|
2024-12-06 15:58:58 +08:00
|
|
|
if (sof_sdw_quirk & SOC_SDW_CODEC_MIC)
|
|
|
|
dev_dbg(dev, "quirk SOC_SDW_CODEC_MIC enabled\n");
|
2020-06-25 14:12:56 -05:00
|
|
|
}
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
static int sof_sdw_quirk_cb(const struct dmi_system_id *id)
|
|
|
|
{
|
|
|
|
sof_sdw_quirk = (unsigned long)id->driver_data;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct dmi_system_id sof_sdw_quirk_table[] = {
|
2021-02-08 17:33:26 -06:00
|
|
|
/* CometLake devices */
|
2020-11-11 15:43:15 -06:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
2021-02-08 17:33:26 -06:00
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "CometLake Client"),
|
2021-01-25 10:11:17 +02:00
|
|
|
},
|
2024-08-01 14:44:17 +05:30
|
|
|
.driver_data = (void *)SOC_SDW_PCH_DMIC,
|
2021-01-25 10:11:17 +02:00
|
|
|
},
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "09C6")
|
|
|
|
},
|
2021-10-27 10:18:21 +08:00
|
|
|
.driver_data = (void *)RT711_JD2,
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
/* early version of SKU 09C6 */
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0983")
|
|
|
|
},
|
2021-10-27 10:18:21 +08:00
|
|
|
.driver_data = (void *)RT711_JD2,
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "098F"),
|
|
|
|
},
|
2024-04-11 17:03:40 -05:00
|
|
|
.driver_data = (void *)(RT711_JD2),
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
2021-02-08 17:33:26 -06:00
|
|
|
{
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0990"),
|
|
|
|
},
|
2024-04-11 17:03:40 -05:00
|
|
|
.driver_data = (void *)(RT711_JD2),
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
2021-02-08 17:33:26 -06:00
|
|
|
/* IceLake devices */
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client"),
|
|
|
|
},
|
2024-08-01 14:44:17 +05:30
|
|
|
.driver_data = (void *)SOC_SDW_PCH_DMIC,
|
2021-02-08 17:33:26 -06:00
|
|
|
},
|
|
|
|
/* TigerLake devices */
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME,
|
|
|
|
"Tiger Lake Client Platform"),
|
|
|
|
},
|
2021-02-08 17:33:27 -06:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2021-07-12 15:32:39 -05:00
|
|
|
RT711_JD1 |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
2021-02-08 17:33:27 -06:00
|
|
|
SOF_SSP_PORT(SOF_I2S_SSP2)),
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
2021-02-08 17:33:26 -06:00
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A3E")
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
2021-02-08 17:33:26 -06:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2021-10-27 10:18:21 +08:00
|
|
|
RT711_JD2),
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
2021-10-27 10:18:17 +08:00
|
|
|
{
|
|
|
|
/* another SKU of Dell Latitude 9520 */
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A3F")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2021-10-27 10:18:21 +08:00
|
|
|
RT711_JD2),
|
2021-10-27 10:18:17 +08:00
|
|
|
},
|
2021-08-02 10:21:48 -05:00
|
|
|
{
|
|
|
|
/* Dell XPS 9710 */
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5D")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2021-08-02 10:21:48 -05:00
|
|
|
},
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
2021-02-08 17:33:26 -06:00
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5E")
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
2021-02-08 17:33:26 -06:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
},
|
2020-03-25 17:07:46 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Volteer"),
|
|
|
|
},
|
2021-02-08 17:33:27 -06:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
2021-05-05 11:36:59 -05:00
|
|
|
SOF_BT_OFFLOAD_SSP(2) |
|
|
|
|
SOF_SSP_BT_OFFLOAD_PRESENT),
|
2020-03-25 17:07:46 -05:00
|
|
|
},
|
2020-08-21 14:55:58 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Ripto"),
|
|
|
|
},
|
2021-02-08 17:33:27 -06:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC),
|
2020-08-21 14:55:58 -05:00
|
|
|
},
|
2021-02-08 17:33:28 -06:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* this entry covers multiple HP SKUs. The family name
|
|
|
|
* does not seem robust enough, so we use a partial
|
|
|
|
* match that ignores the product name suffix
|
|
|
|
* (e.g. 15-eb1xxx, 14t-ea000 or 13-aw2xxx)
|
|
|
|
*/
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
2022-03-04 14:45:32 -06:00
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "HP Spectre x360 Conv"),
|
2021-02-08 17:33:28 -06:00
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
ASoC: Intel: sof_sdw: fix jack detection on HP Spectre x360 convertible
Tests on device show the JD2 mode does not work at all, the 'Headphone
Jack' and 'Headset Mic Jack' are shown as 'on' always.
JD1 seems to be the better option, with at least a change between the
two cases.
Jack not plugged-in:
[root@fedora ~]# amixer -Dhw:0 cget numid=12
numid=12,iface=CARD,name='Headphone Jack'
; type=BOOLEAN,access=r-------,values=1
: values=off
[root@fedora ~]# amixer -Dhw:0 cget numid=13
numid=13,iface=CARD,name='Headset Mic Jack'
; type=BOOLEAN,access=r-------,values=1
: values=off
Jack plugged-in:
[root@fedora ~]# amixer -Dhw:0 cget numid=13
numid=13,iface=CARD,name='Headset Mic Jack'
; type=BOOLEAN,access=r-------,values=1
: values=on
[root@fedora ~]# amixer -Dhw:0 cget numid=13
numid=13,iface=CARD,name='Headset Mic Jack'
; type=BOOLEAN,access=r-------,values=1
: values=on
The 'Headset Mic Jack' is updated with a delay which seems normal with
additional calibration needed.
Fixes: d92e279dee56 ('ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20211027021824.24776-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-27 10:18:16 +08:00
|
|
|
RT711_JD1),
|
2023-05-12 12:33:03 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* this entry covers HP Spectre x360 where the DMI information
|
|
|
|
* changed somehow
|
|
|
|
*/
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "8709"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
2023-05-12 12:33:03 -05:00
|
|
|
RT711_JD1),
|
2021-02-08 17:33:28 -06:00
|
|
|
},
|
2021-07-19 18:32:48 -05:00
|
|
|
{
|
|
|
|
/* NUC15 'Bishop County' LAPBC510 and LAPBC710 skews */
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel(R) Client Systems"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "LAPBC"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
2021-07-19 18:32:48 -05:00
|
|
|
RT711_JD1),
|
|
|
|
},
|
2022-10-17 15:40:54 -05:00
|
|
|
{
|
|
|
|
/* NUC15 LAPBC710 skews */
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "LAPBC710"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
2022-10-17 15:40:54 -05:00
|
|
|
RT711_JD1),
|
|
|
|
},
|
2023-03-14 17:05:52 +08:00
|
|
|
{
|
|
|
|
/* NUC15 'Rooks County' LAPRC510 and LAPRC710 skews */
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel(R) Client Systems"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "LAPRC"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
2023-03-14 17:05:52 +08:00
|
|
|
RT711_JD2_100K),
|
|
|
|
},
|
2024-02-08 10:55:40 -06:00
|
|
|
{
|
|
|
|
/* NUC15 LAPRC710 skews */
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "LAPRC710"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
2024-02-08 10:55:40 -06:00
|
|
|
RT711_JD2_100K),
|
|
|
|
},
|
2021-02-08 17:33:26 -06:00
|
|
|
/* TigerLake-SDCA devices */
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A32")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2021-02-08 17:33:26 -06:00
|
|
|
},
|
2021-10-04 16:35:12 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A45")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2021-10-27 10:18:21 +08:00
|
|
|
RT711_JD2),
|
2021-10-04 16:35:12 -05:00
|
|
|
},
|
2021-04-15 12:50:09 -05:00
|
|
|
/* AlderLake devices */
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Alder Lake Client Platform"),
|
|
|
|
},
|
2021-07-12 15:32:40 -05:00
|
|
|
.driver_data = (void *)(RT711_JD2_100K |
|
2021-04-15 12:50:09 -05:00
|
|
|
SOF_SDW_TGL_HDMI |
|
2021-05-21 18:56:32 +03:00
|
|
|
SOF_BT_OFFLOAD_SSP(2) |
|
|
|
|
SOF_SSP_BT_OFFLOAD_PRESENT),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
2024-06-24 14:11:16 +02:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_SKU, "0000000000070000"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
|
|
|
RT711_JD2_100K),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
2021-05-21 18:56:32 +03:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Brya"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-08-01 14:44:17 +05:30
|
|
|
SOC_SDW_PCH_DMIC |
|
2021-05-21 18:56:32 +03:00
|
|
|
SOF_BT_OFFLOAD_SSP(2) |
|
|
|
|
SOF_SSP_BT_OFFLOAD_PRESENT),
|
2021-04-15 12:50:09 -05:00
|
|
|
},
|
2022-07-25 14:49:00 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0AF0")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2022-07-25 14:49:00 -05:00
|
|
|
},
|
2021-11-05 10:26:38 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0AF3"),
|
|
|
|
},
|
|
|
|
/* No Jack */
|
2024-04-11 17:03:40 -05:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI),
|
2021-11-05 10:26:38 +08:00
|
|
|
},
|
2023-07-31 16:42:42 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0AFE")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2023-07-31 16:42:42 -05:00
|
|
|
},
|
2022-09-19 13:46:40 +02:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0AFF")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2022-09-19 13:46:40 +02:00
|
|
|
},
|
2021-11-05 10:26:40 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B00")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2021-11-05 10:26:40 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B01")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2021-11-05 10:26:40 +08:00
|
|
|
},
|
2021-11-05 10:26:41 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B11")
|
|
|
|
},
|
2021-11-05 10:26:46 +08:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2021-11-05 10:26:46 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B12")
|
|
|
|
},
|
2021-11-05 10:26:41 +08:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2021-11-05 10:26:41 +08:00
|
|
|
},
|
2021-11-05 10:26:42 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B13"),
|
|
|
|
},
|
|
|
|
/* No Jack */
|
|
|
|
.driver_data = (void *)SOF_SDW_TGL_HDMI,
|
|
|
|
},
|
2023-09-19 17:21:25 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B14"),
|
|
|
|
},
|
|
|
|
/* No Jack */
|
|
|
|
.driver_data = (void *)SOF_SDW_TGL_HDMI,
|
|
|
|
},
|
|
|
|
|
2021-11-05 10:26:44 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B29"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2021-11-05 10:26:44 +08:00
|
|
|
},
|
2023-06-02 15:22:15 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B34"),
|
|
|
|
},
|
|
|
|
/* No Jack */
|
|
|
|
.driver_data = (void *)SOF_SDW_TGL_HDMI,
|
|
|
|
},
|
2024-06-24 14:11:18 +02:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B8C"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
|
|
|
RT711_JD2),
|
|
|
|
},
|
2022-07-15 09:41:43 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
2023-10-12 15:08:04 -04:00
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "OMEN by HP Gaming Laptop 16"),
|
2022-07-15 09:41:43 -05:00
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
|
|
|
RT711_JD2),
|
|
|
|
},
|
2022-11-10 16:54:28 -06:00
|
|
|
/* RaptorLake devices */
|
2023-06-02 15:22:13 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0BDA")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2023-06-02 15:22:13 -05:00
|
|
|
},
|
2024-04-11 17:03:39 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0C0F")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-26 10:21:20 -05:00
|
|
|
RT711_JD2),
|
2024-04-11 17:03:39 -05:00
|
|
|
},
|
2022-11-10 16:54:28 -06:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0C10"),
|
|
|
|
},
|
|
|
|
/* No Jack */
|
2024-04-11 17:03:40 -05:00
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI),
|
2022-11-10 16:54:28 -06:00
|
|
|
},
|
2022-11-17 08:27:57 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0C11")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2022-11-17 08:27:57 +08:00
|
|
|
},
|
2022-11-10 16:54:30 -06:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0C40")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2022-11-10 16:54:30 -06:00
|
|
|
},
|
2022-11-22 13:20:52 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0C4F")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
|
2024-04-11 17:03:40 -05:00
|
|
|
RT711_JD2),
|
2022-11-22 13:20:52 +08:00
|
|
|
},
|
2024-11-05 19:10:56 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF6")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-08-27 20:32:15 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF9")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-11-05 19:10:56 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CFA")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2022-06-10 16:44:15 -05:00
|
|
|
/* MeteorLake devices */
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_mtlrvp"),
|
|
|
|
},
|
2023-05-12 12:32:59 -05:00
|
|
|
.driver_data = (void *)(RT711_JD1),
|
2022-06-10 16:44:15 -05:00
|
|
|
},
|
2023-05-12 12:33:00 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Meteor Lake Client Platform"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(RT711_JD2_100K),
|
|
|
|
},
|
2023-06-02 15:22:24 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Rex"),
|
|
|
|
},
|
2024-08-01 14:44:17 +05:30
|
|
|
.driver_data = (void *)(SOC_SDW_PCH_DMIC |
|
2023-07-31 16:42:38 -05:00
|
|
|
SOF_BT_OFFLOAD_SSP(1) |
|
|
|
|
SOF_SSP_BT_OFFLOAD_PRESENT),
|
2023-06-02 15:22:24 -05:00
|
|
|
},
|
2024-04-11 17:03:38 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "OMEN Transcend Gaming Laptop"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(RT711_JD2),
|
|
|
|
},
|
|
|
|
|
2023-05-12 12:33:05 -05:00
|
|
|
/* LunarLake devices */
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Lunar Lake Client Platform"),
|
|
|
|
},
|
2023-08-07 16:50:00 -05:00
|
|
|
.driver_data = (void *)(RT711_JD2),
|
2023-05-12 12:33:05 -05:00
|
|
|
},
|
2024-05-27 14:35:44 -05:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CE3")
|
|
|
|
},
|
2024-08-01 14:44:17 +05:30
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS),
|
2024-05-27 14:35:44 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CE4")
|
|
|
|
},
|
2024-08-01 14:44:17 +05:30
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS),
|
2024-05-27 14:35:44 -05:00
|
|
|
},
|
2024-08-27 20:32:15 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CDB")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CDC")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CDD")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-11-05 19:10:56 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0D36")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-08-27 20:32:15 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF8")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-10-16 11:03:44 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
2025-01-02 20:33:35 +08:00
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "83JX")
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
2025-01-02 20:33:35 +08:00
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
2025-01-02 20:33:34 +08:00
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "83LC")
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
2025-01-02 20:33:34 +08:00
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
2025-01-02 20:33:35 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "83MC")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
|
|
|
|
}, {
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "83NM")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
|
|
|
|
},
|
2024-10-16 11:03:44 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
2024-12-06 15:58:57 +08:00
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "83HM")
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
2024-12-06 15:58:57 +08:00
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS |
|
|
|
|
SOC_SDW_CODEC_MIC),
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
2024-10-16 11:03:43 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
2024-12-16 22:08:21 +08:00
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "21QB")
|
2024-10-16 11:03:43 +08:00
|
|
|
},
|
|
|
|
/* Note this quirk excludes the CODEC mic */
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_MIC),
|
|
|
|
},
|
2024-10-16 11:03:44 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
2024-12-16 22:08:21 +08:00
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "21QA")
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
2024-10-16 11:03:43 +08:00
|
|
|
/* Note this quirk excludes the CODEC mic */
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_MIC),
|
|
|
|
},
|
2024-10-16 11:03:44 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
2024-12-16 22:08:20 +08:00
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "21Q6")
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
2024-12-16 22:08:20 +08:00
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "21Q7")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
|
2024-10-16 11:03:44 +08:00
|
|
|
},
|
2024-08-27 20:32:15 +08:00
|
|
|
|
|
|
|
/* ArrowLake devices */
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CE8")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-11-11 15:06:18 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF1")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-08-27 20:32:15 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF7")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-10-28 15:26:30 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF0")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-11-05 19:10:56 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF3")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF4")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF5")
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
|
|
|
|
},
|
2024-10-07 15:59:53 +08:00
|
|
|
/* Pantherlake devices*/
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_ptlrvp"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_PCH_DMIC),
|
|
|
|
},
|
2025-02-04 13:39:43 +08:00
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Fatcat"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_PCH_DMIC |
|
|
|
|
SOF_BT_OFFLOAD_SSP(2) |
|
|
|
|
SOF_SSP_BT_OFFLOAD_PRESENT),
|
|
|
|
},
|
2025-05-21 11:48:40 +08:00
|
|
|
/* Wildcatlake devices*/
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_wclrvp"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_PCH_DMIC),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = sof_sdw_quirk_cb,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Ocelot"),
|
|
|
|
},
|
|
|
|
.driver_data = (void *)(SOC_SDW_PCH_DMIC |
|
|
|
|
SOF_BT_OFFLOAD_SSP(2) |
|
|
|
|
SOF_SSP_BT_OFFLOAD_PRESENT),
|
|
|
|
},
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
2025-02-04 13:39:41 +08:00
|
|
|
static const struct snd_pci_quirk sof_sdw_ssid_quirk_table[] = {
|
2025-02-04 13:39:42 +08:00
|
|
|
SND_PCI_QUIRK(0x1043, 0x1e13, "ASUS Zenbook S14", SOC_SDW_CODEC_MIC),
|
2025-04-04 16:32:13 +03:00
|
|
|
SND_PCI_QUIRK(0x1043, 0x1f43, "ASUS Zenbook S16", SOC_SDW_CODEC_MIC),
|
2025-07-02 11:22:35 +00:00
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2347, "Lenovo P16", SOC_SDW_CODEC_MIC),
|
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2348, "Lenovo P16", SOC_SDW_CODEC_MIC),
|
|
|
|
SND_PCI_QUIRK(0x17aa, 0x2349, "Lenovo P1", SOC_SDW_CODEC_MIC),
|
2025-02-04 13:39:41 +08:00
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
|
|
|
static void sof_sdw_check_ssid_quirk(const struct snd_soc_acpi_mach *mach)
|
|
|
|
{
|
|
|
|
const struct snd_pci_quirk *quirk_entry;
|
|
|
|
|
|
|
|
quirk_entry = snd_pci_quirk_lookup_id(mach->mach_params.subsystem_vendor,
|
|
|
|
mach->mach_params.subsystem_device,
|
|
|
|
sof_sdw_ssid_quirk_table);
|
|
|
|
|
|
|
|
if (quirk_entry)
|
|
|
|
sof_sdw_quirk = quirk_entry->value;
|
|
|
|
}
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
static const struct snd_soc_ops sdw_ops = {
|
2024-08-01 14:44:18 +05:30
|
|
|
.startup = asoc_sdw_startup,
|
|
|
|
.prepare = asoc_sdw_prepare,
|
|
|
|
.trigger = asoc_sdw_trigger,
|
|
|
|
.hw_params = asoc_sdw_hw_params,
|
|
|
|
.hw_free = asoc_sdw_hw_free,
|
|
|
|
.shutdown = asoc_sdw_shutdown,
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
};
|
|
|
|
|
2023-04-19 14:55:24 -05:00
|
|
|
static const char * const type_strings[] = {"SimpleJack", "SmartAmp", "SmartMic"};
|
|
|
|
|
2024-03-26 11:04:03 -05:00
|
|
|
static int create_sdw_dailink(struct snd_soc_card *card,
|
2024-09-13 14:36:27 +05:30
|
|
|
struct asoc_sdw_dailink *sof_dai,
|
2024-03-26 11:04:03 -05:00
|
|
|
struct snd_soc_dai_link **dai_links,
|
2024-04-26 10:21:21 -05:00
|
|
|
int *be_id, struct snd_soc_codec_conf **codec_conf)
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
{
|
2023-07-31 16:42:50 -05:00
|
|
|
struct device *dev = card->dev;
|
2025-02-25 17:37:16 +08:00
|
|
|
struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev);
|
2024-08-01 14:44:29 +05:30
|
|
|
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
|
2025-02-25 17:37:16 +08:00
|
|
|
struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params;
|
2024-08-01 14:44:29 +05:30
|
|
|
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
|
2024-09-13 14:36:27 +05:30
|
|
|
struct asoc_sdw_endpoint *sof_end;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
int stream;
|
2024-04-26 10:21:22 -05:00
|
|
|
int ret;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-04-26 10:21:21 -05:00
|
|
|
list_for_each_entry(sof_end, &sof_dai->endpoints, list) {
|
|
|
|
if (sof_end->name_prefix) {
|
|
|
|
(*codec_conf)->dlc.name = sof_end->codec_name;
|
|
|
|
(*codec_conf)->name_prefix = sof_end->name_prefix;
|
|
|
|
(*codec_conf)++;
|
|
|
|
}
|
2024-04-26 10:21:22 -05:00
|
|
|
|
|
|
|
if (sof_end->include_sidecar) {
|
|
|
|
ret = sof_end->codec_info->add_sidecar(card, dai_links, codec_conf);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
}
|
2024-04-26 10:21:21 -05:00
|
|
|
}
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
for_each_pcm_streams(stream) {
|
|
|
|
static const char * const sdw_stream_name[] = {
|
|
|
|
"SDW%d-Playback",
|
|
|
|
"SDW%d-Capture",
|
2023-04-19 14:55:24 -05:00
|
|
|
"SDW%d-Playback-%s",
|
|
|
|
"SDW%d-Capture-%s",
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
};
|
2024-03-26 11:04:17 -05:00
|
|
|
struct snd_soc_dai_link_ch_map *codec_maps;
|
|
|
|
struct snd_soc_dai_link_component *codecs;
|
|
|
|
struct snd_soc_dai_link_component *cpus;
|
2025-05-05 15:14:09 +01:00
|
|
|
struct snd_soc_dai_link_component *platform;
|
2024-03-26 11:04:17 -05:00
|
|
|
int num_cpus = hweight32(sof_dai->link_mask[stream]);
|
|
|
|
int num_codecs = sof_dai->num_devs[stream];
|
|
|
|
int playback, capture;
|
|
|
|
int cur_link = 0;
|
|
|
|
int i = 0, j = 0;
|
|
|
|
char *name;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-03-26 11:04:17 -05:00
|
|
|
if (!sof_dai->num_devs[stream])
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
continue;
|
|
|
|
|
2024-03-26 11:04:17 -05:00
|
|
|
sof_end = list_first_entry(&sof_dai->endpoints,
|
2024-09-13 14:36:27 +05:30
|
|
|
struct asoc_sdw_endpoint, list);
|
2024-03-26 11:04:17 -05:00
|
|
|
|
|
|
|
*be_id = sof_end->dai_info->dailink[stream];
|
2023-07-31 16:42:41 -05:00
|
|
|
if (*be_id < 0) {
|
|
|
|
dev_err(dev, "Invalid dailink id %d\n", *be_id);
|
2023-06-02 15:22:00 -05:00
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
/* create stream name according to first link id */
|
2024-03-26 11:04:17 -05:00
|
|
|
if (ctx->append_dai_type)
|
2023-04-19 14:55:24 -05:00
|
|
|
name = devm_kasprintf(dev, GFP_KERNEL,
|
2024-03-26 11:04:17 -05:00
|
|
|
sdw_stream_name[stream + 2],
|
|
|
|
ffs(sof_end->link_mask) - 1,
|
|
|
|
type_strings[sof_end->dai_info->dai_type]);
|
|
|
|
else
|
2023-04-19 14:55:24 -05:00
|
|
|
name = devm_kasprintf(dev, GFP_KERNEL,
|
2024-03-26 11:04:17 -05:00
|
|
|
sdw_stream_name[stream],
|
|
|
|
ffs(sof_end->link_mask) - 1);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
if (!name)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-03-26 11:04:17 -05:00
|
|
|
cpus = devm_kcalloc(dev, num_cpus, sizeof(*cpus), GFP_KERNEL);
|
2023-09-15 15:56:10 +08:00
|
|
|
if (!cpus)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-03-26 11:04:17 -05:00
|
|
|
codecs = devm_kcalloc(dev, num_codecs, sizeof(*codecs), GFP_KERNEL);
|
|
|
|
if (!codecs)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2025-05-05 15:14:09 +01:00
|
|
|
platform = devm_kzalloc(dev, sizeof(*platform), GFP_KERNEL);
|
|
|
|
if (!platform)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-03-26 11:04:17 -05:00
|
|
|
codec_maps = devm_kcalloc(dev, num_codecs, sizeof(*codec_maps), GFP_KERNEL);
|
|
|
|
if (!codec_maps)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
list_for_each_entry(sof_end, &sof_dai->endpoints, list) {
|
|
|
|
if (!sof_end->dai_info->direction[stream])
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (cur_link != sof_end->link_mask) {
|
|
|
|
int link_num = ffs(sof_end->link_mask) - 1;
|
2024-08-01 14:44:29 +05:30
|
|
|
int pin_num = intel_ctx->sdw_pin_index[link_num]++;
|
2024-03-26 11:04:17 -05:00
|
|
|
|
|
|
|
cur_link = sof_end->link_mask;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-03-26 11:04:17 -05:00
|
|
|
cpus[i].dai_name = devm_kasprintf(dev, GFP_KERNEL,
|
|
|
|
"SDW%d Pin%d",
|
|
|
|
link_num, pin_num);
|
|
|
|
if (!cpus[i].dai_name)
|
|
|
|
return -ENOMEM;
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
codec_maps[j].cpu = i - 1;
|
|
|
|
codec_maps[j].codec = j;
|
|
|
|
|
|
|
|
codecs[j].name = sof_end->codec_name;
|
|
|
|
codecs[j].dai_name = sof_end->dai_info->dai_name;
|
2025-02-25 17:37:16 +08:00
|
|
|
if (sof_end->dai_info->dai_type == SOC_SDW_DAI_TYPE_MIC &&
|
|
|
|
mach_params->dmic_num > 0) {
|
|
|
|
dev_warn(dev,
|
|
|
|
"Both SDW DMIC and PCH DMIC are present, if incorrect, please set kernel params snd_sof_intel_hda_generic dmic_num=0 to disable PCH DMIC\n");
|
|
|
|
}
|
2024-03-26 11:04:17 -05:00
|
|
|
j++;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
}
|
|
|
|
|
2024-03-26 11:04:17 -05:00
|
|
|
WARN_ON(i != num_cpus || j != num_codecs);
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
playback = (stream == SNDRV_PCM_STREAM_PLAYBACK);
|
|
|
|
capture = (stream == SNDRV_PCM_STREAM_CAPTURE);
|
2023-09-15 15:56:10 +08:00
|
|
|
|
2024-08-01 16:48:12 +05:30
|
|
|
asoc_sdw_init_dai_link(dev, *dai_links, be_id, name, playback, capture,
|
2025-05-05 15:14:09 +01:00
|
|
|
cpus, num_cpus, platform, 1, codecs, num_codecs,
|
2024-11-01 07:38:01 +05:30
|
|
|
1, asoc_sdw_rtd_init, &sdw_ops);
|
2021-10-27 10:18:18 +08:00
|
|
|
|
2021-09-07 13:44:36 -05:00
|
|
|
/*
|
|
|
|
* SoundWire DAILINKs use 'stream' functions and Bank Switch operations
|
|
|
|
* based on wait_for_completion(), tag them as 'nonatomic'.
|
|
|
|
*/
|
2024-03-26 11:04:03 -05:00
|
|
|
(*dai_links)->nonatomic = true;
|
2024-03-26 11:04:17 -05:00
|
|
|
(*dai_links)->ch_maps = codec_maps;
|
|
|
|
|
|
|
|
list_for_each_entry(sof_end, &sof_dai->endpoints, list) {
|
|
|
|
if (sof_end->dai_info->init)
|
2024-03-26 11:04:26 -05:00
|
|
|
sof_end->dai_info->init(card, *dai_links,
|
2024-03-26 11:04:17 -05:00
|
|
|
sof_end->codec_info,
|
|
|
|
playback);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
}
|
2024-03-26 11:04:03 -05:00
|
|
|
|
|
|
|
(*dai_links)++;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2024-03-26 11:04:18 -05:00
|
|
|
static int create_sdw_dailinks(struct snd_soc_card *card,
|
|
|
|
struct snd_soc_dai_link **dai_links, int *be_id,
|
2024-09-13 14:36:27 +05:30
|
|
|
struct asoc_sdw_dailink *sof_dais,
|
2024-04-26 10:21:21 -05:00
|
|
|
struct snd_soc_codec_conf **codec_conf)
|
2024-03-26 11:04:18 -05:00
|
|
|
{
|
2024-08-01 14:44:29 +05:30
|
|
|
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
|
|
|
|
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
|
2024-03-26 11:04:18 -05:00
|
|
|
int ret, i;
|
|
|
|
|
2024-08-19 08:55:46 +08:00
|
|
|
for (i = 0; i < SDW_INTEL_MAX_LINKS; i++)
|
2024-08-01 14:44:29 +05:30
|
|
|
intel_ctx->sdw_pin_index[i] = SOC_SDW_INTEL_BIDIR_PDI_BASE;
|
2024-03-26 11:04:18 -05:00
|
|
|
|
|
|
|
/* generate DAI links by each sdw link */
|
|
|
|
while (sof_dais->initialised) {
|
2025-03-03 14:55:52 +08:00
|
|
|
int current_be_id = 0;
|
2024-03-26 11:04:18 -05:00
|
|
|
|
2024-04-26 10:21:21 -05:00
|
|
|
ret = create_sdw_dailink(card, sof_dais, dai_links,
|
|
|
|
¤t_be_id, codec_conf);
|
2024-03-26 11:04:18 -05:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
/* Update the be_id to match the highest ID used for SDW link */
|
|
|
|
if (*be_id < current_be_id)
|
|
|
|
*be_id = current_be_id;
|
|
|
|
|
|
|
|
sof_dais++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2024-03-26 11:04:05 -05:00
|
|
|
static int create_ssp_dailinks(struct snd_soc_card *card,
|
|
|
|
struct snd_soc_dai_link **dai_links, int *be_id,
|
2024-08-01 14:44:16 +05:30
|
|
|
struct asoc_sdw_codec_info *ssp_info,
|
2024-03-26 11:04:05 -05:00
|
|
|
unsigned long ssp_mask)
|
|
|
|
{
|
|
|
|
struct device *dev = card->dev;
|
|
|
|
int i, j = 0;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
for_each_set_bit(i, &ssp_mask, BITS_PER_TYPE(ssp_mask)) {
|
|
|
|
char *name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", i);
|
|
|
|
char *cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", i);
|
|
|
|
char *codec_name = devm_kasprintf(dev, GFP_KERNEL, "i2c-%s:0%d",
|
|
|
|
ssp_info->acpi_id, j++);
|
2024-09-25 16:00:30 +08:00
|
|
|
if (!name || !cpu_dai_name || !codec_name)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-03-26 11:04:05 -05:00
|
|
|
int playback = ssp_info->dais[0].direction[SNDRV_PCM_STREAM_PLAYBACK];
|
|
|
|
int capture = ssp_info->dais[0].direction[SNDRV_PCM_STREAM_CAPTURE];
|
|
|
|
|
2024-08-01 16:48:12 +05:30
|
|
|
ret = asoc_sdw_init_simple_dai_link(dev, *dai_links, be_id, name,
|
|
|
|
playback, capture, cpu_dai_name,
|
2025-05-05 15:14:09 +01:00
|
|
|
"dummy", codec_name,
|
2024-11-01 07:38:01 +05:30
|
|
|
ssp_info->dais[0].dai_name, 1, NULL,
|
2024-08-01 16:48:12 +05:30
|
|
|
ssp_info->ops);
|
2024-03-26 11:04:05 -05:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
2024-03-26 11:04:26 -05:00
|
|
|
ret = ssp_info->dais[0].init(card, *dai_links, ssp_info, 0);
|
2024-03-26 11:04:05 -05:00
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
(*dai_links)++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2024-03-26 11:04:06 -05:00
|
|
|
static int create_dmic_dailinks(struct snd_soc_card *card,
|
|
|
|
struct snd_soc_dai_link **dai_links, int *be_id)
|
|
|
|
{
|
|
|
|
struct device *dev = card->dev;
|
|
|
|
int ret;
|
|
|
|
|
2024-08-01 16:48:12 +05:30
|
|
|
ret = asoc_sdw_init_simple_dai_link(dev, *dai_links, be_id, "dmic01",
|
|
|
|
0, 1, // DMIC only supports capture
|
2025-05-05 15:14:09 +01:00
|
|
|
"DMIC01 Pin", "dummy",
|
2024-11-01 07:38:01 +05:30
|
|
|
"dmic-codec", "dmic-hifi", 1,
|
2024-08-01 16:48:12 +05:30
|
|
|
asoc_sdw_dmic_init, NULL);
|
2024-03-26 11:04:06 -05:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
(*dai_links)++;
|
|
|
|
|
2024-08-01 16:48:12 +05:30
|
|
|
ret = asoc_sdw_init_simple_dai_link(dev, *dai_links, be_id, "dmic16k",
|
|
|
|
0, 1, // DMIC only supports capture
|
2025-05-05 15:14:09 +01:00
|
|
|
"DMIC16k Pin", "dummy",
|
2024-11-01 07:38:01 +05:30
|
|
|
"dmic-codec", "dmic-hifi", 1,
|
2024-08-01 16:48:12 +05:30
|
|
|
/* don't call asoc_sdw_dmic_init() twice */
|
|
|
|
NULL, NULL);
|
2024-03-26 11:04:06 -05:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
(*dai_links)++;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2024-03-26 11:04:07 -05:00
|
|
|
static int create_hdmi_dailinks(struct snd_soc_card *card,
|
|
|
|
struct snd_soc_dai_link **dai_links, int *be_id,
|
|
|
|
int hdmi_num)
|
|
|
|
{
|
|
|
|
struct device *dev = card->dev;
|
2024-08-01 14:44:29 +05:30
|
|
|
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
|
|
|
|
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
|
2024-03-26 11:04:07 -05:00
|
|
|
int i, ret;
|
|
|
|
|
|
|
|
for (i = 0; i < hdmi_num; i++) {
|
|
|
|
char *name = devm_kasprintf(dev, GFP_KERNEL, "iDisp%d", i + 1);
|
|
|
|
char *cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, "iDisp%d Pin", i + 1);
|
2024-09-25 16:00:30 +08:00
|
|
|
if (!name || !cpu_dai_name)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-03-26 11:04:07 -05:00
|
|
|
char *codec_name, *codec_dai_name;
|
|
|
|
|
2024-08-01 14:44:29 +05:30
|
|
|
if (intel_ctx->hdmi.idisp_codec) {
|
2024-03-26 11:04:07 -05:00
|
|
|
codec_name = "ehdaudio0D2";
|
|
|
|
codec_dai_name = devm_kasprintf(dev, GFP_KERNEL,
|
|
|
|
"intel-hdmi-hifi%d", i + 1);
|
|
|
|
} else {
|
|
|
|
codec_name = "snd-soc-dummy";
|
|
|
|
codec_dai_name = "snd-soc-dummy-dai";
|
|
|
|
}
|
|
|
|
|
2024-09-25 16:00:30 +08:00
|
|
|
if (!codec_dai_name)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-08-01 16:48:12 +05:30
|
|
|
ret = asoc_sdw_init_simple_dai_link(dev, *dai_links, be_id, name,
|
|
|
|
1, 0, // HDMI only supports playback
|
2025-05-05 15:14:09 +01:00
|
|
|
cpu_dai_name, "dummy",
|
2024-11-01 07:38:01 +05:30
|
|
|
codec_name, codec_dai_name, 1,
|
2024-08-01 16:48:12 +05:30
|
|
|
i == 0 ? sof_sdw_hdmi_init : NULL, NULL);
|
2024-03-26 11:04:07 -05:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
(*dai_links)++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2024-03-26 11:04:08 -05:00
|
|
|
static int create_bt_dailinks(struct snd_soc_card *card,
|
|
|
|
struct snd_soc_dai_link **dai_links, int *be_id)
|
|
|
|
{
|
|
|
|
struct device *dev = card->dev;
|
|
|
|
int port = (sof_sdw_quirk & SOF_BT_OFFLOAD_SSP_MASK) >>
|
|
|
|
SOF_BT_OFFLOAD_SSP_SHIFT;
|
|
|
|
char *name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-BT", port);
|
|
|
|
char *cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", port);
|
2024-09-25 16:00:30 +08:00
|
|
|
if (!name || !cpu_dai_name)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-03-26 11:04:08 -05:00
|
|
|
int ret;
|
|
|
|
|
2024-08-01 16:48:12 +05:30
|
|
|
ret = asoc_sdw_init_simple_dai_link(dev, *dai_links, be_id, name,
|
2025-05-05 15:14:09 +01:00
|
|
|
1, 1, cpu_dai_name, "dummy",
|
2024-08-01 16:48:12 +05:30
|
|
|
snd_soc_dummy_dlc.name, snd_soc_dummy_dlc.dai_name,
|
2024-11-01 07:38:01 +05:30
|
|
|
1, NULL, NULL);
|
2024-03-26 11:04:08 -05:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
(*dai_links)++;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-07-31 16:42:50 -05:00
|
|
|
static int sof_card_dai_links_create(struct snd_soc_card *card)
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
{
|
2023-07-31 16:42:50 -05:00
|
|
|
struct device *dev = card->dev;
|
|
|
|
struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev);
|
2023-11-24 14:40:32 +02:00
|
|
|
int sdw_be_num = 0, ssp_num = 0, dmic_num = 0, bt_num = 0;
|
2024-08-01 14:44:29 +05:30
|
|
|
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
|
|
|
|
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
|
2023-07-31 16:42:55 -05:00
|
|
|
struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params;
|
2020-09-23 11:05:12 +03:00
|
|
|
struct snd_soc_codec_conf *codec_conf;
|
2024-08-01 14:44:16 +05:30
|
|
|
struct asoc_sdw_codec_info *ssp_info;
|
2024-09-13 14:36:27 +05:30
|
|
|
struct asoc_sdw_endpoint *sof_ends;
|
|
|
|
struct asoc_sdw_dailink *sof_dais;
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
int num_devs = 0;
|
|
|
|
int num_ends = 0;
|
2023-07-31 16:42:43 -05:00
|
|
|
struct snd_soc_dai_link *dai_links;
|
2024-03-26 11:04:03 -05:00
|
|
|
int num_links;
|
2024-03-26 11:04:18 -05:00
|
|
|
int be_id = 0;
|
2023-11-24 14:40:32 +02:00
|
|
|
int hdmi_num;
|
2024-03-26 11:04:04 -05:00
|
|
|
unsigned long ssp_mask;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
int ret;
|
|
|
|
|
2024-09-13 14:36:28 +05:30
|
|
|
ret = asoc_sdw_count_sdw_endpoints(card, &num_devs, &num_ends);
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
if (ret < 0) {
|
|
|
|
dev_err(dev, "failed to count devices/endpoints: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2024-12-12 10:57:42 +00:00
|
|
|
/*
|
|
|
|
* One per DAI link, worst case is a DAI link for every endpoint, also
|
|
|
|
* add one additional to act as a terminator such that code can iterate
|
|
|
|
* until it hits an uninitialised DAI.
|
|
|
|
*/
|
|
|
|
sof_dais = kcalloc(num_ends + 1, sizeof(*sof_dais), GFP_KERNEL);
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
if (!sof_dais)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
/* One per endpoint, ie. each DAI on each codec/amp */
|
|
|
|
sof_ends = kcalloc(num_ends, sizeof(*sof_ends), GFP_KERNEL);
|
|
|
|
if (!sof_ends) {
|
|
|
|
ret = -ENOMEM;
|
|
|
|
goto err_dai;
|
|
|
|
}
|
|
|
|
|
2024-09-13 14:36:28 +05:30
|
|
|
ret = asoc_sdw_parse_sdw_endpoints(card, sof_dais, sof_ends, &num_devs);
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
if (ret < 0)
|
|
|
|
goto err_end;
|
|
|
|
|
2024-03-26 11:04:14 -05:00
|
|
|
sdw_be_num = ret;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
|
|
|
/*
|
|
|
|
* on generic tgl platform, I2S or sdw mode is supported
|
|
|
|
* based on board rework. A ACPI device is registered in
|
|
|
|
* system only when I2S mode is supported, not sdw mode.
|
|
|
|
* Here check ACPI ID to confirm I2S is supported.
|
|
|
|
*/
|
2024-08-01 14:44:19 +05:30
|
|
|
ssp_info = asoc_sdw_find_codec_info_acpi(mach->id);
|
2024-03-26 11:03:57 -05:00
|
|
|
if (ssp_info) {
|
2023-07-31 16:42:55 -05:00
|
|
|
ssp_mask = SOF_SSP_GET_PORT(sof_sdw_quirk);
|
|
|
|
ssp_num = hweight_long(ssp_mask);
|
|
|
|
}
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2023-11-24 14:40:32 +02:00
|
|
|
if (mach_params->codec_mask & IDISP_CODEC_MASK)
|
2024-08-01 14:44:29 +05:30
|
|
|
intel_ctx->hdmi.idisp_codec = true;
|
2023-07-31 16:42:55 -05:00
|
|
|
|
2023-11-24 14:40:32 +02:00
|
|
|
if (sof_sdw_quirk & SOF_SDW_TGL_HDMI)
|
|
|
|
hdmi_num = SOF_TGL_HDMI_COUNT;
|
|
|
|
else
|
|
|
|
hdmi_num = SOF_PRE_TGL_HDMI_COUNT;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
|
|
|
/* enable dmic01 & dmic16k */
|
2024-12-06 15:58:54 +08:00
|
|
|
if (ctx->ignore_internal_dmic) {
|
2024-12-06 15:58:55 +08:00
|
|
|
dev_dbg(dev, "SoundWire DMIC is used, ignoring internal DMIC\n");
|
2024-12-06 15:58:54 +08:00
|
|
|
mach_params->dmic_num = 0;
|
|
|
|
} else if (mach_params->dmic_num) {
|
|
|
|
dmic_num = 2;
|
|
|
|
} else if (sof_sdw_quirk & SOC_SDW_PCH_DMIC) {
|
|
|
|
dmic_num = 2;
|
|
|
|
/*
|
|
|
|
* mach_params->dmic_num will be used to set the cfg-mics value of
|
|
|
|
* card->components string. Set it to the default value.
|
|
|
|
*/
|
|
|
|
mach_params->dmic_num = DMIC_DEFAULT_CHANNELS;
|
2024-08-27 20:32:04 +08:00
|
|
|
}
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2021-05-05 11:36:59 -05:00
|
|
|
if (sof_sdw_quirk & SOF_SSP_BT_OFFLOAD_PRESENT)
|
2023-07-31 16:42:55 -05:00
|
|
|
bt_num = 1;
|
2021-05-05 11:36:59 -05:00
|
|
|
|
2024-12-06 15:58:56 +08:00
|
|
|
dev_dbg(dev, "DAI link numbers: sdw %d, ssp %d, dmic %d, hdmi %d, bt: %d\n",
|
2023-11-24 14:40:32 +02:00
|
|
|
sdw_be_num, ssp_num, dmic_num,
|
2024-08-01 14:44:29 +05:30
|
|
|
intel_ctx->hdmi.idisp_codec ? hdmi_num : 0, bt_num);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-04-26 10:21:21 -05:00
|
|
|
codec_conf = devm_kcalloc(dev, num_devs, sizeof(*codec_conf), GFP_KERNEL);
|
|
|
|
if (!codec_conf) {
|
|
|
|
ret = -ENOMEM;
|
|
|
|
goto err_end;
|
|
|
|
}
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
/* allocate BE dailinks */
|
2023-07-31 16:42:55 -05:00
|
|
|
num_links = sdw_be_num + ssp_num + dmic_num + hdmi_num + bt_num;
|
2023-07-31 16:42:43 -05:00
|
|
|
dai_links = devm_kcalloc(dev, num_links, sizeof(*dai_links), GFP_KERNEL);
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
if (!dai_links) {
|
|
|
|
ret = -ENOMEM;
|
|
|
|
goto err_end;
|
|
|
|
}
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-04-26 10:21:21 -05:00
|
|
|
card->codec_conf = codec_conf;
|
|
|
|
card->num_configs = num_devs;
|
2024-03-26 11:04:03 -05:00
|
|
|
card->dai_link = dai_links;
|
|
|
|
card->num_links = num_links;
|
2024-03-26 11:03:59 -05:00
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
/* SDW */
|
2024-03-26 11:04:18 -05:00
|
|
|
if (sdw_be_num) {
|
2024-04-26 10:21:21 -05:00
|
|
|
ret = create_sdw_dailinks(card, &dai_links, &be_id,
|
|
|
|
sof_dais, &codec_conf);
|
2024-03-26 11:04:17 -05:00
|
|
|
if (ret)
|
|
|
|
goto err_end;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* SSP */
|
2024-03-26 11:04:05 -05:00
|
|
|
if (ssp_num) {
|
|
|
|
ret = create_ssp_dailinks(card, &dai_links, &be_id,
|
|
|
|
ssp_info, ssp_mask);
|
2023-09-15 15:56:09 +08:00
|
|
|
if (ret)
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
goto err_end;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* dmic */
|
2024-08-27 20:32:04 +08:00
|
|
|
if (dmic_num) {
|
|
|
|
ret = create_dmic_dailinks(card, &dai_links, &be_id);
|
|
|
|
if (ret)
|
|
|
|
goto err_end;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* HDMI */
|
2024-03-26 11:04:07 -05:00
|
|
|
ret = create_hdmi_dailinks(card, &dai_links, &be_id, hdmi_num);
|
|
|
|
if (ret)
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
goto err_end;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-03-26 11:04:08 -05:00
|
|
|
/* BT */
|
2021-05-05 11:36:59 -05:00
|
|
|
if (sof_sdw_quirk & SOF_SSP_BT_OFFLOAD_PRESENT) {
|
2024-03-26 11:04:08 -05:00
|
|
|
ret = create_bt_dailinks(card, &dai_links, &be_id);
|
2023-09-15 15:56:09 +08:00
|
|
|
if (ret)
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
goto err_end;
|
2021-05-05 11:36:59 -05:00
|
|
|
}
|
|
|
|
|
2024-04-26 10:21:21 -05:00
|
|
|
WARN_ON(codec_conf != card->codec_conf + card->num_configs);
|
2024-03-26 11:04:03 -05:00
|
|
|
WARN_ON(dai_links != card->dai_link + card->num_links);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
ASoC: Intel: sof-sdw: Add new code for parsing the snd_soc_acpi structs
The current machine driver code has a lot of loops parsing through
the ACPI structs (snd_soc_acpi_link_adr, snd_soc_acpi_adr_device,
snd_soc_acpi_endpoint), this makes it hard to understand exactly
what information is being extracted and for what purposes. As well
as being slightly inefficient, as the same information is looked
up multiple times. There are also some issues with the handling
of multiple endpoints on a single device, only the first of the
snd_soc_acpi_endpoint structures is currently fully processed by the
driver. This means doing things like aggregating the second endpoint
on a device with another device are not currently possible.
Add new parsing code that will count the devices and endpoints, parse
them into an intermediate datastructure, and then use that to create
the DAI links. This patch does not actually utilise the results of
the parsing, items will be moved across in the following patches.
This parsing is based around two new structures which are temporarily
allocated whilst parsing. Firstly, sof_sdw_endpoint, which represents
a specific endpoint for audio on a device and is more or less directly
equivalent to snd_soc_acpi_endpoint. Secondly, sof_sdw_dailink
which represents a DAI link and contains a linked list of one or
more sof_sdw_endpoints. A single trip through the snd_soc_acpi data
structures is used to populate these.
One important point to note here is the use of the num field in
snd_soc_acpi_endpoint to address sof_sdw_dai_info array in the
sof_sdw_codec_info struct. This expects a one to one mapping between
endpoints on a device and dai infos. It would be fine for a specific
system to not specify an endpoint for all of the dai infos available,
but two endpoints mapping to the same dai info would make not sense.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-26 11:04:13 -05:00
|
|
|
err_end:
|
|
|
|
kfree(sof_ends);
|
|
|
|
err_dai:
|
|
|
|
kfree(sof_dais);
|
|
|
|
|
|
|
|
return ret;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
}
|
|
|
|
|
2020-07-08 15:32:15 -05:00
|
|
|
static int sof_sdw_card_late_probe(struct snd_soc_card *card)
|
|
|
|
{
|
2024-08-01 14:44:29 +05:30
|
|
|
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
|
|
|
|
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
|
2022-06-06 15:46:22 -05:00
|
|
|
int ret = 0;
|
2020-07-08 15:32:15 -05:00
|
|
|
|
2024-08-01 16:48:11 +05:30
|
|
|
ret = asoc_sdw_card_late_probe(card);
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
2020-07-08 15:32:15 -05:00
|
|
|
|
2024-08-01 14:44:29 +05:30
|
|
|
if (intel_ctx->hdmi.idisp_codec)
|
2022-06-06 15:46:22 -05:00
|
|
|
ret = sof_sdw_hdmi_card_late_probe(card);
|
|
|
|
|
|
|
|
return ret;
|
2020-07-08 15:32:15 -05:00
|
|
|
}
|
|
|
|
|
2025-06-19 11:42:22 +03:00
|
|
|
static int sof_sdw_add_dai_link(struct snd_soc_card *card,
|
|
|
|
struct snd_soc_dai_link *link)
|
|
|
|
{
|
|
|
|
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
|
|
|
|
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
|
|
|
|
|
|
|
|
/* Ignore the HDMI PCM link if iDisp is not present */
|
|
|
|
if (strstr(link->stream_name, "HDMI") && !intel_ctx->hdmi.idisp_codec)
|
|
|
|
link->ignore = true;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
static int mc_probe(struct platform_device *pdev)
|
|
|
|
{
|
2023-07-31 16:42:49 -05:00
|
|
|
struct snd_soc_acpi_mach *mach = dev_get_platdata(&pdev->dev);
|
2024-04-26 10:21:17 -05:00
|
|
|
struct snd_soc_card *card;
|
2024-08-01 14:44:29 +05:30
|
|
|
struct asoc_sdw_mc_private *ctx;
|
|
|
|
struct intel_mc_ctx *intel_ctx;
|
2020-04-20 02:35:09 +08:00
|
|
|
int amp_num = 0, i;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
int ret;
|
|
|
|
|
2024-04-26 10:21:17 -05:00
|
|
|
dev_dbg(&pdev->dev, "Entry\n");
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-08-01 14:44:29 +05:30
|
|
|
intel_ctx = devm_kzalloc(&pdev->dev, sizeof(*intel_ctx), GFP_KERNEL);
|
|
|
|
if (!intel_ctx)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-04-26 10:21:17 -05:00
|
|
|
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
if (!ctx)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2024-08-01 14:44:29 +05:30
|
|
|
ctx->private = intel_ctx;
|
2024-08-01 16:48:09 +05:30
|
|
|
ctx->codec_info_list_count = asoc_sdw_get_codec_info_list_count();
|
2024-04-26 10:21:17 -05:00
|
|
|
card = &ctx->card;
|
|
|
|
card->dev = &pdev->dev;
|
2024-07-09 11:09:21 +08:00
|
|
|
card->name = "soundwire";
|
|
|
|
card->owner = THIS_MODULE;
|
|
|
|
card->late_probe = sof_sdw_card_late_probe;
|
2025-06-19 11:42:22 +03:00
|
|
|
card->add_dai_link = sof_sdw_add_dai_link;
|
2024-04-26 10:21:17 -05:00
|
|
|
|
2023-07-31 16:42:49 -05:00
|
|
|
snd_soc_card_set_drvdata(card, ctx);
|
|
|
|
|
2025-02-04 13:39:41 +08:00
|
|
|
if (mach->mach_params.subsystem_id_set) {
|
|
|
|
snd_soc_card_set_pci_ssid(card,
|
|
|
|
mach->mach_params.subsystem_vendor,
|
|
|
|
mach->mach_params.subsystem_device);
|
|
|
|
sof_sdw_check_ssid_quirk(mach);
|
|
|
|
}
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
dmi_check_system(sof_sdw_quirk_table);
|
|
|
|
|
2020-06-25 14:12:56 -05:00
|
|
|
if (quirk_override != -1) {
|
2023-07-31 16:42:49 -05:00
|
|
|
dev_info(card->dev, "Overriding quirk 0x%lx => 0x%x\n",
|
2020-06-25 14:12:56 -05:00
|
|
|
sof_sdw_quirk, quirk_override);
|
|
|
|
sof_sdw_quirk = quirk_override;
|
|
|
|
}
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2023-07-31 16:42:49 -05:00
|
|
|
log_quirks(card->dev);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
|
2024-08-01 14:44:31 +05:30
|
|
|
ctx->mc_quirk = sof_sdw_quirk;
|
2023-07-31 16:42:51 -05:00
|
|
|
/* reset amp_num to ensure amp_num++ starts from 0 in each probe */
|
2024-08-01 16:48:09 +05:30
|
|
|
for (i = 0; i < ctx->codec_info_list_count; i++)
|
2023-07-31 16:42:51 -05:00
|
|
|
codec_info_list[i].amp_num = 0;
|
|
|
|
|
2023-07-31 16:42:50 -05:00
|
|
|
ret = sof_card_dai_links_create(card);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
2020-04-20 02:35:09 +08:00
|
|
|
/*
|
|
|
|
* the default amp_num is zero for each codec and
|
|
|
|
* amp_num will only be increased for active amp
|
|
|
|
* codecs on used platform
|
|
|
|
*/
|
2024-08-01 16:48:09 +05:30
|
|
|
for (i = 0; i < ctx->codec_info_list_count; i++)
|
2020-04-20 02:35:09 +08:00
|
|
|
amp_num += codec_info_list[i].amp_num;
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
card->components = devm_kasprintf(card->dev, GFP_KERNEL,
|
2024-04-26 10:21:19 -05:00
|
|
|
" cfg-amp:%d", amp_num);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
if (!card->components)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2021-02-08 17:33:29 -06:00
|
|
|
if (mach->mach_params.dmic_num) {
|
|
|
|
card->components = devm_kasprintf(card->dev, GFP_KERNEL,
|
|
|
|
"%s mic:dmic cfg-mics:%d",
|
|
|
|
card->components,
|
|
|
|
mach->mach_params.dmic_num);
|
|
|
|
if (!card->components)
|
|
|
|
return -ENOMEM;
|
|
|
|
}
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
/* Register the card */
|
2023-07-31 16:42:49 -05:00
|
|
|
ret = devm_snd_soc_register_card(card->dev, card);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
if (ret) {
|
2023-11-27 15:34:42 +02:00
|
|
|
dev_err_probe(card->dev, ret, "snd_soc_register_card failed %d\n", ret);
|
2024-08-01 16:48:10 +05:30
|
|
|
asoc_sdw_mc_dailink_exit_loop(card);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
platform_set_drvdata(pdev, card);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2023-03-15 16:06:33 +01:00
|
|
|
static void mc_remove(struct platform_device *pdev)
|
2020-08-20 21:45:42 +08:00
|
|
|
{
|
|
|
|
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
|
|
|
|
2024-08-01 16:48:10 +05:30
|
|
|
asoc_sdw_mc_dailink_exit_loop(card);
|
2020-08-20 21:45:42 +08:00
|
|
|
}
|
|
|
|
|
2023-07-31 16:42:46 -05:00
|
|
|
static const struct platform_device_id mc_id_table[] = {
|
|
|
|
{ "sof_sdw", },
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
MODULE_DEVICE_TABLE(platform, mc_id_table);
|
|
|
|
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
static struct platform_driver sof_sdw_driver = {
|
|
|
|
.driver = {
|
|
|
|
.name = "sof_sdw",
|
|
|
|
.pm = &snd_soc_pm_ops,
|
|
|
|
},
|
|
|
|
.probe = mc_probe,
|
2024-09-09 17:12:30 +02:00
|
|
|
.remove = mc_remove,
|
2023-07-31 16:42:46 -05:00
|
|
|
.id_table = mc_id_table,
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 17:07:44 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
module_platform_driver(sof_sdw_driver);
|
|
|
|
|
|
|
|
MODULE_DESCRIPTION("ASoC SoundWire Generic Machine driver");
|
|
|
|
MODULE_AUTHOR("Bard Liao <yung-chuan.liao@linux.intel.com>");
|
|
|
|
MODULE_AUTHOR("Rander Wang <rander.wang@linux.intel.com>");
|
|
|
|
MODULE_AUTHOR("Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>");
|
|
|
|
MODULE_LICENSE("GPL v2");
|
module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.
Scripted using
git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
do
awk -i inplace '
/^#define EXPORT_SYMBOL_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/^#define MODULE_IMPORT_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/MODULE_IMPORT_NS/ {
$0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
}
/EXPORT_SYMBOL_NS/ {
if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
$0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
$0 !~ /^my/) {
getline line;
gsub(/[[:space:]]*\\$/, "");
gsub(/[[:space:]]/, "", line);
$0 = $0 " " line;
}
$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
"\\1(\\2, \"\\3\")", "g");
}
}
{ print }' $file;
done
Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 15:59:47 +01:00
|
|
|
MODULE_IMPORT_NS("SND_SOC_INTEL_HDA_DSP_COMMON");
|
|
|
|
MODULE_IMPORT_NS("SND_SOC_SDW_UTILS");
|