So they can be used as a basis for new work.
This commit is contained in:
Mark Brown 2023-03-30 00:14:00 +01:00
Родитель f769fcefa6 e3720f92e0
Коммит 461b56f261
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
12 изменённых файлов: 93 добавлений и 12 удалений

Просмотреть файл

@ -269,6 +269,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_BOARD_NAME, "8A43"), DMI_MATCH(DMI_BOARD_NAME, "8A43"),
} }
}, },
{
.driver_data = &acp6x_card,
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
DMI_MATCH(DMI_BOARD_NAME, "8A22"),
}
},
{} {}
}; };

Просмотреть файл

@ -2022,6 +2022,11 @@ static int da7213_i2c_probe(struct i2c_client *i2c)
return ret; return ret;
} }
static void da7213_i2c_remove(struct i2c_client *i2c)
{
pm_runtime_disable(&i2c->dev);
}
static int __maybe_unused da7213_runtime_suspend(struct device *dev) static int __maybe_unused da7213_runtime_suspend(struct device *dev)
{ {
struct da7213_priv *da7213 = dev_get_drvdata(dev); struct da7213_priv *da7213 = dev_get_drvdata(dev);
@ -2065,6 +2070,7 @@ static struct i2c_driver da7213_i2c_driver = {
.pm = &da7213_pm, .pm = &da7213_pm,
}, },
.probe_new = da7213_i2c_probe, .probe_new = da7213_i2c_probe,
.remove = da7213_i2c_remove,
.id_table = da7213_i2c_id, .id_table = da7213_i2c_id,
}; };

Просмотреть файл

@ -436,23 +436,28 @@ static int hdac_hdmi_setup_audio_infoframe(struct hdac_device *hdev,
return 0; return 0;
} }
static int hdac_hdmi_set_tdm_slot(struct snd_soc_dai *dai, static int hdac_hdmi_set_stream(struct snd_soc_dai *dai,
unsigned int tx_mask, unsigned int rx_mask, void *stream, int direction)
int slots, int slot_width)
{ {
struct hdac_hdmi_priv *hdmi = snd_soc_dai_get_drvdata(dai); struct hdac_hdmi_priv *hdmi = snd_soc_dai_get_drvdata(dai);
struct hdac_device *hdev = hdmi->hdev; struct hdac_device *hdev = hdmi->hdev;
struct hdac_hdmi_dai_port_map *dai_map; struct hdac_hdmi_dai_port_map *dai_map;
struct hdac_hdmi_pcm *pcm; struct hdac_hdmi_pcm *pcm;
struct hdac_stream *hstream;
dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, tx_mask); if (!stream)
return -EINVAL;
hstream = (struct hdac_stream *)stream;
dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, hstream->stream_tag);
dai_map = &hdmi->dai_map[dai->id]; dai_map = &hdmi->dai_map[dai->id];
pcm = hdac_hdmi_get_pcm_from_cvt(hdmi, dai_map->cvt); pcm = hdac_hdmi_get_pcm_from_cvt(hdmi, dai_map->cvt);
if (pcm) if (pcm)
pcm->stream_tag = (tx_mask << 4); pcm->stream_tag = (hstream->stream_tag << 4);
return 0; return 0;
} }
@ -1544,7 +1549,7 @@ static const struct snd_soc_dai_ops hdmi_dai_ops = {
.startup = hdac_hdmi_pcm_open, .startup = hdac_hdmi_pcm_open,
.shutdown = hdac_hdmi_pcm_close, .shutdown = hdac_hdmi_pcm_close,
.hw_params = hdac_hdmi_set_hw_params, .hw_params = hdac_hdmi_set_hw_params,
.set_tdm_slot = hdac_hdmi_set_tdm_slot, .set_stream = hdac_hdmi_set_stream,
}; };
/* /*

Просмотреть файл

@ -3688,9 +3688,9 @@ static int __maybe_unused rx_macro_runtime_suspend(struct device *dev)
regcache_cache_only(rx->regmap, true); regcache_cache_only(rx->regmap, true);
regcache_mark_dirty(rx->regmap); regcache_mark_dirty(rx->regmap);
clk_disable_unprepare(rx->mclk);
clk_disable_unprepare(rx->npl);
clk_disable_unprepare(rx->fsgen); clk_disable_unprepare(rx->fsgen);
clk_disable_unprepare(rx->npl);
clk_disable_unprepare(rx->mclk);
return 0; return 0;
} }

Просмотреть файл

@ -2104,9 +2104,9 @@ static int __maybe_unused tx_macro_runtime_suspend(struct device *dev)
regcache_cache_only(tx->regmap, true); regcache_cache_only(tx->regmap, true);
regcache_mark_dirty(tx->regmap); regcache_mark_dirty(tx->regmap);
clk_disable_unprepare(tx->mclk);
clk_disable_unprepare(tx->npl);
clk_disable_unprepare(tx->fsgen); clk_disable_unprepare(tx->fsgen);
clk_disable_unprepare(tx->npl);
clk_disable_unprepare(tx->mclk);
return 0; return 0;
} }

Просмотреть файл

@ -2514,9 +2514,9 @@ static int __maybe_unused wsa_macro_runtime_suspend(struct device *dev)
regcache_cache_only(wsa->regmap, true); regcache_cache_only(wsa->regmap, true);
regcache_mark_dirty(wsa->regmap); regcache_mark_dirty(wsa->regmap);
clk_disable_unprepare(wsa->mclk);
clk_disable_unprepare(wsa->npl);
clk_disable_unprepare(wsa->fsgen); clk_disable_unprepare(wsa->fsgen);
clk_disable_unprepare(wsa->npl);
clk_disable_unprepare(wsa->mclk);
return 0; return 0;
} }

Просмотреть файл

@ -533,6 +533,18 @@ static int byt_rt5640_aif1_hw_params(struct snd_pcm_substream *substream,
/* Please keep this list alphabetically sorted */ /* Please keep this list alphabetically sorted */
static const struct dmi_system_id byt_rt5640_quirk_table[] = { static const struct dmi_system_id byt_rt5640_quirk_table[] = {
{ /* Acer Iconia One 7 B1-750 */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "VESPA2"),
},
.driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
BYT_RT5640_JD_SRC_JD1_IN4P |
BYT_RT5640_OVCD_TH_1500UA |
BYT_RT5640_OVCD_SF_0P75 |
BYT_RT5640_SSP0_AIF1 |
BYT_RT5640_MCLK_EN),
},
{ /* Acer Iconia Tab 8 W1-810 */ { /* Acer Iconia Tab 8 W1-810 */
.matches = { .matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"), DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),

Просмотреть файл

@ -213,6 +213,17 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
SOF_SDW_PCH_DMIC | SOF_SDW_PCH_DMIC |
RT711_JD1), RT711_JD1),
}, },
{
/* 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 |
SOF_SDW_PCH_DMIC |
RT711_JD2_100K),
},
/* TigerLake-SDCA devices */ /* TigerLake-SDCA devices */
{ {
.callback = sof_sdw_quirk_cb, .callback = sof_sdw_quirk_cb,

Просмотреть файл

@ -354,6 +354,20 @@ static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link3[] = {
{} {}
}; };
static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link2[] = {
{
.mask = BIT(0),
.num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
.adr_d = rt711_sdca_0_adr,
},
{
.mask = BIT(2),
.num_adr = ARRAY_SIZE(rt1316_2_single_adr),
.adr_d = rt1316_2_single_adr,
},
{}
};
static const struct snd_soc_acpi_adr_device mx8373_2_adr[] = { static const struct snd_soc_acpi_adr_device mx8373_2_adr[] = {
{ {
.adr = 0x000223019F837300ull, .adr = 0x000223019F837300ull,
@ -624,6 +638,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
.drv_name = "sof_sdw", .drv_name = "sof_sdw",
.sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l3.tplg", .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l3.tplg",
}, },
{
.link_mask = 0x5, /* 2 active links required */
.links = adl_sdw_rt711_link0_rt1316_link2,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l2.tplg",
},
{ {
.link_mask = 0x1, /* link0 required */ .link_mask = 0x1, /* link0 required */
.links = adl_rvp, .links = adl_rvp,

Просмотреть файл

@ -1662,10 +1662,14 @@ static void dpcm_runtime_setup_fe(struct snd_pcm_substream *substream)
struct snd_pcm_hardware *hw = &runtime->hw; struct snd_pcm_hardware *hw = &runtime->hw;
struct snd_soc_dai *dai; struct snd_soc_dai *dai;
int stream = substream->stream; int stream = substream->stream;
u64 formats = hw->formats;
int i; int i;
soc_pcm_hw_init(hw); soc_pcm_hw_init(hw);
if (formats)
hw->formats &= formats;
for_each_rtd_cpu_dais(fe, i, dai) { for_each_rtd_cpu_dais(fe, i, dai) {
struct snd_soc_pcm_stream *cpu_stream; struct snd_soc_pcm_stream *cpu_stream;

Просмотреть файл

@ -2348,6 +2348,14 @@ static int sof_ipc4_route_setup(struct snd_sof_dev *sdev, struct snd_sof_route *
return 0; return 0;
} }
if (!src_fw_module || !sink_fw_module) {
/* The NULL module will print as "(efault)" */
dev_err(sdev->dev, "source %s or sink %s widget weren't set up properly\n",
src_fw_module->man4_module_entry.name,
sink_fw_module->man4_module_entry.name);
return -ENODEV;
}
sroute->src_queue_id = sof_ipc4_get_queue_id(src_widget, sink_widget, sroute->src_queue_id = sof_ipc4_get_queue_id(src_widget, sink_widget,
SOF_PIN_TYPE_OUTPUT); SOF_PIN_TYPE_OUTPUT);
if (sroute->src_queue_id < 0) { if (sroute->src_queue_id < 0) {

Просмотреть файл

@ -405,6 +405,9 @@ static int sof_ipc4_tx_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_
static int sof_ipc4_set_get_data(struct snd_sof_dev *sdev, void *data, static int sof_ipc4_set_get_data(struct snd_sof_dev *sdev, void *data,
size_t payload_bytes, bool set) size_t payload_bytes, bool set)
{ {
const struct sof_dsp_power_state target_state = {
.state = SOF_DSP_PM_D0,
};
size_t payload_limit = sdev->ipc->max_payload_size; size_t payload_limit = sdev->ipc->max_payload_size;
struct sof_ipc4_msg *ipc4_msg = data; struct sof_ipc4_msg *ipc4_msg = data;
struct sof_ipc4_msg tx = {{ 0 }}; struct sof_ipc4_msg tx = {{ 0 }};
@ -435,6 +438,11 @@ static int sof_ipc4_set_get_data(struct snd_sof_dev *sdev, void *data,
tx.extension |= SOF_IPC4_MOD_EXT_MSG_FIRST_BLOCK(1); tx.extension |= SOF_IPC4_MOD_EXT_MSG_FIRST_BLOCK(1);
/* ensure the DSP is in D0i0 before sending IPC */
ret = snd_sof_dsp_set_power_state(sdev, &target_state);
if (ret < 0)
return ret;
/* Serialise IPC TX */ /* Serialise IPC TX */
mutex_lock(&sdev->ipc->tx_mutex); mutex_lock(&sdev->ipc->tx_mutex);