mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
ASoC: Merge up fixes
For the benefit of CI.
This commit is contained in:
commit
af08458988
@ -26,6 +26,7 @@ properties:
|
||||
- const: rockchip,rk3568-spdif
|
||||
- items:
|
||||
- enum:
|
||||
- rockchip,rk3128-spdif
|
||||
- rockchip,rk3188-spdif
|
||||
- rockchip,rk3288-spdif
|
||||
- rockchip,rk3308-spdif
|
||||
|
@ -1863,15 +1863,15 @@ static int cs_dsp_adsp2_setup_algs(struct cs_dsp *dsp)
|
||||
return PTR_ERR(adsp2_alg);
|
||||
|
||||
for (i = 0; i < n_algs; i++) {
|
||||
cs_dsp_info(dsp,
|
||||
"%d: ID %x v%d.%d.%d XM@%x YM@%x ZM@%x\n",
|
||||
i, be32_to_cpu(adsp2_alg[i].alg.id),
|
||||
(be32_to_cpu(adsp2_alg[i].alg.ver) & 0xff0000) >> 16,
|
||||
(be32_to_cpu(adsp2_alg[i].alg.ver) & 0xff00) >> 8,
|
||||
be32_to_cpu(adsp2_alg[i].alg.ver) & 0xff,
|
||||
be32_to_cpu(adsp2_alg[i].xm),
|
||||
be32_to_cpu(adsp2_alg[i].ym),
|
||||
be32_to_cpu(adsp2_alg[i].zm));
|
||||
cs_dsp_dbg(dsp,
|
||||
"%d: ID %x v%d.%d.%d XM@%x YM@%x ZM@%x\n",
|
||||
i, be32_to_cpu(adsp2_alg[i].alg.id),
|
||||
(be32_to_cpu(adsp2_alg[i].alg.ver) & 0xff0000) >> 16,
|
||||
(be32_to_cpu(adsp2_alg[i].alg.ver) & 0xff00) >> 8,
|
||||
be32_to_cpu(adsp2_alg[i].alg.ver) & 0xff,
|
||||
be32_to_cpu(adsp2_alg[i].xm),
|
||||
be32_to_cpu(adsp2_alg[i].ym),
|
||||
be32_to_cpu(adsp2_alg[i].zm));
|
||||
|
||||
alg_region = cs_dsp_create_region(dsp, WMFW_ADSP2_XM,
|
||||
adsp2_alg[i].alg.id,
|
||||
@ -1996,14 +1996,14 @@ static int cs_dsp_halo_setup_algs(struct cs_dsp *dsp)
|
||||
return PTR_ERR(halo_alg);
|
||||
|
||||
for (i = 0; i < n_algs; i++) {
|
||||
cs_dsp_info(dsp,
|
||||
"%d: ID %x v%d.%d.%d XM@%x YM@%x\n",
|
||||
i, be32_to_cpu(halo_alg[i].alg.id),
|
||||
(be32_to_cpu(halo_alg[i].alg.ver) & 0xff0000) >> 16,
|
||||
(be32_to_cpu(halo_alg[i].alg.ver) & 0xff00) >> 8,
|
||||
be32_to_cpu(halo_alg[i].alg.ver) & 0xff,
|
||||
be32_to_cpu(halo_alg[i].xm_base),
|
||||
be32_to_cpu(halo_alg[i].ym_base));
|
||||
cs_dsp_dbg(dsp,
|
||||
"%d: ID %x v%d.%d.%d XM@%x YM@%x\n",
|
||||
i, be32_to_cpu(halo_alg[i].alg.id),
|
||||
(be32_to_cpu(halo_alg[i].alg.ver) & 0xff0000) >> 16,
|
||||
(be32_to_cpu(halo_alg[i].alg.ver) & 0xff00) >> 8,
|
||||
be32_to_cpu(halo_alg[i].alg.ver) & 0xff,
|
||||
be32_to_cpu(halo_alg[i].xm_base),
|
||||
be32_to_cpu(halo_alg[i].ym_base));
|
||||
|
||||
ret = cs_dsp_halo_create_regions(dsp, halo_alg[i].alg.id,
|
||||
halo_alg[i].alg.ver,
|
||||
|
@ -452,11 +452,13 @@ static int aw_dev_parse_reg_bin_with_hdr(struct aw_device *aw_dev,
|
||||
if ((aw_bin->all_bin_parse_num != 1) ||
|
||||
(aw_bin->header_info[0].bin_data_type != DATA_TYPE_REGISTER)) {
|
||||
dev_err(aw_dev->dev, "bin num or type error");
|
||||
ret = -EINVAL;
|
||||
goto parse_bin_failed;
|
||||
}
|
||||
|
||||
if (aw_bin->header_info[0].valid_data_len % 4) {
|
||||
dev_err(aw_dev->dev, "bin data len get error!");
|
||||
ret = -EINVAL;
|
||||
goto parse_bin_failed;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ static int cs35l56_i2c_probe(struct i2c_client *client)
|
||||
return -ENOMEM;
|
||||
|
||||
cs35l56->base.dev = dev;
|
||||
cs35l56->base.can_hibernate = true;
|
||||
|
||||
i2c_set_clientdata(client, cs35l56);
|
||||
cs35l56->base.regmap = devm_regmap_init_i2c(client, regmap_config);
|
||||
|
@ -344,6 +344,16 @@ static int cs42l42_sdw_update_status(struct sdw_slave *peripheral,
|
||||
switch (status) {
|
||||
case SDW_SLAVE_ATTACHED:
|
||||
dev_dbg(cs42l42->dev, "ATTACHED\n");
|
||||
|
||||
/*
|
||||
* The SoundWire core can report stale ATTACH notifications
|
||||
* if we hard-reset CS42L42 in probe() but it had already been
|
||||
* enumerated. Reject the ATTACH if we haven't yet seen an
|
||||
* UNATTACH report for the device being in reset.
|
||||
*/
|
||||
if (cs42l42->sdw_waiting_first_unattach)
|
||||
break;
|
||||
|
||||
/*
|
||||
* Initialise codec, this only needs to be done once.
|
||||
* When resuming from suspend, resume callback will handle re-init of codec,
|
||||
@ -354,6 +364,16 @@ static int cs42l42_sdw_update_status(struct sdw_slave *peripheral,
|
||||
break;
|
||||
case SDW_SLAVE_UNATTACHED:
|
||||
dev_dbg(cs42l42->dev, "UNATTACHED\n");
|
||||
|
||||
if (cs42l42->sdw_waiting_first_unattach) {
|
||||
/*
|
||||
* SoundWire core has seen that CS42L42 is not on
|
||||
* the bus so release RESET and wait for ATTACH.
|
||||
*/
|
||||
cs42l42->sdw_waiting_first_unattach = false;
|
||||
gpiod_set_value_cansleep(cs42l42->reset_gpio, 1);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -2320,7 +2320,26 @@ int cs42l42_common_probe(struct cs42l42_private *cs42l42,
|
||||
|
||||
if (cs42l42->reset_gpio) {
|
||||
dev_dbg(cs42l42->dev, "Found reset GPIO\n");
|
||||
gpiod_set_value_cansleep(cs42l42->reset_gpio, 1);
|
||||
|
||||
/*
|
||||
* ACPI can override the default GPIO state we requested
|
||||
* so ensure that we start with RESET low.
|
||||
*/
|
||||
gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
|
||||
|
||||
/* Ensure minimum reset pulse width */
|
||||
usleep_range(10, 500);
|
||||
|
||||
/*
|
||||
* On SoundWire keep the chip in reset until we get an UNATTACH
|
||||
* notification from the SoundWire core. This acts as a
|
||||
* synchronization point to reject stale ATTACH notifications
|
||||
* if the chip was already enumerated before we reset it.
|
||||
*/
|
||||
if (cs42l42->sdw_peripheral)
|
||||
cs42l42->sdw_waiting_first_unattach = true;
|
||||
else
|
||||
gpiod_set_value_cansleep(cs42l42->reset_gpio, 1);
|
||||
}
|
||||
usleep_range(CS42L42_BOOT_TIME_US, CS42L42_BOOT_TIME_US * 2);
|
||||
|
||||
|
@ -53,6 +53,7 @@ struct cs42l42_private {
|
||||
u8 stream_use;
|
||||
bool hp_adc_up_pending;
|
||||
bool suspended;
|
||||
bool sdw_waiting_first_unattach;
|
||||
bool init_done;
|
||||
};
|
||||
|
||||
|
@ -2077,7 +2077,8 @@ static const struct cs42l43_irq cs42l43_irqs[] = {
|
||||
|
||||
static int cs42l43_request_irq(struct cs42l43_codec *priv,
|
||||
struct irq_domain *dom, const char * const name,
|
||||
unsigned int irq, irq_handler_t handler)
|
||||
unsigned int irq, irq_handler_t handler,
|
||||
unsigned long flags)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -2087,8 +2088,8 @@ static int cs42l43_request_irq(struct cs42l43_codec *priv,
|
||||
|
||||
dev_dbg(priv->dev, "Request IRQ %d for %s\n", ret, name);
|
||||
|
||||
ret = devm_request_threaded_irq(priv->dev, ret, NULL, handler, IRQF_ONESHOT,
|
||||
name, priv);
|
||||
ret = devm_request_threaded_irq(priv->dev, ret, NULL, handler,
|
||||
IRQF_ONESHOT | flags, name, priv);
|
||||
if (ret)
|
||||
return dev_err_probe(priv->dev, ret, "Failed to request IRQ %s\n", name);
|
||||
|
||||
@ -2124,11 +2125,11 @@ static int cs42l43_shutter_irq(struct cs42l43_codec *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = cs42l43_request_irq(priv, dom, close_name, close_irq, handler);
|
||||
ret = cs42l43_request_irq(priv, dom, close_name, close_irq, handler, IRQF_SHARED);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return cs42l43_request_irq(priv, dom, open_name, open_irq, handler);
|
||||
return cs42l43_request_irq(priv, dom, open_name, open_irq, handler, IRQF_SHARED);
|
||||
}
|
||||
|
||||
static int cs42l43_codec_probe(struct platform_device *pdev)
|
||||
@ -2178,7 +2179,8 @@ static int cs42l43_codec_probe(struct platform_device *pdev)
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cs42l43_irqs); i++) {
|
||||
ret = cs42l43_request_irq(priv, dom, cs42l43_irqs[i].name,
|
||||
cs42l43_irqs[i].irq, cs42l43_irqs[i].handler);
|
||||
cs42l43_irqs[i].irq,
|
||||
cs42l43_irqs[i].handler, 0);
|
||||
if (ret)
|
||||
goto err_pm;
|
||||
}
|
||||
|
@ -2403,13 +2403,11 @@ static irqreturn_t rt5640_irq(int irq, void *data)
|
||||
struct rt5640_priv *rt5640 = data;
|
||||
int delay = 0;
|
||||
|
||||
if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER) {
|
||||
cancel_delayed_work_sync(&rt5640->jack_work);
|
||||
if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER)
|
||||
delay = 100;
|
||||
}
|
||||
|
||||
if (rt5640->jack)
|
||||
queue_delayed_work(system_long_wq, &rt5640->jack_work, delay);
|
||||
mod_delayed_work(system_long_wq, &rt5640->jack_work, delay);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
@ -2565,10 +2563,9 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component,
|
||||
if (jack_data && jack_data->use_platform_clock)
|
||||
rt5640->use_platform_clock = jack_data->use_platform_clock;
|
||||
|
||||
ret = devm_request_threaded_irq(component->dev, rt5640->irq,
|
||||
NULL, rt5640_irq,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||
"rt5640", rt5640);
|
||||
ret = request_irq(rt5640->irq, rt5640_irq,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||
"rt5640", rt5640);
|
||||
if (ret) {
|
||||
dev_warn(component->dev, "Failed to request IRQ %d: %d\n", rt5640->irq, ret);
|
||||
rt5640_disable_jack_detect(component);
|
||||
@ -2621,14 +2618,14 @@ static void rt5640_enable_hda_jack_detect(
|
||||
|
||||
rt5640->jack = jack;
|
||||
|
||||
ret = devm_request_threaded_irq(component->dev, rt5640->irq,
|
||||
NULL, rt5640_irq, IRQF_TRIGGER_RISING | IRQF_ONESHOT,
|
||||
"rt5640", rt5640);
|
||||
ret = request_irq(rt5640->irq, rt5640_irq,
|
||||
IRQF_TRIGGER_RISING | IRQF_ONESHOT, "rt5640", rt5640);
|
||||
if (ret) {
|
||||
dev_warn(component->dev, "Failed to request IRQ %d: %d\n", rt5640->irq, ret);
|
||||
rt5640->irq = -ENXIO;
|
||||
rt5640->jack = NULL;
|
||||
return;
|
||||
}
|
||||
rt5640->irq_requested = true;
|
||||
|
||||
/* sync initial jack state */
|
||||
queue_delayed_work(system_long_wq, &rt5640->jack_work, 0);
|
||||
@ -2801,12 +2798,12 @@ static int rt5640_suspend(struct snd_soc_component *component)
|
||||
{
|
||||
struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
if (rt5640->irq) {
|
||||
if (rt5640->jack) {
|
||||
/* disable jack interrupts during system suspend */
|
||||
disable_irq(rt5640->irq);
|
||||
rt5640_cancel_work(rt5640);
|
||||
}
|
||||
|
||||
rt5640_cancel_work(rt5640);
|
||||
snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF);
|
||||
rt5640_reset(component);
|
||||
regcache_cache_only(rt5640->regmap, true);
|
||||
@ -2829,9 +2826,6 @@ static int rt5640_resume(struct snd_soc_component *component)
|
||||
regcache_cache_only(rt5640->regmap, false);
|
||||
regcache_sync(rt5640->regmap);
|
||||
|
||||
if (rt5640->irq)
|
||||
enable_irq(rt5640->irq);
|
||||
|
||||
if (rt5640->jack) {
|
||||
if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER) {
|
||||
snd_soc_component_update_bits(component,
|
||||
@ -2859,6 +2853,7 @@ static int rt5640_resume(struct snd_soc_component *component)
|
||||
}
|
||||
}
|
||||
|
||||
enable_irq(rt5640->irq);
|
||||
queue_delayed_work(system_long_wq, &rt5640->jack_work, 0);
|
||||
}
|
||||
|
||||
|
@ -687,7 +687,10 @@ int wm_adsp_write_ctl(struct wm_adsp *dsp, const char *name, int type,
|
||||
struct wm_coeff_ctl *ctl;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&dsp->cs_dsp.pwr_lock);
|
||||
ret = cs_dsp_coeff_write_ctrl(cs_ctl, 0, buf, len);
|
||||
mutex_unlock(&dsp->cs_dsp.pwr_lock);
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@ -703,8 +706,14 @@ EXPORT_SYMBOL_GPL(wm_adsp_write_ctl);
|
||||
int wm_adsp_read_ctl(struct wm_adsp *dsp, const char *name, int type,
|
||||
unsigned int alg, void *buf, size_t len)
|
||||
{
|
||||
return cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(&dsp->cs_dsp, name, type, alg),
|
||||
0, buf, len);
|
||||
int ret;
|
||||
|
||||
mutex_lock(&dsp->cs_dsp.pwr_lock);
|
||||
ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(&dsp->cs_dsp, name, type, alg),
|
||||
0, buf, len);
|
||||
mutex_unlock(&dsp->cs_dsp.pwr_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(wm_adsp_read_ctl);
|
||||
|
||||
|
@ -52,8 +52,8 @@ struct codec_priv {
|
||||
unsigned long mclk_freq;
|
||||
unsigned long free_freq;
|
||||
u32 mclk_id;
|
||||
u32 fll_id;
|
||||
u32 pll_id;
|
||||
int fll_id;
|
||||
int pll_id;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -206,7 +206,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream,
|
||||
}
|
||||
|
||||
/* Specific configuration for PLL */
|
||||
if (codec_priv->pll_id && codec_priv->fll_id) {
|
||||
if (codec_priv->pll_id >= 0 && codec_priv->fll_id >= 0) {
|
||||
if (priv->sample_format == SNDRV_PCM_FORMAT_S24_LE)
|
||||
pll_out = priv->sample_rate * 384;
|
||||
else
|
||||
@ -248,7 +248,7 @@ static int fsl_asoc_card_hw_free(struct snd_pcm_substream *substream)
|
||||
|
||||
priv->streams &= ~BIT(substream->stream);
|
||||
|
||||
if (!priv->streams && codec_priv->pll_id && codec_priv->fll_id) {
|
||||
if (!priv->streams && codec_priv->pll_id >= 0 && codec_priv->fll_id >= 0) {
|
||||
/* Force freq to be free_freq to avoid error message in codec */
|
||||
ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0),
|
||||
codec_priv->mclk_id,
|
||||
@ -621,6 +621,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
||||
priv->card.dapm_routes = audio_map;
|
||||
priv->card.num_dapm_routes = ARRAY_SIZE(audio_map);
|
||||
priv->card.driver_name = DRIVER_NAME;
|
||||
|
||||
priv->codec_priv.fll_id = -1;
|
||||
priv->codec_priv.pll_id = -1;
|
||||
|
||||
/* Diversify the card configurations */
|
||||
if (of_device_is_compatible(np, "fsl,imx-audio-cs42888")) {
|
||||
codec_dai_name = "cs42888";
|
||||
|
@ -710,10 +710,15 @@ static void fsl_sai_config_disable(struct fsl_sai *sai, int dir)
|
||||
{
|
||||
unsigned int ofs = sai->soc_data->reg_offset;
|
||||
bool tx = dir == TX;
|
||||
u32 xcsr, count = 100;
|
||||
u32 xcsr, count = 100, mask;
|
||||
|
||||
if (sai->soc_data->mclk_with_tere && sai->mclk_direction_output)
|
||||
mask = FSL_SAI_CSR_TERE;
|
||||
else
|
||||
mask = FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE;
|
||||
|
||||
regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx, ofs),
|
||||
FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE, 0);
|
||||
mask, 0);
|
||||
|
||||
/* TERE will remain set till the end of current frame */
|
||||
do {
|
||||
|
@ -315,7 +315,7 @@ static int imx_audmix_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(priv->cpu_mclk)) {
|
||||
ret = PTR_ERR(priv->cpu_mclk);
|
||||
dev_err(&cpu_pdev->dev, "failed to get DAI mclk1: %d\n", ret);
|
||||
return -EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
priv->audmix_pdev = audmix_pdev;
|
||||
|
@ -89,6 +89,14 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
|
||||
SND_SOC_DAIFMT_NB_NF |
|
||||
SND_SOC_DAIFMT_CBC_CFC;
|
||||
|
||||
/*
|
||||
* i.MX rpmsg sound cards work on codec slave mode. MCLK will be
|
||||
* disabled by CPU DAI driver in hw_free(). Some codec requires MCLK
|
||||
* present at power up/down sequence. So need to set ignore_pmdown_time
|
||||
* to power down codec immediately before MCLK is turned off.
|
||||
*/
|
||||
data->dai.ignore_pmdown_time = 1;
|
||||
|
||||
/* Optional codec node */
|
||||
ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args);
|
||||
if (ret) {
|
||||
|
@ -310,7 +310,8 @@ int simple_util_startup(struct snd_pcm_substream *substream)
|
||||
if (fixed_sysclk % props->mclk_fs) {
|
||||
dev_err(rtd->dev, "fixed sysclk %u not divisible by mclk_fs %u\n",
|
||||
fixed_sysclk, props->mclk_fs);
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto codec_err;
|
||||
}
|
||||
ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE,
|
||||
fixed_rate, fixed_rate);
|
||||
|
@ -758,10 +758,12 @@ static int simple_probe(struct platform_device *pdev)
|
||||
struct snd_soc_dai_link *dai_link = priv->dai_link;
|
||||
struct simple_dai_props *dai_props = priv->dai_props;
|
||||
|
||||
ret = -EINVAL;
|
||||
|
||||
cinfo = dev->platform_data;
|
||||
if (!cinfo) {
|
||||
dev_err(dev, "no info for asoc-simple-card\n");
|
||||
return -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!cinfo->name ||
|
||||
@ -770,7 +772,7 @@ static int simple_probe(struct platform_device *pdev)
|
||||
!cinfo->platform ||
|
||||
!cinfo->cpu_dai.name) {
|
||||
dev_err(dev, "insufficient simple_util_info settings\n");
|
||||
return -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
cpus = dai_link->cpus;
|
||||
|
@ -55,6 +55,9 @@ static int avs_create_dai_links(struct device *dev, struct hda_codec *codec, int
|
||||
return -ENOMEM;
|
||||
|
||||
dl[i].codecs->name = devm_kstrdup(dev, cname, GFP_KERNEL);
|
||||
if (!dl[i].codecs->name)
|
||||
return -ENOMEM;
|
||||
|
||||
dl[i].codecs->dai_name = pcm->name;
|
||||
dl[i].num_codecs = 1;
|
||||
dl[i].num_cpus = 1;
|
||||
|
@ -808,6 +808,16 @@ static const struct platform_device_id board_ids[] = {
|
||||
SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
|
||||
SOF_ES8336_JD_INVERTED),
|
||||
},
|
||||
{
|
||||
.name = "mtl_es83x6_c1_h02",
|
||||
.driver_data = (kernel_ulong_t)(SOF_ES8336_SSP_CODEC(1) |
|
||||
SOF_NO_OF_HDMI_CAPTURE_SSP(2) |
|
||||
SOF_HDMI_CAPTURE_1_SSP(0) |
|
||||
SOF_HDMI_CAPTURE_2_SSP(2) |
|
||||
SOF_SSP_HDMI_CAPTURE_PRESENT |
|
||||
SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
|
||||
SOF_ES8336_JD_INVERTED),
|
||||
},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, board_ids);
|
||||
|
@ -369,6 +369,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
|
||||
/* No Jack */
|
||||
.driver_data = (void *)SOF_SDW_TGL_HDMI,
|
||||
},
|
||||
{
|
||||
.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,
|
||||
},
|
||||
|
||||
{
|
||||
.callback = sof_sdw_quirk_cb,
|
||||
.matches = {
|
||||
|
@ -674,18 +674,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg",
|
||||
},
|
||||
{
|
||||
.link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */
|
||||
.links = adl_sdw_rt1316_link1_rt714_link0,
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg",
|
||||
},
|
||||
{
|
||||
.link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */
|
||||
.links = adl_sdw_rt1316_link12_rt714_link0,
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg",
|
||||
},
|
||||
{
|
||||
.link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */
|
||||
.links = adl_sdw_rt1316_link1_rt714_link0,
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg",
|
||||
},
|
||||
{
|
||||
.link_mask = 0x5, /* 2 active links required */
|
||||
.links = adl_sdw_rt1316_link2_rt714_link0,
|
||||
|
@ -30,6 +30,16 @@ static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = {
|
||||
.codecs = {"10EC5682", "RTL5682"},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_codecs mtl_essx_83x6 = {
|
||||
.num_codecs = 3,
|
||||
.codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = {
|
||||
.num_codecs = 1,
|
||||
.codecs = {"INTC10B0"}
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
|
||||
{
|
||||
.comp_ids = &mtl_rt5682_rt5682s_hp,
|
||||
@ -52,6 +62,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
|
||||
.quirk_data = &mtl_rt1019p_amp,
|
||||
.sof_tplg_filename = "sof-mtl-rt1019-rt5682.tplg",
|
||||
},
|
||||
{
|
||||
.comp_ids = &mtl_essx_83x6,
|
||||
.drv_name = "mtl_es83x6_c1_h02",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &mtl_lt6911_hdmi,
|
||||
.sof_tplg_filename = "sof-mtl-es83x6-ssp1-hdmi-ssp02.tplg",
|
||||
},
|
||||
{
|
||||
.comp_ids = &mtl_essx_83x6,
|
||||
.drv_name = "sof-essx8336",
|
||||
.sof_tplg_filename = "sof-mtl-es8336", /* the tplg suffix is added at run time */
|
||||
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
|
||||
SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
|
||||
SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_machines);
|
||||
|
@ -44,8 +44,8 @@ static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm,
|
||||
* platforms which make use of the snd_dmaengine_dai_dma_data struct for their
|
||||
* DAI DMA data. Internally the function will first call
|
||||
* snd_hwparams_to_dma_slave_config to fill in the slave config based on the
|
||||
* hw_params, followed by snd_dmaengine_set_config_from_dai_data to fill in the
|
||||
* remaining fields based on the DAI DMA data.
|
||||
* hw_params, followed by snd_dmaengine_pcm_set_config_from_dai_data to fill in
|
||||
* the remaining fields based on the DAI DMA data.
|
||||
*/
|
||||
int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config)
|
||||
|
@ -486,10 +486,9 @@ int snd_sof_device_remove(struct device *dev)
|
||||
snd_sof_ipc_free(sdev);
|
||||
snd_sof_free_debug(sdev);
|
||||
snd_sof_remove(sdev);
|
||||
sof_ops_free(sdev);
|
||||
}
|
||||
|
||||
sof_ops_free(sdev);
|
||||
|
||||
/* release firmware */
|
||||
snd_sof_fw_unload(sdev);
|
||||
|
||||
|
@ -463,7 +463,7 @@ int mtl_dsp_cl_init(struct snd_sof_dev *sdev, int stream_tag, bool imr_boot)
|
||||
/* step 3: wait for IPC DONE bit from ROM */
|
||||
ret = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR, chip->ipc_ack, status,
|
||||
((status & chip->ipc_ack_mask) == chip->ipc_ack_mask),
|
||||
HDA_DSP_REG_POLL_INTERVAL_US, MTL_DSP_PURGE_TIMEOUT_US);
|
||||
HDA_DSP_REG_POLL_INTERVAL_US, HDA_DSP_INIT_TIMEOUT_US);
|
||||
if (ret < 0) {
|
||||
if (hda->boot_iteration == HDA_FW_BOOT_ATTEMPTS)
|
||||
dev_err(sdev->dev, "timeout waiting for purge IPC done\n");
|
||||
|
@ -62,7 +62,6 @@
|
||||
#define MTL_DSP_IRQSTS_IPC BIT(0)
|
||||
#define MTL_DSP_IRQSTS_SDW BIT(6)
|
||||
|
||||
#define MTL_DSP_PURGE_TIMEOUT_US 20000000 /* 20s */
|
||||
#define MTL_DSP_REG_POLL_INTERVAL_US 10 /* 10 us */
|
||||
|
||||
/* Memory windows */
|
||||
|
@ -231,7 +231,7 @@ static int sof_ipc4_get_audio_fmt(struct snd_soc_component *scomp,
|
||||
|
||||
ret = sof_update_ipc_object(scomp, available_fmt,
|
||||
SOF_AUDIO_FMT_NUM_TOKENS, swidget->tuples,
|
||||
swidget->num_tuples, sizeof(available_fmt), 1);
|
||||
swidget->num_tuples, sizeof(*available_fmt), 1);
|
||||
if (ret) {
|
||||
dev_err(scomp->dev, "Failed to parse audio format token count\n");
|
||||
return ret;
|
||||
|
@ -212,7 +212,8 @@ widget_free:
|
||||
sof_widget_free_unlocked(sdev, swidget);
|
||||
use_count_decremented = true;
|
||||
core_put:
|
||||
snd_sof_dsp_core_put(sdev, swidget->core);
|
||||
if (!use_count_decremented)
|
||||
snd_sof_dsp_core_put(sdev, swidget->core);
|
||||
pipe_widget_free:
|
||||
if (swidget->id != snd_soc_dapm_scheduler)
|
||||
sof_widget_free_unlocked(sdev, swidget->spipe->pipe_widget);
|
||||
|
Loading…
Reference in New Issue
Block a user