Skip to content

Commit 041c9f7

Browse files
committed
Merge tag 'sound-fix-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A collection of small fixes for 6.10-rc1. Most of changes are various device-specific fixes and quirks, while there are a few small changes in ALSA core timer and module / built-in fixes" * tag 'sound-fix-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 440/460 G11. ALSA: core: Enable proc module when CONFIG_MODULES=y ALSA: core: Fix NULL module pointer assignment at card init ALSA: hda/realtek: Enable headset mic of JP-IK LEAP W502 with ALC897 ASoC: dt-bindings: stm32: Ensure compatible pattern matches whole string ASoC: tas2781: Fix wrong loading calibrated data sequence ASoC: tas2552: Add TX path for capturing AUDIO-OUT data ALSA: usb-audio: Fix for sampling rates support for Mbox3 Documentation: sound: Fix trailing whitespaces ALSA: timer: Set lower bound of start tick time ASoC: codecs: ES8326: solve hp and button detect issue ASoC: rt5645: mic-in detection threshold modification ASoC: Intel: sof_sdw_rt_sdca_jack_common: Use name_prefix for `-sdca` detection
2 parents e292ead + d001e97 commit 041c9f7

File tree

13 files changed

+86
-106
lines changed

13 files changed

+86
-106
lines changed

Documentation/devicetree/bindings/sound/st,stm32-sai.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ patternProperties:
7272
properties:
7373
compatible:
7474
description: Compatible for SAI sub-block A or B.
75-
pattern: "st,stm32-sai-sub-[ab]"
75+
pattern: "^st,stm32-sai-sub-[ab]$"
7676

7777
"#sound-dai-cells":
7878
const: 0

Documentation/sound/hd-audio/notes.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ problem is broken BIOS, and the rest is the driver implementation.
1515
This document explains the brief trouble-shooting and debugging
1616
methods for the HD-audio hardware.
1717

18-
The HD-audio component consists of two parts: the controller chip and
18+
The HD-audio component consists of two parts: the controller chip and
1919
the codec chips on the HD-audio bus. Linux provides a single driver
2020
for all controllers, snd-hda-intel. Although the driver name contains
2121
a word of a well-known hardware vendor, it's not specific to it but for
@@ -81,7 +81,7 @@ the wake-up timing. It wakes up a few samples before actually
8181
processing the data on the buffer. This caused a lot of problems, for
8282
example, with ALSA dmix or JACK. Since 2.6.27 kernel, the driver puts
8383
an artificial delay to the wake up timing. This delay is controlled
84-
via ``bdl_pos_adj`` option.
84+
via ``bdl_pos_adj`` option.
8585

8686
When ``bdl_pos_adj`` is a negative value (as default), it's assigned to
8787
an appropriate value depending on the controller chip. For Intel
@@ -144,7 +144,7 @@ see a regression wrt the sound quality (stuttering, etc) or a lock-up
144144
in the recent kernel, try to pass ``enable_msi=0`` option to disable
145145
MSI. If it works, you can add the known bad device to the blacklist
146146
defined in hda_intel.c. In such a case, please report and give the
147-
patch back to the upstream developer.
147+
patch back to the upstream developer.
148148

149149

150150
HD-Audio Codec
@@ -375,7 +375,7 @@ HD-Audio Reconfiguration
375375
------------------------
376376
This is an experimental feature to allow you re-configure the HD-audio
377377
codec dynamically without reloading the driver. The following sysfs
378-
files are available under each codec-hwdep device directory (e.g.
378+
files are available under each codec-hwdep device directory (e.g.
379379
/sys/class/sound/hwC0D0):
380380

381381
vendor_id
@@ -433,7 +433,7 @@ re-configure based on that state, run like below:
433433
::
434434

435435
# echo 0x14 0x9993013f > /sys/class/sound/hwC0D0/user_pin_configs
436-
# echo 1 > /sys/class/sound/hwC0D0/reconfig
436+
# echo 1 > /sys/class/sound/hwC0D0/reconfig
437437

438438

439439
Hint Strings
@@ -494,7 +494,7 @@ indep_hp (bool)
494494
mixer control, if available
495495
add_stereo_mix_input (bool)
496496
add the stereo mix (analog-loopback mix) to the input mux if
497-
available
497+
available
498498
add_jack_modes (bool)
499499
add "xxx Jack Mode" enum controls to each I/O jack for allowing to
500500
change the headphone amp and mic bias VREF capabilities
@@ -504,7 +504,7 @@ power_save_node (bool)
504504
stream states
505505
power_down_unused (bool)
506506
power down the unused widgets, a subset of power_save_node, and
507-
will be dropped in future
507+
will be dropped in future
508508
add_hp_mic (bool)
509509
add the headphone to capture source if possible
510510
hp_mic_detect (bool)
@@ -603,7 +603,7 @@ present.
603603

604604
The patch module option is specific to each card instance, and you
605605
need to give one file name for each instance, separated by commas.
606-
For example, if you have two cards, one for an on-board analog and one
606+
For example, if you have two cards, one for an on-board analog and one
607607
for an HDMI video board, you may pass patch option like below:
608608
::
609609

include/sound/tas2781-dsp.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
44
//
5-
// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
5+
// Copyright (C) 2022 - 2024 Texas Instruments Incorporated
66
// https://www.ti.com
77
//
88
// The TAS2781 driver implements a flexible and configurable
@@ -13,8 +13,8 @@
1313
// Author: Kevin Lu <[email protected]>
1414
//
1515

16-
#ifndef __TASDEVICE_DSP_H__
17-
#define __TASDEVICE_DSP_H__
16+
#ifndef __TAS2781_DSP_H__
17+
#define __TAS2781_DSP_H__
1818

1919
#define MAIN_ALL_DEVICES 0x0d
2020
#define MAIN_DEVICE_A 0x01
@@ -180,7 +180,6 @@ void tasdevice_calbin_remove(void *context);
180180
int tasdevice_select_tuningprm_cfg(void *context, int prm,
181181
int cfg_no, int rca_conf_no);
182182
int tasdevice_prmg_load(void *context, int prm_no);
183-
int tasdevice_prmg_calibdata_load(void *context, int prm_no);
184183
void tasdevice_tuning_switch(void *context, int state);
185184
int tas2781_load_calibration(void *context, char *file_name,
186185
unsigned short i);

sound/core/init.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ MODULE_PARM_DESC(slots, "Module names assigned to the slots.");
5050
static int module_slot_match(struct module *module, int idx)
5151
{
5252
int match = 1;
53-
#ifdef MODULE
53+
#ifdef CONFIG_MODULES
5454
const char *s1, *s2;
5555

5656
if (!module || !*module->name || !slots[idx])
@@ -77,7 +77,7 @@ static int module_slot_match(struct module *module, int idx)
7777
if (!c1)
7878
break;
7979
}
80-
#endif /* MODULE */
80+
#endif /* CONFIG_MODULES */
8181
return match;
8282
}
8383

@@ -311,10 +311,8 @@ static int snd_card_init(struct snd_card *card, struct device *parent,
311311
}
312312
card->dev = parent;
313313
card->number = idx;
314-
#ifdef MODULE
315-
WARN_ON(!module);
314+
WARN_ON(IS_MODULE(CONFIG_SND) && !module);
316315
card->module = module;
317-
#endif
318316
INIT_LIST_HEAD(&card->devices);
319317
init_rwsem(&card->controls_rwsem);
320318
rwlock_init(&card->ctl_files_rwlock);
@@ -969,7 +967,7 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer)
969967

970968
#endif
971969

972-
#ifdef MODULE
970+
#ifdef CONFIG_MODULES
973971
static void snd_card_module_info_read(struct snd_info_entry *entry,
974972
struct snd_info_buffer *buffer)
975973
{
@@ -997,7 +995,7 @@ int __init snd_card_info_init(void)
997995
if (snd_info_register(entry) < 0)
998996
return -ENOMEM; /* freed in error path */
999997

1000-
#ifdef MODULE
998+
#ifdef CONFIG_MODULES
1001999
entry = snd_info_create_module_entry(THIS_MODULE, "modules", NULL);
10021000
if (!entry)
10031001
return -ENOMEM;

sound/core/timer.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,14 @@ static int snd_timer_start1(struct snd_timer_instance *timeri,
544544
SNDRV_TIMER_IFLG_START))
545545
return -EBUSY;
546546

547+
/* check the actual time for the start tick;
548+
* bail out as error if it's way too low (< 100us)
549+
*/
550+
if (start) {
551+
if ((u64)snd_timer_hw_resolution(timer) * ticks < 100000)
552+
return -EINVAL;
553+
}
554+
547555
if (start)
548556
timeri->ticks = timeri->cticks = ticks;
549557
else if (!timeri->cticks)

sound/pci/hda/patch_realtek.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10194,8 +10194,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1019410194
SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
1019510195
SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
1019610196
SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
10197+
SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
1019710198
SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED),
1019810199
SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
10200+
SND_PCI_QUIRK(0x103c, 0x8c8d, "HP ProBook 440 G11", ALC236_FIXUP_HP_GPIO_LED),
10201+
SND_PCI_QUIRK(0x103c, 0x8c8e, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
1019910202
SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED),
1020010203
SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
1020110204
SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
@@ -12028,6 +12031,7 @@ enum {
1202812031
ALC897_FIXUP_LENOVO_HEADSET_MODE,
1202912032
ALC897_FIXUP_HEADSET_MIC_PIN2,
1203012033
ALC897_FIXUP_UNIS_H3C_X500S,
12034+
ALC897_FIXUP_HEADSET_MIC_PIN3,
1203112035
};
1203212036

1203312037
static const struct hda_fixup alc662_fixups[] = {
@@ -12474,10 +12478,18 @@ static const struct hda_fixup alc662_fixups[] = {
1247412478
{}
1247512479
},
1247612480
},
12481+
[ALC897_FIXUP_HEADSET_MIC_PIN3] = {
12482+
.type = HDA_FIXUP_PINS,
12483+
.v.pins = (const struct hda_pintbl[]) {
12484+
{ 0x19, 0x03a11050 }, /* use as headset mic */
12485+
{ }
12486+
},
12487+
},
1247712488
};
1247812489

1247912490
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
1248012491
SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2),
12492+
SND_PCI_QUIRK(0x1019, 0x9859, "JP-IK LEAP W502", ALC897_FIXUP_HEADSET_MIC_PIN3),
1248112493
SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC),
1248212494
SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC),
1248312495
SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE),

sound/soc/codecs/es8326.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,8 @@ static void es8326_jack_detect_handler(struct work_struct *work)
829829
/* mute adc when mic path switch */
830830
regmap_write(es8326->regmap, ES8326_ADC1_SRC, 0x44);
831831
regmap_write(es8326->regmap, ES8326_ADC2_SRC, 0x66);
832-
es8326->hp = 0;
833832
}
833+
es8326->hp = 0;
834834
regmap_update_bits(es8326->regmap, ES8326_HPDET_TYPE, 0x03, 0x01);
835835
regmap_write(es8326->regmap, ES8326_SYS_BIAS, 0x0a);
836836
regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x03);
@@ -981,7 +981,7 @@ static int es8326_resume(struct snd_soc_component *component)
981981
regmap_write(es8326->regmap, ES8326_ANA_LP, 0xf0);
982982
usleep_range(10000, 15000);
983983
regmap_write(es8326->regmap, ES8326_HPJACK_TIMER, 0xd9);
984-
regmap_write(es8326->regmap, ES8326_ANA_MICBIAS, 0xcb);
984+
regmap_write(es8326->regmap, ES8326_ANA_MICBIAS, 0xd8);
985985
/* set headphone default type and detect pin */
986986
regmap_write(es8326->regmap, ES8326_HPDET_TYPE, 0x83);
987987
regmap_write(es8326->regmap, ES8326_CLK_RESAMPLE, 0x05);
@@ -1018,7 +1018,7 @@ static int es8326_resume(struct snd_soc_component *component)
10181018

10191019
regmap_write(es8326->regmap, ES8326_ANA_VSEL, 0x7F);
10201020
/* select vdda as micbias source */
1021-
regmap_write(es8326->regmap, ES8326_VMIDLOW, 0x23);
1021+
regmap_write(es8326->regmap, ES8326_VMIDLOW, 0x03);
10221022
/* set dac dsmclip = 1 */
10231023
regmap_write(es8326->regmap, ES8326_DAC_DSM, 0x08);
10241024
regmap_write(es8326->regmap, ES8326_DAC_VPPSCALE, 0x15);

sound/soc/codecs/rt5645.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static const struct reg_sequence init_list[] = {
8181
static const struct reg_sequence rt5650_init_list[] = {
8282
{0xf6, 0x0100},
8383
{RT5645_PWR_ANLG1, 0x02},
84+
{RT5645_IL_CMD3, 0x0018},
8485
};
8586

8687
static const struct reg_default rt5645_reg[] = {

sound/soc/codecs/tas2552.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
/*
33
* tas2552.c - ALSA SoC Texas Instruments TAS2552 Mono Audio Amplifier
44
*
5-
* Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
5+
* Copyright (C) 2014 - 2024 Texas Instruments Incorporated -
6+
* https://www.ti.com
67
*
78
* Author: Dan Murphy <[email protected]>
89
*/
@@ -119,12 +120,14 @@ static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] =
119120
&tas2552_input_mux_control),
120121

121122
SND_SOC_DAPM_AIF_IN("DAC IN", "DAC Playback", 0, SND_SOC_NOPM, 0, 0),
123+
SND_SOC_DAPM_AIF_OUT("ASI OUT", "DAC Capture", 0, SND_SOC_NOPM, 0, 0),
122124
SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
123125
SND_SOC_DAPM_OUT_DRV("ClassD", TAS2552_CFG_2, 7, 0, NULL, 0),
124126
SND_SOC_DAPM_SUPPLY("PLL", TAS2552_CFG_2, 3, 0, NULL, 0),
125127
SND_SOC_DAPM_POST("Post Event", tas2552_post_event),
126128

127-
SND_SOC_DAPM_OUTPUT("OUT")
129+
SND_SOC_DAPM_OUTPUT("OUT"),
130+
SND_SOC_DAPM_INPUT("DMIC")
128131
};
129132

130133
static const struct snd_soc_dapm_route tas2552_audio_map[] = {
@@ -134,6 +137,7 @@ static const struct snd_soc_dapm_route tas2552_audio_map[] = {
134137
{"ClassD", NULL, "Input selection"},
135138
{"OUT", NULL, "ClassD"},
136139
{"ClassD", NULL, "PLL"},
140+
{"ASI OUT", NULL, "DMIC"}
137141
};
138142

139143
#ifdef CONFIG_PM
@@ -538,6 +542,13 @@ static struct snd_soc_dai_driver tas2552_dai[] = {
538542
.rates = SNDRV_PCM_RATE_8000_192000,
539543
.formats = TAS2552_FORMATS,
540544
},
545+
.capture = {
546+
.stream_name = "Capture",
547+
.channels_min = 2,
548+
.channels_max = 2,
549+
.rates = SNDRV_PCM_RATE_8000_192000,
550+
.formats = TAS2552_FORMATS,
551+
},
541552
.ops = &tas2552_speaker_dai_ops,
542553
},
543554
};

0 commit comments

Comments
 (0)