Skip to content

Commit 6fb9f7f

Browse files
committed
Merge tag 'sound-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A collection of device-specific small fixes such as ASoC Realtek codec fixes for PM issues, ASoC nau8821 quirk additions, and usual HD- and USB-audio quirks" * tag 'sound-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Support ASUS G713PV laptop ALSA: usb-audio: Update for native DSD support quirks ALSA: usb-audio: Add quirk for Microsoft Modern Wireless Headset ALSA: hda/relatek: Enable Mute LED on HP 250 G8 ASoC: atmel: Fix the 8K sample parameter in I2SC master ASoC: rt711-sdca: fix for JD event handling in ClockStop Mode0 ASoC: rt711: fix for JD event handling in ClockStop Mode0 ASoC: rt722-sdca: fix for JD event handling in ClockStop Mode0 ASoC: rt712-sdca: fix for JD event handling in ClockStop Mode0 ASoc: codecs: ES8316: Fix DMIC config ASoC: rt5682-sdw: fix for JD event handling in ClockStop Mode0 ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register ASoC: nau8821: Add DMI quirk mechanism for active-high jack-detect ASoC: da7219: Check for failure reading AAD IRQ events ASoC: da7219: Flush pending AAD IRQ when suspending ALSA: seq: remove redundant unsigned comparison to zero ASoC: fsl_spdif: Silence output on stop
2 parents 17bf3df + 3b9adfb commit 6fb9f7f

File tree

15 files changed

+151
-18
lines changed

15 files changed

+151
-18
lines changed

sound/core/seq/seq_ump_client.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ static void update_group_attrs(struct seq_ump_client *client)
298298
}
299299

300300
list_for_each_entry(fb, &client->ump->block_list, list) {
301-
if (fb->info.first_group < 0 ||
302-
fb->info.first_group + fb->info.num_groups > SNDRV_UMP_MAX_GROUPS)
301+
if (fb->info.first_group + fb->info.num_groups > SNDRV_UMP_MAX_GROUPS)
303302
break;
304303
group = &client->groups[fb->info.first_group];
305304
for (i = 0; i < fb->info.num_groups; i++, group++) {

sound/pci/hda/patch_realtek.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9541,6 +9541,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
95419541
SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
95429542
SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
95439543
SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9544+
SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
95449545
SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
95459546
SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
95469547
SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
@@ -9671,6 +9672,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
96719672
SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JI", ALC285_FIXUP_ASUS_HEADSET_MIC),
96729673
SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
96739674
SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
9675+
SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS ROG Strix G17 2023 (G713PV)", ALC287_FIXUP_CS35L41_I2C_2),
96749676
SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
96759677
SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
96769678
SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402", ALC245_FIXUP_CS35L41_SPI_2),

sound/soc/atmel/atmel-i2s.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,14 @@ struct atmel_i2s_gck_param {
163163

164164
#define I2S_MCK_12M288 12288000UL
165165
#define I2S_MCK_11M2896 11289600UL
166+
#define I2S_MCK_6M144 6144000UL
166167

167168
/* mck = (32 * (imckfs+1) / (imckdiv+1)) * fs */
168169
static const struct atmel_i2s_gck_param gck_params[] = {
170+
/* mck = 6.144Mhz */
171+
{ 8000, I2S_MCK_6M144, 1, 47}, /* mck = 768 fs */
172+
169173
/* mck = 12.288MHz */
170-
{ 8000, I2S_MCK_12M288, 0, 47}, /* mck = 1536 fs */
171174
{ 16000, I2S_MCK_12M288, 1, 47}, /* mck = 768 fs */
172175
{ 24000, I2S_MCK_12M288, 3, 63}, /* mck = 512 fs */
173176
{ 32000, I2S_MCK_12M288, 3, 47}, /* mck = 384 fs */

sound/soc/codecs/da7219-aad.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,15 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data)
361361
struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component);
362362
u8 events[DA7219_AAD_IRQ_REG_MAX];
363363
u8 statusa;
364-
int i, report = 0, mask = 0;
364+
int i, ret, report = 0, mask = 0;
365365

366366
/* Read current IRQ events */
367-
regmap_bulk_read(da7219->regmap, DA7219_ACCDET_IRQ_EVENT_A,
368-
events, DA7219_AAD_IRQ_REG_MAX);
367+
ret = regmap_bulk_read(da7219->regmap, DA7219_ACCDET_IRQ_EVENT_A,
368+
events, DA7219_AAD_IRQ_REG_MAX);
369+
if (ret) {
370+
dev_warn_ratelimited(component->dev, "Failed to read IRQ events: %d\n", ret);
371+
return IRQ_NONE;
372+
}
369373

370374
if (!events[DA7219_AAD_IRQ_REG_A] && !events[DA7219_AAD_IRQ_REG_B])
371375
return IRQ_NONE;
@@ -944,6 +948,8 @@ void da7219_aad_suspend(struct snd_soc_component *component)
944948
}
945949
}
946950
}
951+
952+
synchronize_irq(da7219_aad->irq);
947953
}
948954

949955
void da7219_aad_resume(struct snd_soc_component *component)

sound/soc/codecs/es8316.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static const char * const es8316_dmic_txt[] = {
153153
"dmic data at high level",
154154
"dmic data at low level",
155155
};
156-
static const unsigned int es8316_dmic_values[] = { 0, 1, 2 };
156+
static const unsigned int es8316_dmic_values[] = { 0, 2, 3 };
157157
static const struct soc_enum es8316_dmic_src_enum =
158158
SOC_VALUE_ENUM_SINGLE(ES8316_ADC_DMIC, 0, 3,
159159
ARRAY_SIZE(es8316_dmic_txt),

sound/soc/codecs/nau8821.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/acpi.h>
1111
#include <linux/clk.h>
1212
#include <linux/delay.h>
13+
#include <linux/dmi.h>
1314
#include <linux/init.h>
1415
#include <linux/i2c.h>
1516
#include <linux/module.h>
@@ -25,6 +26,13 @@
2526
#include <sound/tlv.h>
2627
#include "nau8821.h"
2728

29+
#define NAU8821_JD_ACTIVE_HIGH BIT(0)
30+
31+
static int nau8821_quirk;
32+
static int quirk_override = -1;
33+
module_param_named(quirk, quirk_override, uint, 0444);
34+
MODULE_PARM_DESC(quirk, "Board-specific quirk override");
35+
2836
#define NAU_FREF_MAX 13500000
2937
#define NAU_FVCO_MAX 100000000
3038
#define NAU_FVCO_MIN 90000000
@@ -1792,6 +1800,33 @@ static int nau8821_setup_irq(struct nau8821 *nau8821)
17921800
return 0;
17931801
}
17941802

1803+
/* Please keep this list alphabetically sorted */
1804+
static const struct dmi_system_id nau8821_quirk_table[] = {
1805+
{
1806+
/* Positivo CW14Q01P-V2 */
1807+
.matches = {
1808+
DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
1809+
DMI_MATCH(DMI_BOARD_NAME, "CW14Q01P-V2"),
1810+
},
1811+
.driver_data = (void *)(NAU8821_JD_ACTIVE_HIGH),
1812+
},
1813+
{}
1814+
};
1815+
1816+
static void nau8821_check_quirks(void)
1817+
{
1818+
const struct dmi_system_id *dmi_id;
1819+
1820+
if (quirk_override != -1) {
1821+
nau8821_quirk = quirk_override;
1822+
return;
1823+
}
1824+
1825+
dmi_id = dmi_first_match(nau8821_quirk_table);
1826+
if (dmi_id)
1827+
nau8821_quirk = (unsigned long)dmi_id->driver_data;
1828+
}
1829+
17951830
static int nau8821_i2c_probe(struct i2c_client *i2c)
17961831
{
17971832
struct device *dev = &i2c->dev;
@@ -1812,6 +1847,12 @@ static int nau8821_i2c_probe(struct i2c_client *i2c)
18121847

18131848
nau8821->dev = dev;
18141849
nau8821->irq = i2c->irq;
1850+
1851+
nau8821_check_quirks();
1852+
1853+
if (nau8821_quirk & NAU8821_JD_ACTIVE_HIGH)
1854+
nau8821->jkdet_polarity = 0;
1855+
18151856
nau8821_print_device_properties(nau8821);
18161857

18171858
nau8821_reset_chip(nau8821->regmap);

sound/soc/codecs/rt5682-sdw.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,15 @@ static int __maybe_unused rt5682_dev_resume(struct device *dev)
750750
if (!rt5682->first_hw_init)
751751
return 0;
752752

753-
if (!slave->unattach_request)
753+
if (!slave->unattach_request) {
754+
if (rt5682->disable_irq == true) {
755+
mutex_lock(&rt5682->disable_irq_lock);
756+
sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
757+
rt5682->disable_irq = false;
758+
mutex_unlock(&rt5682->disable_irq_lock);
759+
}
754760
goto regmap_sync;
761+
}
755762

756763
time = wait_for_completion_timeout(&slave->initialization_complete,
757764
msecs_to_jiffies(RT5682_PROBE_TIMEOUT));

sound/soc/codecs/rt711-sdca-sdw.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,16 @@ static int __maybe_unused rt711_sdca_dev_resume(struct device *dev)
438438
if (!rt711->first_hw_init)
439439
return 0;
440440

441-
if (!slave->unattach_request)
441+
if (!slave->unattach_request) {
442+
if (rt711->disable_irq == true) {
443+
mutex_lock(&rt711->disable_irq_lock);
444+
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0);
445+
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8);
446+
rt711->disable_irq = false;
447+
mutex_unlock(&rt711->disable_irq_lock);
448+
}
442449
goto regmap_sync;
450+
}
443451

444452
time = wait_for_completion_timeout(&slave->initialization_complete,
445453
msecs_to_jiffies(RT711_PROBE_TIMEOUT));

sound/soc/codecs/rt711-sdw.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,15 @@ static int __maybe_unused rt711_dev_resume(struct device *dev)
538538
if (!rt711->first_hw_init)
539539
return 0;
540540

541-
if (!slave->unattach_request)
541+
if (!slave->unattach_request) {
542+
if (rt711->disable_irq == true) {
543+
mutex_lock(&rt711->disable_irq_lock);
544+
sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
545+
rt711->disable_irq = false;
546+
mutex_unlock(&rt711->disable_irq_lock);
547+
}
542548
goto regmap_sync;
549+
}
543550

544551
time = wait_for_completion_timeout(&slave->initialization_complete,
545552
msecs_to_jiffies(RT711_PROBE_TIMEOUT));

sound/soc/codecs/rt712-sdca-sdw.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,16 @@ static int __maybe_unused rt712_sdca_dev_resume(struct device *dev)
438438
if (!rt712->first_hw_init)
439439
return 0;
440440

441-
if (!slave->unattach_request)
441+
if (!slave->unattach_request) {
442+
if (rt712->disable_irq == true) {
443+
mutex_lock(&rt712->disable_irq_lock);
444+
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0);
445+
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8);
446+
rt712->disable_irq = false;
447+
mutex_unlock(&rt712->disable_irq_lock);
448+
}
442449
goto regmap_sync;
450+
}
443451

444452
time = wait_for_completion_timeout(&slave->initialization_complete,
445453
msecs_to_jiffies(RT712_PROBE_TIMEOUT));

0 commit comments

Comments
 (0)