mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
sound fixes for 6.17-rc3
Only small fixes. - ASoC Cirrus codec fixes - A regression fix for the recent TAS2781 codec refactoring - A fix for user-timer error handling - Fixes for USB-audio descriptor validators - Usual HD-audio and ASoC device-specific quirks -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAminN10OHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE/RFw//XtS8u0fRY+WRbFdV7zE+nUBszbqAfOBs7kzd jB3iWJogKyeUq/whgT1xDa3R7PPHK74XDrSEAEJTTmyiUtAPMNh895CGIEqD07nz sg1rHlDLNgB4Hdc4cfiBXfSMZnPH4CAnWUSnUF7QsSXmaPHyhJsc3zQDwrVEl0/j DLuaF5BjzOGVL8my61UWCUrAEI+lVBerlJ5A2RT2LnZxH6f/PgtGmXyFElcfnxy0 TFZ/na7llmNn4O+yUPq/w/lvaEXE5ER/G4vfDbtQTlOeBXI4IHJ2xWtPGGA1Nkbm YagdLxoBAMq+mL4HOHhldF0nuPbia0LFdpc5NEmFT8D4SOuy6WS+0qlqAxpytbSC T9UhLDe1lDiMhVYhnvqPORNIC7lCXsUHIT/fccaK240qpQidwzmNDA8JsFNC6ZZj D/wJddMk8XgCs3kmIa8P7nfnF4QO+xIATaiWjpBgE+ahIpWZFMq1f7ZKY3pwjqu3 kJg4GsMeopqyOphD2mX3EQMJ6x4aDpemRLxVj9esPqvpT+j5dViLQsZI/h2n8ZUU V253FW9qj7uFPTQ/hYDcDXneMGG/kS741ggTFmHNJSNOAk31qBfOGjS52LkkHvw1 DT/UouG6GRh4Qgq23doRIC2zRU6ySh4KbktGvysVAvljMvRJLroQywJNyaTVH3HP 9Z+1zxI= =myx0 -----END PGP SIGNATURE----- Merge tag 'sound-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Only small fixes. - ASoC Cirrus codec fixes - A regression fix for the recent TAS2781 codec refactoring - A fix for user-timer error handling - Fixes for USB-audio descriptor validators - Usual HD-audio and ASoC device-specific quirks" * tag 'sound-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Use correct sub-type for UAC3 feature unit validation ALSA: timer: fix ida_free call while not allocated ASoC: cs35l56: Remove SoundWire Clock Divider workaround for CS35L63 ASoC: cs35l56: Handle new algorithms IDs for CS35L63 ASoC: cs35l56: Update Firmware Addresses for CS35L63 for production silicon ALSA: hda: tas2781: Fix wrong reference of tasdevice_priv ALSA: hda/realtek: Audio disappears on HP 15-fc000 after warm boot again ALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14 ASoC: codecs: ES9389: Modify the standby configuration ALSA: usb-audio: Fix size validation in convert_chmap_v3() ALSA: hda/tas2781: Add name prefix tas2781 for tas2781's dvc_tlv and amp_vol_tlv ALSA: hda/realtek: Add support for HP EliteBook x360 830 G6 and EliteBook 830 G6
This commit is contained in:
commit
f28ad47b66
@ -107,8 +107,8 @@
|
|||||||
#define CS35L56_DSP1_PMEM_5114 0x3804FE8
|
#define CS35L56_DSP1_PMEM_5114 0x3804FE8
|
||||||
|
|
||||||
#define CS35L63_DSP1_FW_VER CS35L56_DSP1_FW_VER
|
#define CS35L63_DSP1_FW_VER CS35L56_DSP1_FW_VER
|
||||||
#define CS35L63_DSP1_HALO_STATE 0x280396C
|
#define CS35L63_DSP1_HALO_STATE 0x2803C04
|
||||||
#define CS35L63_DSP1_PM_CUR_STATE 0x28042C8
|
#define CS35L63_DSP1_PM_CUR_STATE 0x2804518
|
||||||
#define CS35L63_PROTECTION_STATUS 0x340009C
|
#define CS35L63_PROTECTION_STATUS 0x340009C
|
||||||
#define CS35L63_TRANSDUCER_ACTUAL_PS 0x34000F4
|
#define CS35L63_TRANSDUCER_ACTUAL_PS 0x34000F4
|
||||||
#define CS35L63_MAIN_RENDER_USER_MUTE 0x3400020
|
#define CS35L63_MAIN_RENDER_USER_MUTE 0x3400020
|
||||||
@ -306,6 +306,7 @@ struct cs35l56_base {
|
|||||||
struct gpio_desc *reset_gpio;
|
struct gpio_desc *reset_gpio;
|
||||||
struct cs35l56_spi_payload *spi_payload_buf;
|
struct cs35l56_spi_payload *spi_payload_buf;
|
||||||
const struct cs35l56_fw_reg *fw_reg;
|
const struct cs35l56_fw_reg *fw_reg;
|
||||||
|
const struct cirrus_amp_cal_controls *calibration_controls;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline bool cs35l56_is_otp_register(unsigned int reg)
|
static inline bool cs35l56_is_otp_register(unsigned int reg)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
|
// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
|
||||||
//
|
//
|
||||||
// Copyright (C) 2022 - 2024 Texas Instruments Incorporated
|
// Copyright (C) 2022 - 2025 Texas Instruments Incorporated
|
||||||
// https://www.ti.com
|
// https://www.ti.com
|
||||||
//
|
//
|
||||||
// The TAS2781 driver implements a flexible and configurable
|
// The TAS2781 driver implements a flexible and configurable
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#ifndef __TAS2781_TLV_H__
|
#ifndef __TAS2781_TLV_H__
|
||||||
#define __TAS2781_TLV_H__
|
#define __TAS2781_TLV_H__
|
||||||
|
|
||||||
static const __maybe_unused DECLARE_TLV_DB_SCALE(dvc_tlv, -10000, 50, 0);
|
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2781_dvc_tlv, -10000, 50, 0);
|
||||||
static const __maybe_unused DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
|
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2781_amp_tlv, 1100, 50, 0);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -2139,14 +2139,14 @@ static int snd_utimer_create(struct snd_timer_uinfo *utimer_info,
|
|||||||
goto err_take_id;
|
goto err_take_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
utimer->id = utimer_id;
|
||||||
|
|
||||||
utimer->name = kasprintf(GFP_KERNEL, "snd-utimer%d", utimer_id);
|
utimer->name = kasprintf(GFP_KERNEL, "snd-utimer%d", utimer_id);
|
||||||
if (!utimer->name) {
|
if (!utimer->name) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_get_name;
|
goto err_get_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
utimer->id = utimer_id;
|
|
||||||
|
|
||||||
tid.dev_sclass = SNDRV_TIMER_SCLASS_APPLICATION;
|
tid.dev_sclass = SNDRV_TIMER_SCLASS_APPLICATION;
|
||||||
tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL;
|
tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL;
|
||||||
tid.card = -1;
|
tid.card = -1;
|
||||||
|
@ -510,6 +510,15 @@ static void alc256_shutup(struct hda_codec *codec)
|
|||||||
hp_pin = 0x21;
|
hp_pin = 0x21;
|
||||||
|
|
||||||
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
|
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
|
||||||
|
|
||||||
|
/* 3k pull low control for Headset jack. */
|
||||||
|
/* NOTE: call this before clearing the pin, otherwise codec stalls */
|
||||||
|
/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
|
||||||
|
* when booting with headset plugged. So skip setting it for the codec alc257
|
||||||
|
*/
|
||||||
|
if (spec->en_3kpull_low)
|
||||||
|
alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
|
||||||
|
|
||||||
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
||||||
|
|
||||||
if (hp_pin_sense) {
|
if (hp_pin_sense) {
|
||||||
@ -520,14 +529,6 @@ static void alc256_shutup(struct hda_codec *codec)
|
|||||||
|
|
||||||
msleep(75);
|
msleep(75);
|
||||||
|
|
||||||
/* 3k pull low control for Headset jack. */
|
|
||||||
/* NOTE: call this before clearing the pin, otherwise codec stalls */
|
|
||||||
/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
|
|
||||||
* when booting with headset plugged. So skip setting it for the codec alc257
|
|
||||||
*/
|
|
||||||
if (spec->en_3kpull_low)
|
|
||||||
alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
|
|
||||||
|
|
||||||
if (!spec->no_shutup_pins)
|
if (!spec->no_shutup_pins)
|
||||||
snd_hda_codec_write(codec, hp_pin, 0,
|
snd_hda_codec_write(codec, hp_pin, 0,
|
||||||
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
|
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
|
||||||
@ -3579,6 +3580,7 @@ enum {
|
|||||||
ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
|
ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
|
||||||
ALC294_FIXUP_ASUS_MIC,
|
ALC294_FIXUP_ASUS_MIC,
|
||||||
ALC294_FIXUP_ASUS_HEADSET_MIC,
|
ALC294_FIXUP_ASUS_HEADSET_MIC,
|
||||||
|
ALC294_FIXUP_ASUS_I2C_HEADSET_MIC,
|
||||||
ALC294_FIXUP_ASUS_SPK,
|
ALC294_FIXUP_ASUS_SPK,
|
||||||
ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
|
ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
|
||||||
ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
|
ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
|
||||||
@ -4889,6 +4891,15 @@ static const struct hda_fixup alc269_fixups[] = {
|
|||||||
.chained = true,
|
.chained = true,
|
||||||
.chain_id = ALC269_FIXUP_HEADSET_MIC
|
.chain_id = ALC269_FIXUP_HEADSET_MIC
|
||||||
},
|
},
|
||||||
|
[ALC294_FIXUP_ASUS_I2C_HEADSET_MIC] = {
|
||||||
|
.type = HDA_FIXUP_PINS,
|
||||||
|
.v.pins = (const struct hda_pintbl[]) {
|
||||||
|
{ 0x19, 0x03a19020 }, /* use as headset mic */
|
||||||
|
{ }
|
||||||
|
},
|
||||||
|
.chained = true,
|
||||||
|
.chain_id = ALC287_FIXUP_CS35L41_I2C_2
|
||||||
|
},
|
||||||
[ALC294_FIXUP_ASUS_SPK] = {
|
[ALC294_FIXUP_ASUS_SPK] = {
|
||||||
.type = HDA_FIXUP_VERBS,
|
.type = HDA_FIXUP_VERBS,
|
||||||
.v.verbs = (const struct hda_verb[]) {
|
.v.verbs = (const struct hda_verb[]) {
|
||||||
@ -6368,6 +6379,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
|||||||
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
|
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
|
||||||
SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
|
SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
|
||||||
SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||||
|
SND_PCI_QUIRK(0x103c, 0x8548, "HP EliteBook x360 830 G6", ALC285_FIXUP_HP_GPIO_LED),
|
||||||
|
SND_PCI_QUIRK(0x103c, 0x854a, "HP EliteBook 830 G6", ALC285_FIXUP_HP_GPIO_LED),
|
||||||
SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11),
|
SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11),
|
||||||
SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
|
SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
|
||||||
SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
|
SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
|
||||||
@ -6728,7 +6741,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
|||||||
SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
|
SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
|
SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
|
||||||
SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
|
||||||
SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC287_FIXUP_CS35L41_I2C_2),
|
SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC294_FIXUP_ASUS_I2C_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
||||||
SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2),
|
SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2),
|
||||||
SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
|
SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
|
||||||
|
@ -267,7 +267,7 @@ static const struct snd_kcontrol_new tas2770_snd_controls[] = {
|
|||||||
static const struct snd_kcontrol_new tas2781_snd_controls[] = {
|
static const struct snd_kcontrol_new tas2781_snd_controls[] = {
|
||||||
ACARD_SINGLE_RANGE_EXT_TLV("Speaker Analog Volume", TAS2781_AMP_LEVEL,
|
ACARD_SINGLE_RANGE_EXT_TLV("Speaker Analog Volume", TAS2781_AMP_LEVEL,
|
||||||
1, 0, 20, 0, tas2781_amp_getvol,
|
1, 0, 20, 0, tas2781_amp_getvol,
|
||||||
tas2781_amp_putvol, amp_vol_tlv),
|
tas2781_amp_putvol, tas2781_amp_tlv),
|
||||||
ACARD_SINGLE_BOOL_EXT("Speaker Force Firmware Load", 0,
|
ACARD_SINGLE_BOOL_EXT("Speaker Force Firmware Load", 0,
|
||||||
tas2781_force_fwload_get, tas2781_force_fwload_put),
|
tas2781_force_fwload_get, tas2781_force_fwload_put),
|
||||||
};
|
};
|
||||||
@ -305,7 +305,7 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
|
|||||||
efi_char16_t efi_name[TAS2563_CAL_VAR_NAME_MAX];
|
efi_char16_t efi_name[TAS2563_CAL_VAR_NAME_MAX];
|
||||||
unsigned long max_size = TAS2563_CAL_DATA_SIZE;
|
unsigned long max_size = TAS2563_CAL_DATA_SIZE;
|
||||||
unsigned char var8[TAS2563_CAL_VAR_NAME_MAX];
|
unsigned char var8[TAS2563_CAL_VAR_NAME_MAX];
|
||||||
struct tasdevice_priv *p = h->hda_priv;
|
struct tasdevice_priv *p = h->priv;
|
||||||
struct calidata *cd = &p->cali_data;
|
struct calidata *cd = &p->cali_data;
|
||||||
struct cali_reg *r = &cd->cali_reg_array;
|
struct cali_reg *r = &cd->cali_reg_array;
|
||||||
unsigned int offset = 0;
|
unsigned int offset = 0;
|
||||||
|
@ -494,9 +494,11 @@ static int tas2781_force_fwload_put(struct snd_kcontrol *kcontrol,
|
|||||||
|
|
||||||
static struct snd_kcontrol_new tas2781_snd_ctls[] = {
|
static struct snd_kcontrol_new tas2781_snd_ctls[] = {
|
||||||
ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_AMP_LEVEL, 1, 0, 20, 0,
|
ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_AMP_LEVEL, 1, 0, 20, 0,
|
||||||
tas2781_amp_getvol, tas2781_amp_putvol, amp_vol_tlv),
|
tas2781_amp_getvol, tas2781_amp_putvol,
|
||||||
|
tas2781_amp_tlv),
|
||||||
ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_DVC_LVL, 0, 0, 200, 1,
|
ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_DVC_LVL, 0, 0, 200, 1,
|
||||||
tas2781_digital_getvol, tas2781_digital_putvol, dvc_tlv),
|
tas2781_digital_getvol, tas2781_digital_putvol,
|
||||||
|
tas2781_dvc_tlv),
|
||||||
ACARD_SINGLE_BOOL_EXT(NULL, 0, tas2781_force_fwload_get,
|
ACARD_SINGLE_BOOL_EXT(NULL, 0, tas2781_force_fwload_get,
|
||||||
tas2781_force_fwload_put),
|
tas2781_force_fwload_put),
|
||||||
};
|
};
|
||||||
|
@ -393,74 +393,6 @@ static int cs35l56_sdw_update_status(struct sdw_slave *peripheral,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cs35l63_sdw_kick_divider(struct cs35l56_private *cs35l56,
|
|
||||||
struct sdw_slave *peripheral)
|
|
||||||
{
|
|
||||||
unsigned int curr_scale_reg, next_scale_reg;
|
|
||||||
int curr_scale, next_scale, ret;
|
|
||||||
|
|
||||||
if (!cs35l56->base.init_done)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (peripheral->bus->params.curr_bank) {
|
|
||||||
curr_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B1;
|
|
||||||
next_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B0;
|
|
||||||
} else {
|
|
||||||
curr_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B0;
|
|
||||||
next_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Current clock scale value must be different to new value.
|
|
||||||
* Modify current to guarantee this. If next still has the dummy
|
|
||||||
* value we wrote when it was current, the core code has not set
|
|
||||||
* a new scale so restore its original good value
|
|
||||||
*/
|
|
||||||
curr_scale = sdw_read_no_pm(peripheral, curr_scale_reg);
|
|
||||||
if (curr_scale < 0) {
|
|
||||||
dev_err(cs35l56->base.dev, "Failed to read current clock scale: %d\n", curr_scale);
|
|
||||||
return curr_scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
next_scale = sdw_read_no_pm(peripheral, next_scale_reg);
|
|
||||||
if (next_scale < 0) {
|
|
||||||
dev_err(cs35l56->base.dev, "Failed to read next clock scale: %d\n", next_scale);
|
|
||||||
return next_scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (next_scale == CS35L56_SDW_INVALID_BUS_SCALE) {
|
|
||||||
next_scale = cs35l56->old_sdw_clock_scale;
|
|
||||||
ret = sdw_write_no_pm(peripheral, next_scale_reg, next_scale);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(cs35l56->base.dev, "Failed to modify current clock scale: %d\n",
|
|
||||||
ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cs35l56->old_sdw_clock_scale = curr_scale;
|
|
||||||
ret = sdw_write_no_pm(peripheral, curr_scale_reg, CS35L56_SDW_INVALID_BUS_SCALE);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(cs35l56->base.dev, "Failed to modify current clock scale: %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev_dbg(cs35l56->base.dev, "Next bus scale: %#x\n", next_scale);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int cs35l56_sdw_bus_config(struct sdw_slave *peripheral,
|
|
||||||
struct sdw_bus_params *params)
|
|
||||||
{
|
|
||||||
struct cs35l56_private *cs35l56 = dev_get_drvdata(&peripheral->dev);
|
|
||||||
|
|
||||||
if ((cs35l56->base.type == 0x63) && (cs35l56->base.rev < 0xa1))
|
|
||||||
return cs35l63_sdw_kick_divider(cs35l56, peripheral);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __maybe_unused cs35l56_sdw_clk_stop(struct sdw_slave *peripheral,
|
static int __maybe_unused cs35l56_sdw_clk_stop(struct sdw_slave *peripheral,
|
||||||
enum sdw_clk_stop_mode mode,
|
enum sdw_clk_stop_mode mode,
|
||||||
enum sdw_clk_stop_type type)
|
enum sdw_clk_stop_type type)
|
||||||
@ -476,7 +408,6 @@ static const struct sdw_slave_ops cs35l56_sdw_ops = {
|
|||||||
.read_prop = cs35l56_sdw_read_prop,
|
.read_prop = cs35l56_sdw_read_prop,
|
||||||
.interrupt_callback = cs35l56_sdw_interrupt,
|
.interrupt_callback = cs35l56_sdw_interrupt,
|
||||||
.update_status = cs35l56_sdw_update_status,
|
.update_status = cs35l56_sdw_update_status,
|
||||||
.bus_config = cs35l56_sdw_bus_config,
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
.clk_stop = cs35l56_sdw_clk_stop,
|
.clk_stop = cs35l56_sdw_clk_stop,
|
||||||
#endif
|
#endif
|
||||||
|
@ -838,6 +838,15 @@ const struct cirrus_amp_cal_controls cs35l56_calibration_controls = {
|
|||||||
};
|
};
|
||||||
EXPORT_SYMBOL_NS_GPL(cs35l56_calibration_controls, "SND_SOC_CS35L56_SHARED");
|
EXPORT_SYMBOL_NS_GPL(cs35l56_calibration_controls, "SND_SOC_CS35L56_SHARED");
|
||||||
|
|
||||||
|
static const struct cirrus_amp_cal_controls cs35l63_calibration_controls = {
|
||||||
|
.alg_id = 0xbf210,
|
||||||
|
.mem_region = WMFW_ADSP2_YM,
|
||||||
|
.ambient = "CAL_AMBIENT",
|
||||||
|
.calr = "CAL_R",
|
||||||
|
.status = "CAL_STATUS",
|
||||||
|
.checksum = "CAL_CHECKSUM",
|
||||||
|
};
|
||||||
|
|
||||||
int cs35l56_get_calibration(struct cs35l56_base *cs35l56_base)
|
int cs35l56_get_calibration(struct cs35l56_base *cs35l56_base)
|
||||||
{
|
{
|
||||||
u64 silicon_uid = 0;
|
u64 silicon_uid = 0;
|
||||||
@ -912,19 +921,31 @@ EXPORT_SYMBOL_NS_GPL(cs35l56_read_prot_status, "SND_SOC_CS35L56_SHARED");
|
|||||||
void cs35l56_log_tuning(struct cs35l56_base *cs35l56_base, struct cs_dsp *cs_dsp)
|
void cs35l56_log_tuning(struct cs35l56_base *cs35l56_base, struct cs_dsp *cs_dsp)
|
||||||
{
|
{
|
||||||
__be32 pid, sid, tid;
|
__be32 pid, sid, tid;
|
||||||
|
unsigned int alg_id;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
switch (cs35l56_base->type) {
|
||||||
|
case 0x54:
|
||||||
|
case 0x56:
|
||||||
|
case 0x57:
|
||||||
|
alg_id = 0x9f212;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
alg_id = 0xbf212;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
scoped_guard(mutex, &cs_dsp->pwr_lock) {
|
scoped_guard(mutex, &cs_dsp->pwr_lock) {
|
||||||
ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_PRJCT_ID",
|
ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_PRJCT_ID",
|
||||||
WMFW_ADSP2_XM, 0x9f212),
|
WMFW_ADSP2_XM, alg_id),
|
||||||
0, &pid, sizeof(pid));
|
0, &pid, sizeof(pid));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_CHNNL_ID",
|
ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_CHNNL_ID",
|
||||||
WMFW_ADSP2_XM, 0x9f212),
|
WMFW_ADSP2_XM, alg_id),
|
||||||
0, &sid, sizeof(sid));
|
0, &sid, sizeof(sid));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_SNPSHT_ID",
|
ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_SNPSHT_ID",
|
||||||
WMFW_ADSP2_XM, 0x9f212),
|
WMFW_ADSP2_XM, alg_id),
|
||||||
0, &tid, sizeof(tid));
|
0, &tid, sizeof(tid));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -974,8 +995,10 @@ int cs35l56_hw_init(struct cs35l56_base *cs35l56_base)
|
|||||||
case 0x35A54:
|
case 0x35A54:
|
||||||
case 0x35A56:
|
case 0x35A56:
|
||||||
case 0x35A57:
|
case 0x35A57:
|
||||||
|
cs35l56_base->calibration_controls = &cs35l56_calibration_controls;
|
||||||
break;
|
break;
|
||||||
case 0x35A630:
|
case 0x35A630:
|
||||||
|
cs35l56_base->calibration_controls = &cs35l63_calibration_controls;
|
||||||
devid = devid >> 4;
|
devid = devid >> 4;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -695,7 +695,7 @@ static int cs35l56_write_cal(struct cs35l56_private *cs35l56)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = cs_amp_write_cal_coeffs(&cs35l56->dsp.cs_dsp,
|
ret = cs_amp_write_cal_coeffs(&cs35l56->dsp.cs_dsp,
|
||||||
&cs35l56_calibration_controls,
|
cs35l56->base.calibration_controls,
|
||||||
&cs35l56->base.cal_data);
|
&cs35l56->base.cal_data);
|
||||||
|
|
||||||
wm_adsp_stop(&cs35l56->dsp);
|
wm_adsp_stop(&cs35l56->dsp);
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
#define CS35L56_SDW_GEN_INT_MASK_1 0xc1
|
#define CS35L56_SDW_GEN_INT_MASK_1 0xc1
|
||||||
#define CS35L56_SDW_INT_MASK_CODEC_IRQ BIT(0)
|
#define CS35L56_SDW_INT_MASK_CODEC_IRQ BIT(0)
|
||||||
|
|
||||||
#define CS35L56_SDW_INVALID_BUS_SCALE 0xf
|
|
||||||
|
|
||||||
#define CS35L56_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
|
#define CS35L56_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
|
||||||
#define CS35L56_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE \
|
#define CS35L56_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE \
|
||||||
| SNDRV_PCM_FMTBIT_S32_LE)
|
| SNDRV_PCM_FMTBIT_S32_LE)
|
||||||
@ -52,7 +50,6 @@ struct cs35l56_private {
|
|||||||
u8 asp_slot_count;
|
u8 asp_slot_count;
|
||||||
bool tdm_mode;
|
bool tdm_mode;
|
||||||
bool sysclk_set;
|
bool sysclk_set;
|
||||||
u8 old_sdw_clock_scale;
|
|
||||||
u8 sdw_link_num;
|
u8 sdw_link_num;
|
||||||
u8 sdw_unique_id;
|
u8 sdw_unique_id;
|
||||||
};
|
};
|
||||||
|
@ -636,7 +636,7 @@ static int es8389_set_bias_level(struct snd_soc_component *component,
|
|||||||
regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0x59);
|
regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0x59);
|
||||||
regmap_write(es8389->regmap, ES8389_ADC_EN, 0x00);
|
regmap_write(es8389->regmap, ES8389_ADC_EN, 0x00);
|
||||||
regmap_write(es8389->regmap, ES8389_CLK_OFF1, 0x00);
|
regmap_write(es8389->regmap, ES8389_CLK_OFF1, 0x00);
|
||||||
regmap_write(es8389->regmap, ES8389_RESET, 0x7E);
|
regmap_write(es8389->regmap, ES8389_RESET, 0x3E);
|
||||||
regmap_update_bits(es8389->regmap, ES8389_DAC_INV, 0x80, 0x80);
|
regmap_update_bits(es8389->regmap, ES8389_DAC_INV, 0x80, 0x80);
|
||||||
usleep_range(8000, 8500);
|
usleep_range(8000, 8500);
|
||||||
regmap_update_bits(es8389->regmap, ES8389_DAC_INV, 0x80, 0x00);
|
regmap_update_bits(es8389->regmap, ES8389_DAC_INV, 0x80, 0x00);
|
||||||
|
@ -910,10 +910,10 @@ static const struct snd_kcontrol_new tasdevice_cali_controls[] = {
|
|||||||
static const struct snd_kcontrol_new tas2781_snd_controls[] = {
|
static const struct snd_kcontrol_new tas2781_snd_controls[] = {
|
||||||
SOC_SINGLE_RANGE_EXT_TLV("Speaker Analog Volume", TAS2781_AMP_LEVEL,
|
SOC_SINGLE_RANGE_EXT_TLV("Speaker Analog Volume", TAS2781_AMP_LEVEL,
|
||||||
1, 0, 20, 0, tas2781_amp_getvol,
|
1, 0, 20, 0, tas2781_amp_getvol,
|
||||||
tas2781_amp_putvol, amp_vol_tlv),
|
tas2781_amp_putvol, tas2781_amp_tlv),
|
||||||
SOC_SINGLE_RANGE_EXT_TLV("Speaker Digital Volume", TAS2781_DVC_LVL,
|
SOC_SINGLE_RANGE_EXT_TLV("Speaker Digital Volume", TAS2781_DVC_LVL,
|
||||||
0, 0, 200, 1, tas2781_digital_getvol,
|
0, 0, 200, 1, tas2781_digital_getvol,
|
||||||
tas2781_digital_putvol, dvc_tlv),
|
tas2781_digital_putvol, tas2781_dvc_tlv),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct snd_kcontrol_new tas2781_cali_controls[] = {
|
static const struct snd_kcontrol_new tas2781_cali_controls[] = {
|
||||||
|
@ -349,7 +349,7 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
|
|||||||
u16 cs_len;
|
u16 cs_len;
|
||||||
u8 cs_type;
|
u8 cs_type;
|
||||||
|
|
||||||
if (len < sizeof(*p))
|
if (len < sizeof(*cs_desc))
|
||||||
break;
|
break;
|
||||||
cs_len = le16_to_cpu(cs_desc->wLength);
|
cs_len = le16_to_cpu(cs_desc->wLength);
|
||||||
if (len < cs_len)
|
if (len < cs_len)
|
||||||
|
@ -285,7 +285,7 @@ static const struct usb_desc_validator audio_validators[] = {
|
|||||||
/* UAC_VERSION_3, UAC3_EXTENDED_TERMINAL: not implemented yet */
|
/* UAC_VERSION_3, UAC3_EXTENDED_TERMINAL: not implemented yet */
|
||||||
FUNC(UAC_VERSION_3, UAC3_MIXER_UNIT, validate_mixer_unit),
|
FUNC(UAC_VERSION_3, UAC3_MIXER_UNIT, validate_mixer_unit),
|
||||||
FUNC(UAC_VERSION_3, UAC3_SELECTOR_UNIT, validate_selector_unit),
|
FUNC(UAC_VERSION_3, UAC3_SELECTOR_UNIT, validate_selector_unit),
|
||||||
FUNC(UAC_VERSION_3, UAC_FEATURE_UNIT, validate_uac3_feature_unit),
|
FUNC(UAC_VERSION_3, UAC3_FEATURE_UNIT, validate_uac3_feature_unit),
|
||||||
/* UAC_VERSION_3, UAC3_EFFECT_UNIT: not implemented yet */
|
/* UAC_VERSION_3, UAC3_EFFECT_UNIT: not implemented yet */
|
||||||
FUNC(UAC_VERSION_3, UAC3_PROCESSING_UNIT, validate_processing_unit),
|
FUNC(UAC_VERSION_3, UAC3_PROCESSING_UNIT, validate_processing_unit),
|
||||||
FUNC(UAC_VERSION_3, UAC3_EXTENSION_UNIT, validate_processing_unit),
|
FUNC(UAC_VERSION_3, UAC3_EXTENSION_UNIT, validate_processing_unit),
|
||||||
|
Loading…
Reference in New Issue
Block a user