mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
sound fixes for 5.19-rc2
Here are a collection of fixes; almost all changes are device-specific small fixes over ASoC, HD-audio and USB-audio. No sign of serious breakage, so far. -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmKiFRwOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE9v0Q/7BSDYylUiutTiu5K7tgIE97NVlHMwQsZNESly UvKuA5d3eZHuKK0StVWAPD2uU6ovTms/I6dsNWbroPEfPuF4EpLB5CpAKFQNV0tk QtvaC4Lo/6RbCHuorfUrF4RPR671Bkeo1qYMmcfyXZKPBQ4PV57wMGQl/xlYWrnt jXfjomwMoXAO//08u7RoGfzW/3BfnvLH0dKtlwSBC9i3jKQhGjFu7U33Md9DuC6J dUFjkw4vBoBm+U8CP3K+pdoNy+qz/JhTWL0dGk+zcGccK5WvpyjHIDYetGBMnvFO jjrSagBVUq9GCOZdgGyJKHMiVU5JzMSgvhUuQIjPkG53fK7tlxtvivcKdeSNrqs1 10MSMDV+WiAdNBHWJMUjooAMoo/B8XyL7M8fIv/VMQaIK3TikwKFg2TaKPl9O6Yv aWK4MmRysorUl2DLn7b3G14cy9pADLOfeSNVRIX1DsplpVzhAQC1hdN+WV250/+f HodAk0ZBar1f72BT+SiuhPPs95l+WR8LFVh93/AxOpojtpw1sGBKzqXpbznz2lNe 1SwkdSv2UUGhb/8Fj81AZO1kmrzU5Ezw/c/4VAHIFCr8Hs0cIq7QATdP211Ihbm/ gQKVwBpNbGxfwqaR0vMSfQZqFyH64I3bV5NaqQFDX8eCGHp6v82Dr2kkCDSPq5Oc z2vn5H8= =R4Du -----END PGP SIGNATURE----- Merge tag 'sound-5.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of fixes; almost all changes are device-specific small fixes over ASoC, HD-audio and USB-audio. No sign of serious breakage, so far" * tag 'sound-5.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: hda/realtek: Add quirk for HP Dev One ALSA: hda/realtek - Add HW8326 support ALSA: hda/conexant - Fix loopback issue with CX20632 ALSA: hda: MTL: add HD Audio PCI ID and HDMI codec vendor ID ALSA: usb-audio: Set up (implicit) sync for Saffire 6 ALSA: usb-audio: Skip generic sync EP parse for secondary EP ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put() ASoC: es8328: Fix event generation for deemphasis control ASoC: wm8962: Fix suspend while playing music ASoC: SOF: ipc-msg-injector: Fix reversed if statement ASoC: SOF: ipc-msg-injector: Propagate write errors correctly ASoC: fsl_sai: Add support for i.MX8MN ASoC: SOF: Fix potential NULL pointer dereference ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo Yoga DuetITL 2021 ASoC: cs42l51: Correct minimum value for SX volume control ASoC: cs42l56: Correct typo in minimum level for SX volume controls ASoC: cs42l52: Correct TLV for Bypass Volume ASoC: cs53l30: Correct number of volume levels on SX controls ASoC: cs35l36: Update digital volume TLV ASoC: cs42l52: Fix TLV scales for mixer controls ...
This commit is contained in:
commit
8f7ac50c97
@ -660,6 +660,7 @@ static const struct hda_vendor_id hda_vendor_ids[] = {
|
||||
{ 0x14f1, "Conexant" },
|
||||
{ 0x17e8, "Chrontel" },
|
||||
{ 0x1854, "LG" },
|
||||
{ 0x19e5, "Huawei" },
|
||||
{ 0x1aec, "Wolfson Microelectronics" },
|
||||
{ 0x1af4, "QEMU" },
|
||||
{ 0x434d, "C-Media" },
|
||||
|
@ -2525,6 +2525,9 @@ static const struct pci_device_id azx_ids[] = {
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
{ PCI_DEVICE(0x8086, 0x51cf),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
/* Meteorlake-P */
|
||||
{ PCI_DEVICE(0x8086, 0x7e28),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
/* Broxton-P(Apollolake) */
|
||||
{ PCI_DEVICE(0x8086, 0x5a98),
|
||||
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON },
|
||||
|
@ -1052,6 +1052,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
|
||||
snd_hda_pick_fixup(codec, cxt5051_fixup_models,
|
||||
cxt5051_fixups, cxt_fixups);
|
||||
break;
|
||||
case 0x14f15098:
|
||||
codec->pin_amp_workaround = 1;
|
||||
spec->gen.mixer_nid = 0x22;
|
||||
spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;
|
||||
snd_hda_pick_fixup(codec, cxt5066_fixup_models,
|
||||
cxt5066_fixups, cxt_fixups);
|
||||
break;
|
||||
case 0x14f150f2:
|
||||
codec->power_save_node = 1;
|
||||
fallthrough;
|
||||
|
@ -4554,6 +4554,7 @@ HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_adlp_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281f, "Raptorlake-P HDMI", patch_i915_adlp_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281d, "Meteorlake HDMI", patch_i915_adlp_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi),
|
||||
|
@ -443,6 +443,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
|
||||
case 0x10ec0245:
|
||||
case 0x10ec0255:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
case 0x10ec0257:
|
||||
case 0x10ec0282:
|
||||
case 0x10ec0283:
|
||||
@ -580,6 +581,7 @@ static void alc_shutup_pins(struct hda_codec *codec)
|
||||
switch (codec->core.vendor_id) {
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
case 0x10ec0283:
|
||||
case 0x10ec0286:
|
||||
case 0x10ec0288:
|
||||
@ -3247,6 +3249,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_write_coef_idx(codec, 0x48, 0x0);
|
||||
alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
|
||||
break;
|
||||
@ -3275,6 +3278,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_write_coef_idx(codec, 0x48, 0xd011);
|
||||
alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
|
||||
break;
|
||||
@ -4910,6 +4914,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_process_coef_fw(codec, coef0256);
|
||||
break;
|
||||
case 0x10ec0234:
|
||||
@ -5025,6 +5030,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_write_coef_idx(codec, 0x45, 0xc489);
|
||||
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
|
||||
alc_process_coef_fw(codec, coef0256);
|
||||
@ -5175,6 +5181,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
|
||||
alc_write_coef_idx(codec, 0x45, 0xc089);
|
||||
msleep(50);
|
||||
@ -5274,6 +5281,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_process_coef_fw(codec, coef0256);
|
||||
break;
|
||||
case 0x10ec0234:
|
||||
@ -5388,6 +5396,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_process_coef_fw(codec, coef0256);
|
||||
break;
|
||||
case 0x10ec0234:
|
||||
@ -5489,6 +5498,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
|
||||
alc_write_coef_idx(codec, 0x06, 0x6104);
|
||||
alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
|
||||
@ -5783,6 +5793,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_process_coef_fw(codec, alc256fw);
|
||||
break;
|
||||
}
|
||||
@ -6385,6 +6396,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0255:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
|
||||
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
|
||||
break;
|
||||
@ -9059,6 +9071,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||
SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
|
||||
SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
|
||||
SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
||||
@ -9258,6 +9271,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
|
||||
@ -10095,6 +10109,7 @@ static int patch_alc269(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x19e58326:
|
||||
spec->codec_variant = ALC269_TYPE_ALC256;
|
||||
spec->shutup = alc256_shutup;
|
||||
spec->init_hook = alc256_init;
|
||||
@ -11545,6 +11560,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
|
||||
HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
|
||||
HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
|
||||
HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
|
||||
HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
|
||||
{} /* terminator */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);
|
||||
|
@ -444,7 +444,8 @@ static bool cs35l36_volatile_reg(struct device *dev, unsigned int reg)
|
||||
}
|
||||
}
|
||||
|
||||
static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10200, 25, 0);
|
||||
static const DECLARE_TLV_DB_RANGE(dig_vol_tlv, 0, 912,
|
||||
TLV_DB_MINMAX_ITEM(-10200, 1200));
|
||||
static DECLARE_TLV_DB_SCALE(amp_gain_tlv, 0, 1, 1);
|
||||
|
||||
static const char * const cs35l36_pcm_sftramp_text[] = {
|
||||
|
@ -143,7 +143,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
|
||||
0, 0xA0, 96, adc_att_tlv),
|
||||
SOC_DOUBLE_R_SX_TLV("PGA Volume",
|
||||
CS42L51_ALC_PGA_CTL, CS42L51_ALC_PGB_CTL,
|
||||
0, 0x1A, 30, pga_tlv),
|
||||
0, 0x19, 30, pga_tlv),
|
||||
SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0),
|
||||
SOC_SINGLE("Auto-Mute Switch", CS42L51_DAC_CTL, 2, 1, 0),
|
||||
SOC_SINGLE("Soft Ramp Switch", CS42L51_DAC_CTL, 1, 1, 0),
|
||||
|
@ -137,7 +137,9 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0);
|
||||
|
||||
static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0);
|
||||
|
||||
static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0);
|
||||
static DECLARE_TLV_DB_SCALE(pass_tlv, -6000, 50, 0);
|
||||
|
||||
static DECLARE_TLV_DB_SCALE(mix_tlv, -5150, 50, 0);
|
||||
|
||||
static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0);
|
||||
|
||||
@ -351,7 +353,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
|
||||
CS42L52_SPKB_VOL, 0, 0x40, 0xC0, hl_tlv),
|
||||
|
||||
SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL,
|
||||
CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pga_tlv),
|
||||
CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pass_tlv),
|
||||
|
||||
SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0),
|
||||
|
||||
@ -364,7 +366,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
|
||||
CS42L52_ADCB_VOL, 0, 0xA0, 0x78, ipd_tlv),
|
||||
SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume",
|
||||
CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL,
|
||||
0, 0x19, 0x7F, ipd_tlv),
|
||||
0, 0x19, 0x7F, mix_tlv),
|
||||
|
||||
SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0),
|
||||
|
||||
|
@ -391,9 +391,9 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = {
|
||||
SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1),
|
||||
|
||||
SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME,
|
||||
CS42L56_HPB_VOLUME, 0, 0x84, 0x48, hl_tlv),
|
||||
CS42L56_HPB_VOLUME, 0, 0x44, 0x48, hl_tlv),
|
||||
SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME,
|
||||
CS42L56_LOB_VOLUME, 0, 0x84, 0x48, hl_tlv),
|
||||
CS42L56_LOB_VOLUME, 0, 0x44, 0x48, hl_tlv),
|
||||
|
||||
SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL,
|
||||
0, 0x00, 1, tone_tlv),
|
||||
|
@ -348,22 +348,22 @@ static const struct snd_kcontrol_new cs53l30_snd_controls[] = {
|
||||
SOC_ENUM("ADC2 NG Delay", adc2_ng_delay_enum),
|
||||
|
||||
SOC_SINGLE_SX_TLV("ADC1A PGA Volume",
|
||||
CS53L30_ADC1A_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
|
||||
CS53L30_ADC1A_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
|
||||
SOC_SINGLE_SX_TLV("ADC1B PGA Volume",
|
||||
CS53L30_ADC1B_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
|
||||
CS53L30_ADC1B_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
|
||||
SOC_SINGLE_SX_TLV("ADC2A PGA Volume",
|
||||
CS53L30_ADC2A_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
|
||||
CS53L30_ADC2A_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
|
||||
SOC_SINGLE_SX_TLV("ADC2B PGA Volume",
|
||||
CS53L30_ADC2B_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
|
||||
CS53L30_ADC2B_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
|
||||
|
||||
SOC_SINGLE_SX_TLV("ADC1A Digital Volume",
|
||||
CS53L30_ADC1A_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
|
||||
CS53L30_ADC1A_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
|
||||
SOC_SINGLE_SX_TLV("ADC1B Digital Volume",
|
||||
CS53L30_ADC1B_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
|
||||
CS53L30_ADC1B_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
|
||||
SOC_SINGLE_SX_TLV("ADC2A Digital Volume",
|
||||
CS53L30_ADC2A_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
|
||||
CS53L30_ADC2A_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
|
||||
SOC_SINGLE_SX_TLV("ADC2B Digital Volume",
|
||||
CS53L30_ADC2B_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
|
||||
CS53L30_ADC2B_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_widget cs53l30_dapm_widgets[] = {
|
||||
|
@ -161,13 +161,16 @@ static int es8328_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (es8328->deemph == deemph)
|
||||
return 0;
|
||||
|
||||
ret = es8328_set_deemph(component);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
es8328->deemph = deemph;
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -740,6 +740,8 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
|
||||
pll_param->pll_int, pll_param->pll_frac,
|
||||
pll_param->mclk_scaler, pll_param->pre_factor);
|
||||
|
||||
snd_soc_component_update_bits(component,
|
||||
NAU8822_REG_POWER_MANAGEMENT_1, NAU8822_PLL_EN_MASK, NAU8822_PLL_OFF);
|
||||
snd_soc_component_update_bits(component,
|
||||
NAU8822_REG_PLL_N, NAU8822_PLLMCLK_DIV2 | NAU8822_PLLN_MASK,
|
||||
(pll_param->pre_factor ? NAU8822_PLLMCLK_DIV2 : 0) |
|
||||
@ -757,6 +759,8 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
|
||||
pll_param->mclk_scaler << NAU8822_MCLKSEL_SFT);
|
||||
snd_soc_component_update_bits(component,
|
||||
NAU8822_REG_CLOCKING, NAU8822_CLKM_MASK, NAU8822_CLKM_PLL);
|
||||
snd_soc_component_update_bits(component,
|
||||
NAU8822_REG_POWER_MANAGEMENT_1, NAU8822_PLL_EN_MASK, NAU8822_PLL_ON);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -90,6 +90,9 @@
|
||||
#define NAU8822_REFIMP_3K 0x3
|
||||
#define NAU8822_IOBUF_EN (0x1 << 2)
|
||||
#define NAU8822_ABIAS_EN (0x1 << 3)
|
||||
#define NAU8822_PLL_EN_MASK (0x1 << 5)
|
||||
#define NAU8822_PLL_ON (0x1 << 5)
|
||||
#define NAU8822_PLL_OFF (0x0 << 5)
|
||||
|
||||
/* NAU8822_REG_AUDIO_INTERFACE (0x4) */
|
||||
#define NAU8822_AIFMT_MASK (0x3 << 3)
|
||||
|
@ -3868,6 +3868,7 @@ static int wm8962_runtime_suspend(struct device *dev)
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops wm8962_pm = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
|
||||
SET_RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
|
@ -333,7 +333,7 @@ int wm_adsp_fw_put(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
|
||||
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
|
||||
struct wm_adsp *dsp = snd_soc_component_get_drvdata(component);
|
||||
int ret = 0;
|
||||
int ret = 1;
|
||||
|
||||
if (ucontrol->value.enumerated.item[0] == dsp[e->shift_l].fw)
|
||||
return 0;
|
||||
|
@ -1293,6 +1293,7 @@ static const struct of_device_id fsl_sai_ids[] = {
|
||||
{ .compatible = "fsl,imx8mm-sai", .data = &fsl_sai_imx8mm_data },
|
||||
{ .compatible = "fsl,imx8mp-sai", .data = &fsl_sai_imx8mp_data },
|
||||
{ .compatible = "fsl,imx8ulp-sai", .data = &fsl_sai_imx8ulp_data },
|
||||
{ .compatible = "fsl,imx8mn-sai", .data = &fsl_sai_imx8mp_data },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, fsl_sai_ids);
|
||||
|
@ -54,23 +54,30 @@ static struct snd_soc_dai_link_component cs35l41_components[] = {
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Mapping between ACPI instance id and speaker position.
|
||||
*
|
||||
* Four speakers:
|
||||
* 0: Tweeter left, 1: Woofer left
|
||||
* 2: Tweeter right, 3: Woofer right
|
||||
*/
|
||||
static struct snd_soc_codec_conf cs35l41_codec_conf[] = {
|
||||
{
|
||||
.dlc = COMP_CODEC_CONF(CS35L41_DEV0_NAME),
|
||||
.name_prefix = "WL",
|
||||
},
|
||||
{
|
||||
.dlc = COMP_CODEC_CONF(CS35L41_DEV1_NAME),
|
||||
.name_prefix = "WR",
|
||||
},
|
||||
{
|
||||
.dlc = COMP_CODEC_CONF(CS35L41_DEV2_NAME),
|
||||
.name_prefix = "TL",
|
||||
},
|
||||
{
|
||||
.dlc = COMP_CODEC_CONF(CS35L41_DEV3_NAME),
|
||||
.dlc = COMP_CODEC_CONF(CS35L41_DEV1_NAME),
|
||||
.name_prefix = "WL",
|
||||
},
|
||||
{
|
||||
.dlc = COMP_CODEC_CONF(CS35L41_DEV2_NAME),
|
||||
.name_prefix = "TR",
|
||||
},
|
||||
{
|
||||
.dlc = COMP_CODEC_CONF(CS35L41_DEV3_NAME),
|
||||
.name_prefix = "WR",
|
||||
},
|
||||
};
|
||||
|
||||
static int cs35l41_init(struct snd_soc_pcm_runtime *rtd)
|
||||
@ -101,6 +108,21 @@ static int cs35l41_init(struct snd_soc_pcm_runtime *rtd)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Channel map:
|
||||
*
|
||||
* TL/WL: ASPRX1 on slot 0, ASPRX2 on slot 1 (default)
|
||||
* TR/WR: ASPRX1 on slot 1, ASPRX2 on slot 0
|
||||
*/
|
||||
static const struct {
|
||||
unsigned int rx[2];
|
||||
} cs35l41_channel_map[] = {
|
||||
{.rx = {0, 1}}, /* TL */
|
||||
{.rx = {0, 1}}, /* WL */
|
||||
{.rx = {1, 0}}, /* TR */
|
||||
{.rx = {1, 0}}, /* WR */
|
||||
};
|
||||
|
||||
static int cs35l41_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
@ -134,6 +156,16 @@ static int cs35l41_hw_params(struct snd_pcm_substream *substream,
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* setup channel map */
|
||||
ret = snd_soc_dai_set_channel_map(codec_dai, 0, NULL,
|
||||
ARRAY_SIZE(cs35l41_channel_map[i].rx),
|
||||
(unsigned int *)cs35l41_channel_map[i].rx);
|
||||
if (ret < 0) {
|
||||
dev_err(codec_dai->dev, "fail to set channel map, ret %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -898,7 +898,7 @@ static int lpass_platform_cdc_dma_mmap(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
unsigned long size, offset;
|
||||
|
||||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
|
||||
size = vma->vm_end - vma->vm_start;
|
||||
offset = vma->vm_pgoff << PAGE_SHIFT;
|
||||
return io_remap_pfn_range(vma, vma->vm_start,
|
||||
|
@ -318,7 +318,7 @@ sink_prepare:
|
||||
p->walking = false;
|
||||
if (ret < 0) {
|
||||
/* unprepare the source widget */
|
||||
if (!widget_ops[widget->id].ipc_unprepare && swidget->prepared) {
|
||||
if (widget_ops[widget->id].ipc_unprepare && swidget->prepared) {
|
||||
widget_ops[widget->id].ipc_unprepare(swidget);
|
||||
swidget->prepared = false;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ static ssize_t sof_msg_inject_dfs_write(struct file *file, const char __user *bu
|
||||
{
|
||||
struct sof_client_dev *cdev = file->private_data;
|
||||
struct sof_msg_inject_priv *priv = cdev->data;
|
||||
size_t size;
|
||||
ssize_t size;
|
||||
int ret;
|
||||
|
||||
if (*ppos)
|
||||
@ -158,8 +158,10 @@ static ssize_t sof_msg_inject_dfs_write(struct file *file, const char __user *bu
|
||||
|
||||
size = simple_write_to_buffer(priv->tx_buffer, priv->max_msg_size,
|
||||
ppos, buffer, count);
|
||||
if (size < 0)
|
||||
return size;
|
||||
if (size != count)
|
||||
return size > 0 ? -EFAULT : size;
|
||||
return -EFAULT;
|
||||
|
||||
memset(priv->rx_buffer, 0, priv->max_msg_size);
|
||||
|
||||
@ -179,7 +181,7 @@ static ssize_t sof_msg_inject_ipc4_dfs_write(struct file *file,
|
||||
struct sof_client_dev *cdev = file->private_data;
|
||||
struct sof_msg_inject_priv *priv = cdev->data;
|
||||
struct sof_ipc4_msg *ipc4_msg = priv->tx_buffer;
|
||||
size_t size;
|
||||
ssize_t size;
|
||||
int ret;
|
||||
|
||||
if (*ppos)
|
||||
@ -192,18 +194,20 @@ static ssize_t sof_msg_inject_ipc4_dfs_write(struct file *file,
|
||||
size = simple_write_to_buffer(&ipc4_msg->header_u64,
|
||||
sizeof(ipc4_msg->header_u64),
|
||||
ppos, buffer, count);
|
||||
if (size < 0)
|
||||
return size;
|
||||
if (size != sizeof(ipc4_msg->header_u64))
|
||||
return size > 0 ? -EFAULT : size;
|
||||
return -EFAULT;
|
||||
|
||||
count -= size;
|
||||
if (!count) {
|
||||
/* Copy the payload */
|
||||
size = simple_write_to_buffer(ipc4_msg->data_ptr,
|
||||
priv->max_msg_size, ppos, buffer,
|
||||
count);
|
||||
if (size != count)
|
||||
return size > 0 ? -EFAULT : size;
|
||||
}
|
||||
/* Copy the payload */
|
||||
size = simple_write_to_buffer(ipc4_msg->data_ptr,
|
||||
priv->max_msg_size, ppos, buffer,
|
||||
count);
|
||||
if (size < 0)
|
||||
return size;
|
||||
if (size != count)
|
||||
return -EFAULT;
|
||||
|
||||
ipc4_msg->data_size = count;
|
||||
|
||||
|
@ -291,6 +291,9 @@ int snd_usb_audioformat_set_sync_ep(struct snd_usb_audio *chip,
|
||||
bool is_playback;
|
||||
int err;
|
||||
|
||||
if (fmt->sync_ep)
|
||||
return 0; /* already set up */
|
||||
|
||||
alts = snd_usb_get_host_interface(chip, fmt->iface, fmt->altsetting);
|
||||
if (!alts)
|
||||
return 0;
|
||||
@ -304,7 +307,7 @@ int snd_usb_audioformat_set_sync_ep(struct snd_usb_audio *chip,
|
||||
* Generic sync EP handling
|
||||
*/
|
||||
|
||||
if (altsd->bNumEndpoints < 2)
|
||||
if (fmt->ep_idx > 0 || altsd->bNumEndpoints < 2)
|
||||
return 0;
|
||||
|
||||
is_playback = !(get_endpoint(alts, 0)->bEndpointAddress & USB_DIR_IN);
|
||||
|
@ -2658,7 +2658,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||
.nr_rates = 2,
|
||||
.rate_table = (unsigned int[]) {
|
||||
44100, 48000
|
||||
}
|
||||
},
|
||||
.sync_ep = 0x82,
|
||||
.sync_iface = 0,
|
||||
.sync_altsetting = 1,
|
||||
.sync_ep_idx = 1,
|
||||
.implicit_fb = 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user