Skip to content

Commit 97eb2d9

Browse files
committed
Merge tag 'sound-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Nothing surprising, a collection of small device-specific fixes. The majority of changes are for ASoC Intel stuff, while a few other ASoC and HD-audio fixes are found" * tag 'sound-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (31 commits) ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set() ALSA: asihpi: check pao in control_message() ASoC: hdmi-codec: only startup/shutdown on supported streams ASoC: da7219: Initialize jack_det_mutex ALSA: hda: Match only Intel devices with CONTROLLER_IN_GPU() ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform ALSA: hda: intel-dsp-config: add MTL PCI id ASoC: SOF: IPC4: update gain ipc msg definition to align with fw ASoC: SOF: sof-audio: don't squelch errors in WIDGET_SETUP phase ASoC: SOF: Intel: hda-ctrl: re-add sleep after entering and exiting reset ASoC: SOF: Intel: hda-dsp: harden D0i3 programming sequence ASoC: SOF: ipc4-topology: set dmic dai index from copier ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP ASoC: SOF: Intel: pci-tng: revert invalid bar size setting ASoC: SOF: topology: Fix error handling in sof_widget_ready() ASoC: Intel: soc-acpi: fix copy-paste issue in topology names ASoC: SOF: ipc4-topology: Fix incorrect sample rate print unit ASoC: SOF: ipc3: Check for upper size limit for the received message ASOC: SOF: Intel: pci-tgl: Fix device description ...
2 parents 2cf5a40 + 98e5eb1 commit 97eb2d9

32 files changed

+246
-90
lines changed

sound/hda/intel-dsp-config.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,15 @@ static const struct config_entry config_table[] = {
472472
},
473473
#endif
474474

475+
/* Meteor Lake */
476+
#if IS_ENABLED(CONFIG_SND_SOC_SOF_METEORLAKE)
477+
/* Meteorlake-P */
478+
{
479+
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
480+
.device = 0x7e28,
481+
},
482+
#endif
483+
475484
};
476485

477486
static const struct config_entry *snd_intel_dsp_find_config

sound/pci/asihpi/hpi6205.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ void HPI_6205(struct hpi_message *phm, struct hpi_response *phr)
430430
pao = hpi_find_adapter(phm->adapter_index);
431431
} else {
432432
/* subsys messages don't address an adapter */
433-
_HPI_6205(NULL, phm, phr);
433+
phr->error = HPI_ERROR_INVALID_OBJ_INDEX;
434434
return;
435435
}
436436

sound/pci/hda/hda_intel.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,15 @@ enum {
328328
#define needs_eld_notify_link(chip) false
329329
#endif
330330

331-
#define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \
331+
#define CONTROLLER_IN_GPU(pci) (((pci)->vendor == 0x8086) && \
332+
(((pci)->device == 0x0a0c) || \
332333
((pci)->device == 0x0c0c) || \
333334
((pci)->device == 0x0d0c) || \
334335
((pci)->device == 0x160c) || \
335336
((pci)->device == 0x490d) || \
336337
((pci)->device == 0x4f90) || \
337338
((pci)->device == 0x4f91) || \
338-
((pci)->device == 0x4f92))
339+
((pci)->device == 0x4f92)))
339340

340341
#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
341342

sound/pci/hda/patch_ca0132.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4228,8 +4228,10 @@ static int tuning_ctl_set(struct hda_codec *codec, hda_nid_t nid,
42284228

42294229
for (i = 0; i < TUNING_CTLS_COUNT; i++)
42304230
if (nid == ca0132_tuning_ctls[i].nid)
4231-
break;
4231+
goto found;
42324232

4233+
return -EINVAL;
4234+
found:
42334235
snd_hda_power_up(codec);
42344236
dspio_set_param(codec, ca0132_tuning_ctls[i].mid, 0x20,
42354237
ca0132_tuning_ctls[i].req,

sound/pci/hda/patch_realtek.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9447,6 +9447,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
94479447
SND_PCI_QUIRK(0x103c, 0x8b8a, "HP", ALC236_FIXUP_HP_GPIO_LED),
94489448
SND_PCI_QUIRK(0x103c, 0x8b8b, "HP", ALC236_FIXUP_HP_GPIO_LED),
94499449
SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED),
9450+
SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
94509451
SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
94519452
SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED),
94529453
SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
@@ -9539,6 +9540,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
95399540
SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
95409541
SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
95419542
SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
9543+
SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
95429544
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
95439545
SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
95449546
SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),

sound/soc/codecs/da7219-aad.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,8 @@ int da7219_aad_init(struct snd_soc_component *component)
968968
INIT_WORK(&da7219_aad->hptest_work, da7219_aad_hptest_work);
969969
INIT_WORK(&da7219_aad->jack_det_work, da7219_aad_jack_det_work);
970970

971+
mutex_init(&da7219_aad->jack_det_mutex);
972+
971973
ret = request_threaded_irq(da7219_aad->irq, da7219_aad_pre_irq_thread,
972974
da7219_aad_irq_thread,
973975
IRQF_TRIGGER_LOW | IRQF_ONESHOT,

sound/soc/codecs/hdmi-codec.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,13 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream,
428428
{
429429
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
430430
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
431+
bool has_capture = !hcp->hcd.no_i2s_capture;
432+
bool has_playback = !hcp->hcd.no_i2s_playback;
431433
int ret = 0;
432434

435+
if (!((has_playback && tx) || (has_capture && !tx)))
436+
return 0;
437+
433438
mutex_lock(&hcp->lock);
434439
if (hcp->busy) {
435440
dev_err(dai->dev, "Only one simultaneous stream supported!\n");
@@ -468,6 +473,12 @@ static void hdmi_codec_shutdown(struct snd_pcm_substream *substream,
468473
struct snd_soc_dai *dai)
469474
{
470475
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
476+
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
477+
bool has_capture = !hcp->hcd.no_i2s_capture;
478+
bool has_playback = !hcp->hcd.no_i2s_playback;
479+
480+
if (!((has_playback && tx) || (has_capture && !tx)))
481+
return;
471482

472483
hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;
473484
hcp->hcd.ops->audio_shutdown(dai->dev->parent, hcp->hcd.data);

sound/soc/codecs/lpass-tx-macro.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ enum {
242242

243243
struct tx_mute_work {
244244
struct tx_macro *tx;
245-
u32 decimator;
245+
u8 decimator;
246246
struct delayed_work dwork;
247247
};
248248

@@ -635,7 +635,7 @@ static int tx_macro_mclk_enable(struct tx_macro *tx,
635635
return 0;
636636
}
637637

638-
static bool is_amic_enabled(struct snd_soc_component *component, int decimator)
638+
static bool is_amic_enabled(struct snd_soc_component *component, u8 decimator)
639639
{
640640
u16 adc_mux_reg, adc_reg, adc_n;
641641

@@ -849,7 +849,7 @@ static int tx_macro_enable_dec(struct snd_soc_dapm_widget *w,
849849
struct snd_kcontrol *kcontrol, int event)
850850
{
851851
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
852-
unsigned int decimator;
852+
u8 decimator;
853853
u16 tx_vol_ctl_reg, dec_cfg_reg, hpf_gate_reg, tx_gain_ctl_reg;
854854
u8 hpf_cut_off_freq;
855855
int hpf_delay = TX_MACRO_DMIC_HPF_DELAY_MS;
@@ -1064,7 +1064,8 @@ static int tx_macro_hw_params(struct snd_pcm_substream *substream,
10641064
struct snd_soc_dai *dai)
10651065
{
10661066
struct snd_soc_component *component = dai->component;
1067-
u32 decimator, sample_rate;
1067+
u32 sample_rate;
1068+
u8 decimator;
10681069
int tx_fs_rate;
10691070
struct tx_macro *tx = snd_soc_component_get_drvdata(component);
10701071

@@ -1128,7 +1129,7 @@ static int tx_macro_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
11281129
{
11291130
struct snd_soc_component *component = dai->component;
11301131
struct tx_macro *tx = snd_soc_component_get_drvdata(component);
1131-
u16 decimator;
1132+
u8 decimator;
11321133

11331134
/* active decimator not set yet */
11341135
if (tx->active_decimator[dai->id] == -1)

sound/soc/fsl/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ config SND_SOC_IMX_SGTL5000
294294
Say Y if you want to add support for SoC audio on an i.MX board with
295295
a sgtl5000 codec.
296296

297+
Note that this is an old driver. Consider enabling
298+
SND_SOC_FSL_ASOC_CARD and SND_SOC_SGTL5000 to use the newer
299+
driver.
300+
297301
config SND_SOC_IMX_SPDIF
298302
tristate "SoC Audio support for i.MX boards with S/PDIF"
299303
select SND_SOC_IMX_PCM_DMA

sound/soc/intel/avs/boards/da7219.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,26 @@ static void avs_da7219_codec_exit(struct snd_soc_pcm_runtime *rtd)
117117
snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
118118
}
119119

120+
static int
121+
avs_da7219_be_fixup(struct snd_soc_pcm_runtime *runrime, struct snd_pcm_hw_params *params)
122+
{
123+
struct snd_interval *rate, *channels;
124+
struct snd_mask *fmt;
125+
126+
rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
127+
channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
128+
fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
129+
130+
/* The ADSP will convert the FE rate to 48k, stereo */
131+
rate->min = rate->max = 48000;
132+
channels->min = channels->max = 2;
133+
134+
/* set SSP0 to 24 bit */
135+
snd_mask_none(fmt);
136+
snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
137+
return 0;
138+
}
139+
120140
static int avs_create_dai_link(struct device *dev, const char *platform_name, int ssp_port,
121141
struct snd_soc_dai_link **dai_link)
122142
{
@@ -148,6 +168,7 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in
148168
dl->num_platforms = 1;
149169
dl->id = 0;
150170
dl->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS;
171+
dl->be_hw_params_fixup = avs_da7219_be_fixup;
151172
dl->init = avs_da7219_codec_init;
152173
dl->exit = avs_da7219_codec_exit;
153174
dl->nonatomic = 1;

0 commit comments

Comments
 (0)