Skip to content

Commit d001e97

Browse files
committed
Merge tag 'asoc-fix-v6.10-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.10 A bunch of fixes that came in during the merge window, all driver specific and none of them especially remarkable.
2 parents b3b6f12 + 737ce4f commit d001e97

File tree

8 files changed

+51
-89
lines changed

8 files changed

+51
-89
lines changed

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

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

7373
"#sound-dai-cells":
7474
const: 0

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/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
};

sound/soc/codecs/tas2781-fmwlib.c

Lines changed: 27 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,6 +2151,24 @@ static int tasdevice_load_data(struct tasdevice_priv *tas_priv,
21512151
return ret;
21522152
}
21532153

2154+
static void tasdev_load_calibrated_data(struct tasdevice_priv *priv, int i)
2155+
{
2156+
struct tasdevice_calibration *cal;
2157+
struct tasdevice_fw *cal_fmw;
2158+
2159+
cal_fmw = priv->tasdevice[i].cali_data_fmw;
2160+
2161+
/* No calibrated data for current devices, playback will go ahead. */
2162+
if (!cal_fmw)
2163+
return;
2164+
2165+
cal = cal_fmw->calibrations;
2166+
if (cal)
2167+
return;
2168+
2169+
load_calib_data(priv, &cal->dev_data);
2170+
}
2171+
21542172
int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
21552173
int cfg_no, int rca_conf_no)
21562174
{
@@ -2210,21 +2228,9 @@ int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
22102228
for (i = 0; i < tas_priv->ndev; i++) {
22112229
if (tas_priv->tasdevice[i].is_loaderr == true)
22122230
continue;
2213-
else if (tas_priv->tasdevice[i].is_loaderr == false
2214-
&& tas_priv->tasdevice[i].is_loading == true) {
2215-
struct tasdevice_fw *cal_fmw =
2216-
tas_priv->tasdevice[i].cali_data_fmw;
2217-
2218-
if (cal_fmw) {
2219-
struct tasdevice_calibration
2220-
*cal = cal_fmw->calibrations;
2221-
2222-
if (cal)
2223-
load_calib_data(tas_priv,
2224-
&(cal->dev_data));
2225-
}
2231+
if (tas_priv->tasdevice[i].is_loaderr == false &&
2232+
tas_priv->tasdevice[i].is_loading == true)
22262233
tas_priv->tasdevice[i].cur_prog = prm_no;
2227-
}
22282234
}
22292235
}
22302236

@@ -2245,11 +2251,15 @@ int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
22452251
tasdevice_load_data(tas_priv, &(conf->dev_data));
22462252
for (i = 0; i < tas_priv->ndev; i++) {
22472253
if (tas_priv->tasdevice[i].is_loaderr == true) {
2248-
status |= 1 << (i + 4);
2254+
status |= BIT(i + 4);
22492255
continue;
2250-
} else if (tas_priv->tasdevice[i].is_loaderr == false
2251-
&& tas_priv->tasdevice[i].is_loading == true)
2256+
}
2257+
2258+
if (tas_priv->tasdevice[i].is_loaderr == false &&
2259+
tas_priv->tasdevice[i].is_loading == true) {
2260+
tasdev_load_calibrated_data(tas_priv, i);
22522261
tas_priv->tasdevice[i].cur_conf = cfg_no;
2262+
}
22532263
}
22542264
} else
22552265
dev_dbg(tas_priv->dev, "%s: Unneeded loading dsp conf %d\n",
@@ -2308,65 +2318,6 @@ int tasdevice_prmg_load(void *context, int prm_no)
23082318
}
23092319
EXPORT_SYMBOL_NS_GPL(tasdevice_prmg_load, SND_SOC_TAS2781_FMWLIB);
23102320

2311-
int tasdevice_prmg_calibdata_load(void *context, int prm_no)
2312-
{
2313-
struct tasdevice_priv *tas_priv = (struct tasdevice_priv *) context;
2314-
struct tasdevice_fw *tas_fmw = tas_priv->fmw;
2315-
struct tasdevice_prog *program;
2316-
int prog_status = 0;
2317-
int i;
2318-
2319-
if (!tas_fmw) {
2320-
dev_err(tas_priv->dev, "%s: Firmware is NULL\n", __func__);
2321-
goto out;
2322-
}
2323-
2324-
if (prm_no >= tas_fmw->nr_programs) {
2325-
dev_err(tas_priv->dev,
2326-
"%s: prm(%d) is not in range of Programs %u\n",
2327-
__func__, prm_no, tas_fmw->nr_programs);
2328-
goto out;
2329-
}
2330-
2331-
for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) {
2332-
if (prm_no >= 0 && tas_priv->tasdevice[i].cur_prog != prm_no) {
2333-
tas_priv->tasdevice[i].cur_conf = -1;
2334-
tas_priv->tasdevice[i].is_loading = true;
2335-
prog_status++;
2336-
}
2337-
tas_priv->tasdevice[i].is_loaderr = false;
2338-
}
2339-
2340-
if (prog_status) {
2341-
program = &(tas_fmw->programs[prm_no]);
2342-
tasdevice_load_data(tas_priv, &(program->dev_data));
2343-
for (i = 0; i < tas_priv->ndev; i++) {
2344-
if (tas_priv->tasdevice[i].is_loaderr == true)
2345-
continue;
2346-
else if (tas_priv->tasdevice[i].is_loaderr == false
2347-
&& tas_priv->tasdevice[i].is_loading == true) {
2348-
struct tasdevice_fw *cal_fmw =
2349-
tas_priv->tasdevice[i].cali_data_fmw;
2350-
2351-
if (cal_fmw) {
2352-
struct tasdevice_calibration *cal =
2353-
cal_fmw->calibrations;
2354-
2355-
if (cal)
2356-
load_calib_data(tas_priv,
2357-
&(cal->dev_data));
2358-
}
2359-
tas_priv->tasdevice[i].cur_prog = prm_no;
2360-
}
2361-
}
2362-
}
2363-
2364-
out:
2365-
return prog_status;
2366-
}
2367-
EXPORT_SYMBOL_NS_GPL(tasdevice_prmg_calibdata_load,
2368-
SND_SOC_TAS2781_FMWLIB);
2369-
23702321
void tasdevice_tuning_switch(void *context, int state)
23712322
{
23722323
struct tasdevice_priv *tas_priv = (struct tasdevice_priv *) context;

sound/soc/codecs/tas2781-i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// ALSA SoC Texas Instruments TAS2563/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 TAS2563/TAS2781 driver implements a flexible and configurable
@@ -414,7 +414,7 @@ static void tasdevice_fw_ready(const struct firmware *fmw,
414414
__func__, tas_priv->cal_binaryname[i]);
415415
}
416416

417-
tasdevice_prmg_calibdata_load(tas_priv, 0);
417+
tasdevice_prmg_load(tas_priv, 0);
418418
tas_priv->cur_prog = 0;
419419
out:
420420
if (tas_priv->fw_state == TASDEVICE_DSP_FW_FAIL) {

sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *d
109109
return -ENOMEM;
110110

111111
for (i = 0; i < ARRAY_SIZE(need_sdca_suffix); i++) {
112-
if (strstr(codec_dai->name, need_sdca_suffix[i])) {
112+
if (strstr(component->name_prefix, need_sdca_suffix[i])) {
113113
/* Add -sdca suffix for existing UCMs */
114114
card->components = devm_kasprintf(card->dev, GFP_KERNEL,
115115
"%s-sdca", card->components);

0 commit comments

Comments
 (0)