Merge tag 'sound-6.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull more sound updates from Takashi Iwai:
 "For catching up the remaining stuff for 6.17: only small updates and
  the rest are mostly small fixes.

   - Fixes in HD-audio codec driver Kconfig, so that configurations can
     be more easily/safely carried between different versions

   - Fixes in ASoC SDCA, FSL xcvr, AW88399

   - ASoC IMX WM8524 support

   - HD-audio and USB-audio quirks and fixes

   - A minor selftest fix"

* tag 'sound-6.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits)
  ALSA: usb: scarlett2: Fix missing NULL check
  mips: Update HD-audio configs again
  LoongArch: Update HD-audio codec configs
  arm: Update HD-audio configs again
  selftests: ALSA: fix memory leak in utimer test
  ALSA: usb-audio: Add DSD support for Comtrue USB Audio device
  ALSA: hda/hdmi: Enable drivers as default
  ALSA: hda/cirrus: Enable drivers as default
  ALSA: hda/realtek: Enable drivers as default
  ALSA: hda/realtek - Fix mute LED for HP Victus 16-d1xxx (MB 8A26)
  ALSA: hda/realtek - Fix mute LED for HP Victus 16-s0xxx
  ALSA: hda: Fix the wrong register was used for DVC of TAS2770
  ALSA: scarlett2: Add retry on -EPROTO from scarlett2_usb_tx()
  ALSA: hda/realtek - Fix mute LED for HP Victus 16-r1xxx
  ASoC: codecs: Add acpi_match_table for aw88399 driver
  ASoC: dt-bindings: atmel,at91-ssc: add microchip,sam9x7-ssc
  ASoC: imx-card: Add WM8524 support
  ASoC: fsl_xcvr: get channel status data with firmware exists
  ASoC: fsl_xcvr: get channel status data when PHY is not exists
  ASoC: SDCA: Add support for -cn- value properties
  ...
This commit is contained in:
Linus Torvalds
2025-08-01 12:26:24 -07:00
22 changed files with 282 additions and 68 deletions

View File

@@ -16,9 +16,14 @@ description:
properties:
compatible:
enum:
- atmel,at91rm9200-ssc
- atmel,at91sam9g45-ssc
oneOf:
- enum:
- atmel,at91rm9200-ssc
- atmel,at91sam9g45-ssc
- items:
- enum:
- microchip,sam9x7-ssc
- const: atmel,at91sam9g45-ssc
reg:
maxItems: 1

View File

@@ -794,10 +794,12 @@ CONFIG_SND=m
CONFIG_SND_HDA_TEGRA=m
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_REALTEK_LIB=m
CONFIG_SND_HDA_CODEC_ALC269=m
CONFIG_SND_HDA_CODEC_HDMI=m
CONFIG_SND_HDA_CODEC_HDMI_GENERIC=m
CONFIG_SND_HDA_CODEC_HDMI_NVIDIA=m
CONFIG_SND_HDA_CODEC_HDMI_TEGRA=m
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_SOC=m

View File

@@ -225,7 +225,12 @@ CONFIG_SND_HDA_TEGRA=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_REALTEK_LIB=y
CONFIG_SND_HDA_CODEC_ALC269=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_CODEC_HDMI_GENERIC=y
CONFIG_SND_HDA_CODEC_HDMI_NVIDIA=y
CONFIG_SND_HDA_CODEC_HDMI_TEGRA=y
# CONFIG_SND_ARM is not set
# CONFIG_SND_SPI is not set
# CONFIG_SND_USB is not set

View File

@@ -783,8 +783,23 @@ CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_REALTEK_LIB=y
CONFIG_SND_HDA_CODEC_ALC260=y
CONFIG_SND_HDA_CODEC_ALC262=y
CONFIG_SND_HDA_CODEC_ALC268=y
CONFIG_SND_HDA_CODEC_ALC269=y
CONFIG_SND_HDA_CODEC_ALC662=y
CONFIG_SND_HDA_CODEC_ALC680=y
CONFIG_SND_HDA_CODEC_ALC861=y
CONFIG_SND_HDA_CODEC_ALC861VD=y
CONFIG_SND_HDA_CODEC_ALC880=y
CONFIG_SND_HDA_CODEC_ALC882=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_CODEC_HDMI_GENERIC=y
CONFIG_SND_HDA_CODEC_HDMI_INTEL=y
CONFIG_SND_HDA_CODEC_HDMI_ATI=y
CONFIG_SND_HDA_CODEC_HDMI_NVIDIA=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_SOC=m

View File

@@ -256,6 +256,17 @@ CONFIG_SND_HDA_INTEL=y
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_REALTEK_LIB=y
CONFIG_SND_HDA_CODEC_ALC260=y
CONFIG_SND_HDA_CODEC_ALC262=y
CONFIG_SND_HDA_CODEC_ALC268=y
CONFIG_SND_HDA_CODEC_ALC269=y
CONFIG_SND_HDA_CODEC_ALC662=y
CONFIG_SND_HDA_CODEC_ALC680=y
CONFIG_SND_HDA_CODEC_ALC861=y
CONFIG_SND_HDA_CODEC_ALC861VD=y
CONFIG_SND_HDA_CODEC_ALC880=y
CONFIG_SND_HDA_CODEC_ALC882=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y

View File

@@ -291,11 +291,24 @@ CONFIG_SND_SEQ_DUMMY=m
# CONFIG_SND_ISA is not set
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_REALTEK_LIB=m
CONFIG_SND_HDA_CODEC_ALC260=m
CONFIG_SND_HDA_CODEC_ALC262=m
CONFIG_SND_HDA_CODEC_ALC268=m
CONFIG_SND_HDA_CODEC_ALC269=m
CONFIG_SND_HDA_CODEC_ALC662=m
CONFIG_SND_HDA_CODEC_ALC680=m
CONFIG_SND_HDA_CODEC_ALC861=m
CONFIG_SND_HDA_CODEC_ALC861VD=m
CONFIG_SND_HDA_CODEC_ALC880=m
CONFIG_SND_HDA_CODEC_ALC882=m
CONFIG_SND_HDA_CODEC_SIGMATEL=m
CONFIG_SND_HDA_CODEC_HDMI=m
CONFIG_SND_HDA_CODEC_HDMI_GENERIC=m
CONFIG_SND_HDA_CODEC_HDMI_INTEL=m
CONFIG_SND_HDA_CODEC_HDMI_ATI=m
CONFIG_SND_HDA_CODEC_HDMI_NVIDIA=m
CONFIG_SND_HDA_CODEC_CONEXANT=m
# CONFIG_SND_USB is not set
CONFIG_HIDRAW=y

View File

@@ -742,14 +742,14 @@ struct sdca_control_range {
* struct sdca_control - information for one SDCA Control
* @label: Name for the Control, from SDCA Specification v1.0, section 7.1.7.
* @sel: Identifier used for addressing.
* @value: Holds the Control value for constants and defaults.
* @nbits: Number of bits used in the Control.
* @interrupt_position: SCDA interrupt line that will alert to changes on this
* Control.
* @values: Holds the Control value for constants and defaults.
* @cn_list: A bitmask showing the valid Control Numbers within this Control,
* Control Numbers typically represent channels.
* @range: Buffer describing valid range of values for the Control.
* @interrupt_position: SCDA interrupt line that will alert to changes on this
* Control.
* @type: Format of the data in the Control.
* @range: Buffer describing valid range of values for the Control.
* @mode: Access mode of the Control.
* @layers: Bitmask of access layers of the Control.
* @deferrable: Indicates if the access to the Control can be deferred.
@@ -760,13 +760,13 @@ struct sdca_control {
const char *label;
int sel;
int value;
int nbits;
int interrupt_position;
int *values;
u64 cn_list;
int interrupt_position;
struct sdca_control_range range;
enum sdca_control_datatype type;
struct sdca_control_range range;
enum sdca_access_mode mode;
u8 layers;

View File

@@ -14,10 +14,10 @@
#ifndef __TAS2770_TLV_H__
#define __TAS2770_TLV_H__
#define TAS2770_DVC_LEVEL TASDEVICE_REG(0x0, 0x0, 0x17)
#define TAS2770_DVC_LEVEL TASDEVICE_REG(0x0, 0x0, 0x05)
#define TAS2770_AMP_LEVEL TASDEVICE_REG(0x0, 0x0, 0x03)
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2770_dvc_tlv, 1650, 50, 0);
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2770_dvc_tlv, -10000, 50, 0);
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2770_amp_tlv, 1100, 50, 0);
#endif

View File

@@ -1,8 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-only
menuconfig SND_HDA_CODEC_CIRRUS
tristate "Cirrus Logic HD-audio codec support"
if SND_HDA_CODEC_CIRRUS
config SND_HDA_CODEC_CS420X
tristate "Build Cirrus Logic CS420x codec support"
select SND_HDA_GENERIC
default y
help
Say Y or M here to include Cirrus Logic CS420x codec support in
snd-hda-intel driver
@@ -13,6 +19,7 @@ comment "Set to Y if you want auto-loading the codec driver"
config SND_HDA_CODEC_CS421X
tristate "Build Cirrus Logic CS421x codec support"
select SND_HDA_GENERIC
default y
help
Say Y or M here to include Cirrus Logic CS421x codec support in
snd-hda-intel driver
@@ -29,3 +36,5 @@ config SND_HDA_CODEC_CS8409
comment "Set to Y if you want auto-loading the codec driver"
depends on SND_HDA=y && SND_HDA_CODEC_CS8409=m
endif

View File

@@ -1,9 +1,15 @@
# SPDX-License-Identifier: GPL-2.0-only
config SND_HDA_CODEC_HDMI
menuconfig SND_HDA_CODEC_HDMI
tristate "HD-audio HDMI codec support"
if SND_HDA_CODEC_HDMI
config SND_HDA_CODEC_HDMI_GENERIC
tristate "Generic HDMI/DisplayPort HD-audio codec support"
select SND_DYNAMIC_MINORS
select SND_PCM_ELD
default y
help
Say Y or M here to include Generic HDMI and DisplayPort HD-audio
codec support.
@@ -13,13 +19,15 @@ config SND_HDA_CODEC_HDMI
config SND_HDA_CODEC_HDMI_SIMPLE
tristate "Simple HDMI/DisplayPort HD-audio codec support"
default y
help
Say Y or M here to include Simple HDMI and DisplayPort HD-audio
codec support for VIA and other codecs.
config SND_HDA_CODEC_HDMI_INTEL
tristate "Intel HDMI/DisplayPort HD-audio codec support"
select SND_HDA_CODEC_HDMI
select SND_HDA_CODEC_HDMI_GENERIC
default y
help
Say Y or M here to include Intel graphics HDMI and DisplayPort
HD-audio codec support.
@@ -41,14 +49,16 @@ config SND_HDA_INTEL_HDMI_SILENT_STREAM
config SND_HDA_CODEC_HDMI_ATI
tristate "AMD/ATI HDMI/DisplayPort HD-audio codec support"
select SND_HDA_CODEC_HDMI
select SND_HDA_CODEC_HDMI_GENERIC
default y
help
Say Y or M here to include AMD/ATI graphics HDMI and DisplayPort
HD-audio codec support.
config SND_HDA_CODEC_HDMI_NVIDIA
tristate "Nvidia HDMI/DisplayPort HD-audio codec support"
select SND_HDA_CODEC_HDMI
select SND_HDA_CODEC_HDMI_GENERIC
default y
help
Say Y or M here to include HDMI and DisplayPort HD-audio codec
support for the recent Nvidia graphics cards.
@@ -56,13 +66,17 @@ config SND_HDA_CODEC_HDMI_NVIDIA
config SND_HDA_CODEC_HDMI_NVIDIA_MCP
tristate "Legacy Nvidia HDMI/DisplayPort HD-audio codec support"
select SND_HDA_CODEC_HDMI_SIMPLE
default y
help
Say Y or M here to include HDMI and DisplayPort HD-audio codec
support for the legacy Nvidia graphics like MCP73, MCP67, MCP77/78.
config SND_HDA_CODEC_HDMI_TEGRA
tristate "Nvidia Tegra HDMI/DisplayPort HD-audio codec support"
select SND_HDA_CODEC_HDMI
select SND_HDA_CODEC_HDMI_GENERIC
default y
help
Say Y or M here to include HDMI and DisplayPort HD-audio codec
support for Nvidia Tegra.
endif

View File

@@ -9,7 +9,7 @@ snd-hda-codec-nvhdmi-y := nvhdmi.o
snd-hda-codec-nvhdmi-mcp-y := nvhdmi-mcp.o
snd-hda-codec-tegrahdmi-y := tegrahdmi.o
obj-$(CONFIG_SND_HDA_CODEC_HDMI) += snd-hda-codec-hdmi.o
obj-$(CONFIG_SND_HDA_CODEC_HDMI_GENERIC) += snd-hda-codec-hdmi.o
obj-$(CONFIG_SND_HDA_CODEC_HDMI_SIMPLE) += snd-hda-codec-simplehdmi.o
obj-$(CONFIG_SND_HDA_CODEC_HDMI_INTEL) += snd-hda-codec-intelhdmi.o
obj-$(CONFIG_SND_HDA_CODEC_HDMI_ATI) += snd-hda-codec-atihdmi.o

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
menuconfig SND_HDA_CODEC_REALTEK
bool "Realtek HD-audio codec support"
tristate "Realtek HD-audio codec support"
if SND_HDA_CODEC_REALTEK
@@ -15,6 +15,7 @@ config SND_HDA_CODEC_ALC260
tristate "Build Realtek ALC260 HD-audio codec support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC260 HD-audio codec support
@@ -22,6 +23,7 @@ config SND_HDA_CODEC_ALC262
tristate "Build Realtek ALC262 HD-audio codec support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC262 HD-audio codec support
@@ -29,6 +31,7 @@ config SND_HDA_CODEC_ALC268
tristate "Build Realtek ALC268 HD-audio codec support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC268 and compatible HD-audio
codec support
@@ -37,6 +40,7 @@ config SND_HDA_CODEC_ALC269
tristate "Build Realtek ALC269 HD-audio codecs support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC269 and compatible HD-audio
codec support
@@ -45,6 +49,7 @@ config SND_HDA_CODEC_ALC662
tristate "Build Realtek ALC662 HD-audio codecs support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC662 and compatible HD-audio
codec support
@@ -53,6 +58,7 @@ config SND_HDA_CODEC_ALC680
tristate "Build Realtek ALC680 HD-audio codecs support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC680 HD-audio codec support
@@ -60,6 +66,7 @@ config SND_HDA_CODEC_ALC861
tristate "Build Realtek ALC861 HD-audio codecs support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC861 HD-audio codec support
@@ -67,6 +74,7 @@ config SND_HDA_CODEC_ALC861VD
tristate "Build Realtek ALC861-VD HD-audio codecs support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC861-VD HD-audio codec support
@@ -74,6 +82,7 @@ config SND_HDA_CODEC_ALC880
tristate "Build Realtek ALC880 HD-audio codecs support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC880 HD-audio codec support
@@ -81,6 +90,7 @@ config SND_HDA_CODEC_ALC882
tristate "Build Realtek ALC882 HD-audio codecs support"
depends on INPUT
select SND_HDA_CODEC_REALTEK_LIB
default y
help
Say Y or M here to include Realtek ALC882 and compatible HD-audio
codec support

View File

@@ -6470,6 +6470,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8a26, "HP Victus 16-d1xxx (MB 8A26)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
@@ -6528,6 +6529,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8bbe, "HP Victus 16-r0xxx (MB 8BBE)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8bc8, "HP Victus 15-fa1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8bd4, "HP Victus 16-s0xxx (MB 8BD4)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
@@ -6580,6 +6582,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8c99, "HP Victus 16-r1xxx (MB 8C99)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8c9c, "HP Victus 16-s1xxx (MB 8C9C)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),

View File

@@ -260,7 +260,7 @@ static const struct snd_kcontrol_new tas2770_snd_controls[] = {
0, 0, 20, 0, tas2781_amp_getvol,
tas2781_amp_putvol, tas2770_amp_tlv),
ACARD_SINGLE_RANGE_EXT_TLV("Speaker Digital Volume", TAS2770_DVC_LEVEL,
0, 0, 31, 0, tas2781_amp_getvol,
0, 0, 200, 1, tas2781_amp_getvol,
tas2781_amp_putvol, tas2770_dvc_tlv),
};

View File

@@ -2330,9 +2330,18 @@ static const struct i2c_device_id aw88399_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, aw88399_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id aw88399_acpi_match[] = {
{ "AWDZ8399", 0 },
{ },
};
MODULE_DEVICE_TABLE(acpi, aw88399_acpi_match);
#endif
static struct i2c_driver aw88399_i2c_driver = {
.driver = {
.name = AW88399_I2C_NAME,
.acpi_match_table = ACPI_PTR(aw88399_acpi_match),
},
.probe = aw88399_i2c_probe,
.id_table = aw88399_i2c_id,

View File

@@ -1395,7 +1395,7 @@ static irqreturn_t irq0_isr(int irq, void *devid)
if (isr & FSL_XCVR_IRQ_NEW_CS) {
dev_dbg(dev, "Received new CS block\n");
isr_clr |= FSL_XCVR_IRQ_NEW_CS;
if (!xcvr->soc_data->spdif_only) {
if (xcvr->soc_data->fw_name) {
/* Data RAM is 4KiB, last two pages: 8 and 9. Select page 8. */
regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_CTRL,
FSL_XCVR_EXT_CTRL_PAGE_MASK,
@@ -1423,6 +1423,26 @@ static irqreturn_t irq0_isr(int irq, void *devid)
/* clear CS control register */
memset_io(reg_ctrl, 0, sizeof(val));
}
} else {
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_0,
(u32 *)&xcvr->rx_iec958.status[0]);
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_1,
(u32 *)&xcvr->rx_iec958.status[4]);
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_2,
(u32 *)&xcvr->rx_iec958.status[8]);
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_3,
(u32 *)&xcvr->rx_iec958.status[12]);
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_4,
(u32 *)&xcvr->rx_iec958.status[16]);
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_5,
(u32 *)&xcvr->rx_iec958.status[20]);
for (i = 0; i < 6; i++) {
val = *(u32 *)(xcvr->rx_iec958.status + i * 4);
*(u32 *)(xcvr->rx_iec958.status + i * 4) =
bitrev32(val);
}
regmap_set_bits(xcvr->regmap, FSL_XCVR_RX_DPTH_CTRL,
FSL_XCVR_RX_DPTH_CTRL_CSA);
}
}
if (isr & FSL_XCVR_IRQ_NEW_UD) {
@@ -1497,6 +1517,7 @@ static const struct fsl_xcvr_soc_data fsl_xcvr_imx93_data = {
};
static const struct fsl_xcvr_soc_data fsl_xcvr_imx95_data = {
.fw_name = "imx/xcvr/xcvr-imx95.bin",
.spdif_only = true,
.use_phy = true,
.use_edma = true,
@@ -1786,7 +1807,7 @@ static int fsl_xcvr_runtime_resume(struct device *dev)
}
}
if (xcvr->mode == FSL_XCVR_MODE_EARC) {
if (xcvr->soc_data->fw_name) {
ret = fsl_xcvr_load_firmware(xcvr);
if (ret) {
dev_err(dev, "failed to load firmware.\n");

View File

@@ -26,6 +26,7 @@ enum codec_type {
CODEC_AK4497,
CODEC_AK5552,
CODEC_CS42888,
CODEC_WM8524,
};
/*
@@ -196,6 +197,13 @@ static struct imx_akcodec_tdm_fs_mul cs42888_tdm_fs_mul[] = {
{ .min = 256, .max = 256, .mul = 256 },
};
static struct imx_akcodec_fs_mul wm8524_fs_mul[] = {
{ .rmin = 8000, .rmax = 32000, .wmin = 256, .wmax = 1152, },
{ .rmin = 44100, .rmax = 48000, .wmin = 256, .wmax = 768, },
{ .rmin = 88200, .rmax = 96000, .wmin = 128, .wmax = 384, },
{ .rmin = 176400, .rmax = 192000, .wmin = 128, .wmax = 192, },
};
static const u32 akcodec_rates[] = {
8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200,
96000, 176400, 192000, 352800, 384000, 705600, 768000,
@@ -229,6 +237,10 @@ static const u32 cs42888_tdm_channels[] = {
1, 2, 3, 4, 5, 6, 7, 8,
};
static const u32 wm8524_channels[] = {
2,
};
static bool format_is_dsd(struct snd_pcm_hw_params *params)
{
snd_pcm_format_t format = params_format(params);
@@ -261,6 +273,7 @@ static bool codec_is_akcodec(unsigned int type)
case CODEC_AK5558:
case CODEC_AK5552:
case CODEC_CS42888:
case CODEC_WM8524:
return true;
default:
break;
@@ -477,9 +490,24 @@ static int imx_aif_startup(struct snd_pcm_substream *substream)
return ret;
}
static void imx_aif_shutdown(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_dai *cpu_dai;
struct snd_soc_dai *codec_dai;
int i;
for_each_rtd_cpu_dais(rtd, i, cpu_dai)
snd_soc_dai_set_sysclk(cpu_dai, 0, 0, SND_SOC_CLOCK_OUT);
for_each_rtd_codec_dais(rtd, i, codec_dai)
snd_soc_dai_set_sysclk(codec_dai, 0, 0, SND_SOC_CLOCK_IN);
}
static const struct snd_soc_ops imx_aif_ops = {
.hw_params = imx_aif_hw_params,
.startup = imx_aif_startup,
.shutdown = imx_aif_shutdown,
};
static const struct snd_soc_ops imx_aif_ops_be = {
@@ -632,6 +660,8 @@ static int imx_card_parse_of(struct imx_card_data *data)
plat_data->type = CODEC_AK5552;
else if (!strcmp(link->codecs->dai_name, "cs42888"))
plat_data->type = CODEC_CS42888;
else if (!strcmp(link->codecs->dai_name, "wm8524-hifi"))
plat_data->type = CODEC_WM8524;
} else {
link->codecs = &snd_soc_dummy_dlc;
@@ -805,6 +835,10 @@ static int imx_card_probe(struct platform_device *pdev)
data->dapm_routes[1].sink = "CPU-Capture";
data->dapm_routes[1].source = "Capture";
break;
case CODEC_WM8524:
data->dapm_routes[0].sink = "Playback";
data->dapm_routes[0].source = "CPU-Playback";
break;
default:
break;
}
@@ -854,6 +888,12 @@ static int imx_card_probe(struct platform_device *pdev)
plat_data->support_tdm_channels = cs42888_tdm_channels;
plat_data->num_tdm_channels = ARRAY_SIZE(cs42888_tdm_channels);
break;
case CODEC_WM8524:
plat_data->fs_mul = wm8524_fs_mul;
plat_data->num_fs_mul = ARRAY_SIZE(wm8524_fs_mul);
plat_data->support_channels = wm8524_channels;
plat_data->num_channels = ARRAY_SIZE(wm8524_channels);
break;
default:
break;
}

View File

@@ -814,6 +814,43 @@ static int find_sdca_control_range(struct device *dev,
return 0;
}
static int find_sdca_control_value(struct device *dev, struct sdca_entity *entity,
struct fwnode_handle *control_node,
struct sdca_control *control,
const char * const label)
{
char property[SDCA_PROPERTY_LENGTH];
bool global = true;
int ret, cn, i;
u32 tmp;
snprintf(property, sizeof(property), "mipi-sdca-control-%s", label);
ret = fwnode_property_read_u32(control_node, property, &tmp);
if (ret == -EINVAL)
global = false;
else if (ret)
return ret;
i = 0;
for_each_set_bit(cn, (unsigned long *)&control->cn_list,
BITS_PER_TYPE(control->cn_list)) {
if (!global) {
snprintf(property, sizeof(property),
"mipi-sdca-control-cn-%d-%s", cn, label);
ret = fwnode_property_read_u32(control_node, property, &tmp);
if (ret)
return ret;
}
control->values[i] = tmp;
i++;
}
return 0;
}
/*
* TODO: Add support for -cn- properties, allowing different channels to have
* different defaults etc.
@@ -843,44 +880,44 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
control->layers = tmp;
ret = fwnode_property_read_u64(control_node, "mipi-sdca-control-cn-list",
&control->cn_list);
if (ret == -EINVAL) {
/* Spec allows not specifying cn-list if only the first number is used */
control->cn_list = 0x1;
} else if (ret || !control->cn_list) {
dev_err(dev, "%s: control %#x: cn list missing: %d\n",
entity->label, control->sel, ret);
return ret;
}
control->values = devm_kzalloc(dev, hweight64(control->cn_list), GFP_KERNEL);
if (!control->values)
return -ENOMEM;
switch (control->mode) {
case SDCA_ACCESS_MODE_DC:
ret = fwnode_property_read_u32(control_node,
"mipi-sdca-control-dc-value",
&tmp);
ret = find_sdca_control_value(dev, entity, control_node, control,
"dc-value");
if (ret) {
dev_err(dev, "%s: control %#x: dc value missing: %d\n",
entity->label, control->sel, ret);
return ret;
}
control->value = tmp;
control->has_fixed = true;
break;
case SDCA_ACCESS_MODE_RW:
case SDCA_ACCESS_MODE_DUAL:
ret = fwnode_property_read_u32(control_node,
"mipi-sdca-control-default-value",
&tmp);
if (!ret) {
control->value = tmp;
ret = find_sdca_control_value(dev, entity, control_node, control,
"default-value");
if (!ret)
control->has_default = true;
}
ret = fwnode_property_read_u32(control_node,
"mipi-sdca-control-fixed-value",
&tmp);
if (!ret) {
if (control->has_default && control->value != tmp) {
dev_err(dev,
"%s: control %#x: default and fixed value don't match\n",
entity->label, control->sel);
return -EINVAL;
}
control->value = tmp;
ret = find_sdca_control_value(dev, entity, control_node, control,
"fixed-value");
if (!ret)
control->has_fixed = true;
}
fallthrough;
case SDCA_ACCESS_MODE_RO:
control->deferrable = fwnode_property_read_bool(control_node,
@@ -897,17 +934,6 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
return ret;
}
ret = fwnode_property_read_u64(control_node, "mipi-sdca-control-cn-list",
&control->cn_list);
if (ret == -EINVAL) {
/* Spec allows not specifying cn-list if only the first number is used */
control->cn_list = 0x1;
} else if (ret || !control->cn_list) {
dev_err(dev, "%s: control %#x: cn list missing: %d\n",
entity->label, control->sel, ret);
return ret;
}
ret = fwnode_property_read_u32(control_node,
"mipi-sdca-control-interrupt-position",
&tmp);
@@ -923,11 +949,10 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
control->type = find_sdca_control_datatype(entity, control);
control->nbits = find_sdca_control_bits(entity, control);
dev_info(dev, "%s: %s: control %#x mode %#x layers %#x cn %#llx int %d value %#x %s\n",
dev_info(dev, "%s: %s: control %#x mode %#x layers %#x cn %#llx int %d %s\n",
entity->label, control->label, control->sel,
control->mode, control->layers, control->cn_list,
control->interrupt_position, control->value,
control->deferrable ? "deferrable" : "");
control->interrupt_position, control->deferrable ? "deferrable" : "");
return 0;
}

View File

@@ -72,12 +72,18 @@ bool sdca_regmap_readable(struct sdca_function_data *function, unsigned int reg)
if (!control)
return false;
if (!(BIT(SDW_SDCA_CTL_CNUM(reg)) & control->cn_list))
return false;
switch (control->mode) {
case SDCA_ACCESS_MODE_RW:
case SDCA_ACCESS_MODE_RO:
case SDCA_ACCESS_MODE_DUAL:
case SDCA_ACCESS_MODE_RW1S:
case SDCA_ACCESS_MODE_RW1C:
if (SDW_SDCA_NEXT_CTL(0) & reg)
return false;
fallthrough;
case SDCA_ACCESS_MODE_DUAL:
/* No access to registers marked solely for device use */
return control->layers & ~SDCA_ACCESS_LAYER_DEVICE;
default:
@@ -104,11 +110,17 @@ bool sdca_regmap_writeable(struct sdca_function_data *function, unsigned int reg
if (!control)
return false;
if (!(BIT(SDW_SDCA_CTL_CNUM(reg)) & control->cn_list))
return false;
switch (control->mode) {
case SDCA_ACCESS_MODE_RW:
case SDCA_ACCESS_MODE_DUAL:
case SDCA_ACCESS_MODE_RW1S:
case SDCA_ACCESS_MODE_RW1C:
if (SDW_SDCA_NEXT_CTL(0) & reg)
return false;
fallthrough;
case SDCA_ACCESS_MODE_DUAL:
/* No access to registers marked solely for device use */
return control->layers & ~SDCA_ACCESS_LAYER_DEVICE;
default:
@@ -241,7 +253,7 @@ int sdca_regmap_populate_constants(struct device *dev,
struct sdca_function_data *function,
struct reg_default *consts)
{
int i, j, k;
int i, j, k, l;
for (i = 0, k = 0; i < function->num_entities; i++) {
struct sdca_entity *entity = &function->entities[i];
@@ -253,13 +265,15 @@ int sdca_regmap_populate_constants(struct device *dev,
if (control->mode != SDCA_ACCESS_MODE_DC)
continue;
l = 0;
for_each_set_bit(cn, (unsigned long *)&control->cn_list,
BITS_PER_TYPE(control->cn_list)) {
consts[k].reg = SDW_SDCA_CTL(function->desc->adr,
entity->id,
control->sel, cn);
consts[k].def = control->value;
consts[k].def = control->values[l];
k++;
l++;
}
}
}
@@ -283,7 +297,7 @@ EXPORT_SYMBOL_NS(sdca_regmap_populate_constants, "SND_SOC_SDCA");
int sdca_regmap_write_defaults(struct device *dev, struct regmap *regmap,
struct sdca_function_data *function)
{
int i, j;
int i, j, k;
int ret;
for (i = 0; i < function->num_entities; i++) {
@@ -299,6 +313,7 @@ int sdca_regmap_write_defaults(struct device *dev, struct regmap *regmap,
if (!control->has_default && !control->has_fixed)
continue;
k = 0;
for_each_set_bit(cn, (unsigned long *)&control->cn_list,
BITS_PER_TYPE(control->cn_list)) {
unsigned int reg;
@@ -306,9 +321,11 @@ int sdca_regmap_write_defaults(struct device *dev, struct regmap *regmap,
reg = SDW_SDCA_CTL(function->desc->adr, entity->id,
control->sel, cn);
ret = regmap_write(regmap, reg, control->value);
ret = regmap_write(regmap, reg, control->values[k]);
if (ret)
return ret;
k++;
}
}
}

View File

@@ -2351,6 +2351,8 @@ static int scarlett2_usb(
struct scarlett2_usb_packet *req, *resp = NULL;
size_t req_buf_size = struct_size(req, data, req_size);
size_t resp_buf_size = struct_size(resp, data, resp_size);
int retries = 0;
const int max_retries = 5;
int err;
req = kmalloc(req_buf_size, GFP_KERNEL);
@@ -2374,10 +2376,15 @@ static int scarlett2_usb(
if (req_size)
memcpy(req->data, req_data, req_size);
retry:
err = scarlett2_usb_tx(dev, private->bInterfaceNumber,
req, req_buf_size);
if (err != req_buf_size) {
if (err == -EPROTO && ++retries <= max_retries) {
msleep(5 * (1 << (retries - 1)));
goto retry;
}
usb_audio_err(
mixer->chip,
"%s USB request result cmd %x was %d\n",
@@ -3971,8 +3978,13 @@ static int scarlett2_input_select_ctl_info(
goto unlock;
/* Loop through each input */
for (i = 0; i < inputs; i++)
for (i = 0; i < inputs; i++) {
values[i] = kasprintf(GFP_KERNEL, "Input %d", i + 1);
if (!values[i]) {
err = -ENOMEM;
goto unlock;
}
}
err = snd_ctl_enum_info(uinfo, 1, i,
(const char * const *)values);

View File

@@ -2408,6 +2408,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_DSD_RAW),
VENDOR_FLG(0x2d87, /* Cayin device */
QUIRK_FLAG_DSD_RAW),
VENDOR_FLG(0x2fc6, /* Comture-inc devices */
QUIRK_FLAG_DSD_RAW),
VENDOR_FLG(0x3336, /* HEM devices */
QUIRK_FLAG_DSD_RAW),
VENDOR_FLG(0x3353, /* Khadas devices */

View File

@@ -135,6 +135,7 @@ TEST_F(timer_f, utimer) {
pthread_join(ticking_thread, NULL);
ASSERT_EQ(total_ticks, TICKS_COUNT);
pclose(rfp);
free(buf);
}
TEST(wrong_timers_test) {