ASoC: Fixes for v5.19
A few more fixes that came in during the merge window - nothing huge here, there is one core fix for DPCM from Pierre but mostly driver changes. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmKXHhIACgkQJNaLcl1U h9Bnxgf/Sk+zE1V2cUoAkm7GtYZM6Jq4w2bgW7VhRfUXUYfA6OVGfNhQMUSwUTWA SX71DCff5u60caxiL9s3shxF7lxkyFQrA3FHMm1wW42N+gRWnjGjTl+xhapzGHDJ cT/JYfEHoM0/mqAaWlacRJDqHGNTfDumvBD4lUm4WGBwk2pSN+CgyBIG9RsjEBsI zYZ//YzEyA9lW0+GDSDok1qLwB2zorywmUcOH8YD5YuiXH5gO4BIQB+RMm/I7+AW Y78fFwCzt36g0lqp+YjYNiD2w8ReGuvV2H/IfIDW+8fhPe5AmnnvOURErw9Q+WX4 xhw1TYW2ye4O3OJBROiKC08OQwDkuA== =QK54 -----END PGP SIGNATURE----- Merge tag 'asoc-fix-v5.19-rc0' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.19 A few more fixes that came in during the merge window - nothing huge here, there is one core fix for DPCM from Pierre but mostly driver changes.
This commit is contained in:
commit
672362cbe6
@ -16,6 +16,7 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include "amd.h"
|
||||
#include "../mach-config.h"
|
||||
|
@ -60,6 +60,9 @@ static void da7219_aad_btn_det_work(struct work_struct *work)
|
||||
bool micbias_up = false;
|
||||
int retries = 0;
|
||||
|
||||
/* Disable ground switch */
|
||||
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
|
||||
|
||||
/* Drive headphones/lineout */
|
||||
snd_soc_component_update_bits(component, DA7219_HP_L_CTRL,
|
||||
DA7219_HP_L_AMP_OE_MASK,
|
||||
@ -153,6 +156,9 @@ static void da7219_aad_hptest_work(struct work_struct *work)
|
||||
tonegen_freq_hptest = cpu_to_le16(DA7219_AAD_HPTEST_RAMP_FREQ_INT_OSC);
|
||||
}
|
||||
|
||||
/* Disable ground switch */
|
||||
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
|
||||
|
||||
/* Ensure gain ramping at fastest rate */
|
||||
gain_ramp_ctrl = snd_soc_component_read(component, DA7219_GAIN_RAMP_CTRL);
|
||||
snd_soc_component_write(component, DA7219_GAIN_RAMP_CTRL, DA7219_GAIN_RAMP_RATE_X8);
|
||||
@ -428,6 +434,10 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data)
|
||||
mask |= DA7219_AAD_REPORT_ALL_MASK;
|
||||
da7219_aad->jack_inserted = false;
|
||||
|
||||
/* Cancel any pending work */
|
||||
cancel_work_sync(&da7219_aad->btn_det_work);
|
||||
cancel_work_sync(&da7219_aad->hptest_work);
|
||||
|
||||
/* Un-drive headphones/lineout */
|
||||
snd_soc_component_update_bits(component, DA7219_HP_R_CTRL,
|
||||
DA7219_HP_R_AMP_OE_MASK, 0);
|
||||
@ -444,9 +454,8 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data)
|
||||
snd_soc_dapm_disable_pin(dapm, "Mic Bias");
|
||||
snd_soc_dapm_sync(dapm);
|
||||
|
||||
/* Cancel any pending work */
|
||||
cancel_work_sync(&da7219_aad->btn_det_work);
|
||||
cancel_work_sync(&da7219_aad->hptest_work);
|
||||
/* Enable ground switch */
|
||||
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x01);
|
||||
}
|
||||
}
|
||||
|
||||
@ -899,6 +908,9 @@ int da7219_aad_init(struct snd_soc_component *component)
|
||||
snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1,
|
||||
DA7219_BUTTON_CONFIG_MASK, 0);
|
||||
|
||||
/* Enable ground switch */
|
||||
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x01);
|
||||
|
||||
INIT_WORK(&da7219_aad->btn_det_work, da7219_aad_btn_det_work);
|
||||
INIT_WORK(&da7219_aad->hptest_work, da7219_aad_hptest_work);
|
||||
|
||||
|
@ -2094,12 +2094,14 @@ EXPORT_SYMBOL_GPL(rt5640_sel_asrc_clk_src);
|
||||
void rt5640_enable_micbias1_for_ovcd(struct snd_soc_component *component)
|
||||
{
|
||||
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
|
||||
struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
snd_soc_dapm_mutex_lock(dapm);
|
||||
snd_soc_dapm_force_enable_pin_unlocked(dapm, "LDO2");
|
||||
snd_soc_dapm_force_enable_pin_unlocked(dapm, "MICBIAS1");
|
||||
/* OVCD is unreliable when used with RCCLK as sysclk-source */
|
||||
snd_soc_dapm_force_enable_pin_unlocked(dapm, "Platform Clock");
|
||||
if (rt5640->use_platform_clock)
|
||||
snd_soc_dapm_force_enable_pin_unlocked(dapm, "Platform Clock");
|
||||
snd_soc_dapm_sync_unlocked(dapm);
|
||||
snd_soc_dapm_mutex_unlock(dapm);
|
||||
}
|
||||
@ -2108,9 +2110,11 @@ EXPORT_SYMBOL_GPL(rt5640_enable_micbias1_for_ovcd);
|
||||
void rt5640_disable_micbias1_for_ovcd(struct snd_soc_component *component)
|
||||
{
|
||||
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
|
||||
struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
snd_soc_dapm_mutex_lock(dapm);
|
||||
snd_soc_dapm_disable_pin_unlocked(dapm, "Platform Clock");
|
||||
if (rt5640->use_platform_clock)
|
||||
snd_soc_dapm_disable_pin_unlocked(dapm, "Platform Clock");
|
||||
snd_soc_dapm_disable_pin_unlocked(dapm, "MICBIAS1");
|
||||
snd_soc_dapm_disable_pin_unlocked(dapm, "LDO2");
|
||||
snd_soc_dapm_sync_unlocked(dapm);
|
||||
@ -2535,6 +2539,9 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component,
|
||||
rt5640->jd_gpio_irq_requested = true;
|
||||
}
|
||||
|
||||
if (jack_data && jack_data->use_platform_clock)
|
||||
rt5640->use_platform_clock = jack_data->use_platform_clock;
|
||||
|
||||
ret = request_irq(rt5640->irq, rt5640_irq,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||
"rt5640", rt5640);
|
||||
|
@ -2155,11 +2155,13 @@ struct rt5640_priv {
|
||||
bool jd_inverted;
|
||||
unsigned int ovcd_th;
|
||||
unsigned int ovcd_sf;
|
||||
bool use_platform_clock;
|
||||
};
|
||||
|
||||
struct rt5640_set_jack_data {
|
||||
int codec_irq_override;
|
||||
struct gpio_desc *jd_gpio;
|
||||
bool use_platform_clock;
|
||||
};
|
||||
|
||||
int rt5640_dmic_enable(struct snd_soc_component *component,
|
||||
|
@ -80,8 +80,8 @@
|
||||
#define FSL_SAI_xCR3(tx, ofs) (tx ? FSL_SAI_TCR3(ofs) : FSL_SAI_RCR3(ofs))
|
||||
#define FSL_SAI_xCR4(tx, ofs) (tx ? FSL_SAI_TCR4(ofs) : FSL_SAI_RCR4(ofs))
|
||||
#define FSL_SAI_xCR5(tx, ofs) (tx ? FSL_SAI_TCR5(ofs) : FSL_SAI_RCR5(ofs))
|
||||
#define FSL_SAI_xDR(tx, ofs) (tx ? FSL_SAI_TDR(ofs) : FSL_SAI_RDR(ofs))
|
||||
#define FSL_SAI_xFR(tx, ofs) (tx ? FSL_SAI_TFR(ofs) : FSL_SAI_RFR(ofs))
|
||||
#define FSL_SAI_xDR0(tx) (tx ? FSL_SAI_TDR0 : FSL_SAI_RDR0)
|
||||
#define FSL_SAI_xFR0(tx) (tx ? FSL_SAI_TFR0 : FSL_SAI_RFR0)
|
||||
#define FSL_SAI_xMR(tx) (tx ? FSL_SAI_TMR : FSL_SAI_RMR)
|
||||
|
||||
/* SAI Transmit/Receive Control Register */
|
||||
|
@ -326,7 +326,8 @@ static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach
|
||||
num_ssps = adev->hw_cfg.i2s_caps.ctrl_count;
|
||||
if (fls(mach->mach_params.i2s_link_mask) > num_ssps) {
|
||||
dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
|
||||
num_ssps, mach->drv_name, __fls(mach->mach_params.i2s_link_mask));
|
||||
num_ssps, mach->drv_name,
|
||||
(unsigned long)__fls(mach->mach_params.i2s_link_mask));
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -1191,12 +1191,14 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
|
||||
{
|
||||
struct snd_soc_card *card = runtime->card;
|
||||
struct byt_rt5640_private *priv = snd_soc_card_get_drvdata(card);
|
||||
struct rt5640_set_jack_data *jack_data = &priv->jack_data;
|
||||
struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component;
|
||||
const struct snd_soc_dapm_route *custom_map = NULL;
|
||||
int num_routes = 0;
|
||||
int ret;
|
||||
|
||||
card->dapm.idle_bias_off = true;
|
||||
jack_data->use_platform_clock = true;
|
||||
|
||||
/* Start with RC clk for jack-detect (we disable MCLK below) */
|
||||
if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN)
|
||||
|
@ -453,7 +453,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
|
||||
.drv_name = "adl_mx98360a_nau8825",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &adl_max98360a_amp,
|
||||
.sof_tplg_filename = "sof-adl-mx98360a-nau8825.tplg",
|
||||
.sof_tplg_filename = "sof-adl-max98360a-nau8825.tplg",
|
||||
},
|
||||
{
|
||||
.id = "RTL5682",
|
||||
|
@ -2128,8 +2128,6 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream,
|
||||
else
|
||||
ret = soc_pcm_trigger(be_substream,
|
||||
SNDRV_PCM_TRIGGER_START);
|
||||
|
||||
ret = soc_pcm_trigger(be_substream, cmd);
|
||||
if (ret) {
|
||||
be->dpcm[stream].be_start--;
|
||||
goto next;
|
||||
|
Loading…
Reference in New Issue
Block a user