Skip to content

Commit 07db6d5

Browse files
committed
ASoC: Merge up fixes
Needed for new Intel board file changes.
2 parents de35b06 + 2ae6da5 commit 07db6d5

33 files changed

+415
-86
lines changed

Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ properties:
4848
- const: mclk_rx
4949
- const: hclk
5050

51+
port:
52+
$ref: audio-graph-port.yaml#
53+
unevaluatedProperties: false
54+
5155
resets:
5256
maxItems: 1
5357

MAINTAINERS

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21720,6 +21720,15 @@ S: Supported
2172021720
W: https://github.com/thesofproject/linux/
2172121721
F: sound/soc/sof/
2172221722

21723+
SOUND - GENERIC SOUND CARD (Simple-Audio-Card, Audio-Graph-Card)
21724+
M: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
21725+
S: Supported
21726+
L: linux-sound@vger.kernel.org
21727+
F: sound/soc/generic/
21728+
F: include/sound/simple_card*
21729+
F: Documentation/devicetree/bindings/sound/simple-card.yaml
21730+
F: Documentation/devicetree/bindings/sound/audio-graph*.yaml
21731+
2172321732
SOUNDWIRE SUBSYSTEM
2172421733
M: Vinod Koul <vkoul@kernel.org>
2172521734
M: Bard Liao <yung-chuan.liao@linux.intel.com>
@@ -23313,7 +23322,7 @@ F: Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml
2331323322
F: drivers/iio/adc/ti-lmp92064.c
2331423323

2331523324
TI PCM3060 ASoC CODEC DRIVER
23316-
M: Kirill Marinushkin <kmarinushkin@birdec.com>
23325+
M: Kirill Marinushkin <k.marinushkin@gmail.com>
2331723326
L: linux-sound@vger.kernel.org
2331823327
S: Maintained
2331923328
F: Documentation/devicetree/bindings/sound/pcm3060.txt

drivers/soundwire/intel_ace2x.c

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,12 @@ static int intel_hw_params(struct snd_pcm_substream *substream,
383383
static int intel_prepare(struct snd_pcm_substream *substream,
384384
struct snd_soc_dai *dai)
385385
{
386+
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
386387
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
387388
struct sdw_intel *sdw = cdns_to_intel(cdns);
388389
struct sdw_cdns_dai_runtime *dai_runtime;
390+
struct snd_pcm_hw_params *hw_params;
389391
int ch, dir;
390-
int ret = 0;
391392

392393
dai_runtime = cdns->dai_runtime_array[dai->id];
393394
if (!dai_runtime) {
@@ -396,12 +397,8 @@ static int intel_prepare(struct snd_pcm_substream *substream,
396397
return -EIO;
397398
}
398399

400+
hw_params = &rtd->dpcm[substream->stream].hw_params;
399401
if (dai_runtime->suspended) {
400-
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
401-
struct snd_pcm_hw_params *hw_params;
402-
403-
hw_params = &rtd->dpcm[substream->stream].hw_params;
404-
405402
dai_runtime->suspended = false;
406403

407404
/*
@@ -422,15 +419,11 @@ static int intel_prepare(struct snd_pcm_substream *substream,
422419
/* the SHIM will be configured in the callback functions */
423420

424421
sdw_cdns_config_stream(cdns, ch, dir, dai_runtime->pdi);
425-
426-
/* Inform DSP about PDI stream number */
427-
ret = intel_params_stream(sdw, substream, dai,
428-
hw_params,
429-
sdw->instance,
430-
dai_runtime->pdi->intel_alh_id);
431422
}
432423

433-
return ret;
424+
/* Inform DSP about PDI stream number */
425+
return intel_params_stream(sdw, substream, dai, hw_params, sdw->instance,
426+
dai_runtime->pdi->intel_alh_id);
434427
}
435428

436429
static int

sound/hda/intel-dsp-config.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,10 @@ static const struct config_entry acpi_config_table[] = {
721721
#if IS_ENABLED(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) || \
722722
IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
723723
/* BayTrail */
724+
{
725+
.flags = FLAG_SST_OR_SOF_BYT,
726+
.acpi_hid = "LPE0F28",
727+
},
724728
{
725729
.flags = FLAG_SST_OR_SOF_BYT,
726730
.acpi_hid = "80860F28",

sound/soc/amd/yc/acp6x-mach.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
227227
DMI_MATCH(DMI_PRODUCT_NAME, "21M3"),
228228
}
229229
},
230+
{
231+
.driver_data = &acp6x_card,
232+
.matches = {
233+
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
234+
DMI_MATCH(DMI_PRODUCT_NAME, "21M4"),
235+
}
236+
},
230237
{
231238
.driver_data = &acp6x_card,
232239
.matches = {
@@ -325,6 +332,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
325332
DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"),
326333
}
327334
},
335+
{
336+
.driver_data = &acp6x_card,
337+
.matches = {
338+
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
339+
DMI_MATCH(DMI_PRODUCT_NAME, "E1404FA"),
340+
}
341+
},
328342
{
329343
.driver_data = &acp6x_card,
330344
.matches = {
@@ -388,6 +402,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
388402
DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 15 2022"),
389403
}
390404
},
405+
{
406+
.driver_data = &acp6x_card,
407+
.matches = {
408+
DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
409+
DMI_MATCH(DMI_PRODUCT_NAME, "Xiaomi Book Pro 14 2022"),
410+
}
411+
},
391412
{
392413
.driver_data = &acp6x_card,
393414
.matches = {

sound/soc/codecs/cs42l51.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,10 @@ int cs42l51_probe(struct device *dev, struct regmap *regmap)
747747

748748
cs42l51->reset_gpio = devm_gpiod_get_optional(dev, "reset",
749749
GPIOD_OUT_LOW);
750-
if (IS_ERR(cs42l51->reset_gpio))
751-
return PTR_ERR(cs42l51->reset_gpio);
750+
if (IS_ERR(cs42l51->reset_gpio)) {
751+
ret = PTR_ERR(cs42l51->reset_gpio);
752+
goto error;
753+
}
752754

753755
if (cs42l51->reset_gpio) {
754756
dev_dbg(dev, "Release reset gpio\n");
@@ -780,6 +782,7 @@ int cs42l51_probe(struct device *dev, struct regmap *regmap)
780782
return 0;
781783

782784
error:
785+
gpiod_set_value_cansleep(cs42l51->reset_gpio, 1);
783786
regulator_bulk_disable(ARRAY_SIZE(cs42l51->supplies),
784787
cs42l51->supplies);
785788
return ret;

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,14 @@
202202
#define CDC_RX_RXn_RX_PATH_SEC3(rx, n) (0x042c + rx->rxn_reg_stride * n)
203203
#define CDC_RX_RX0_RX_PATH_SEC4 (0x0430)
204204
#define CDC_RX_RX0_RX_PATH_SEC7 (0x0434)
205-
#define CDC_RX_RXn_RX_PATH_SEC7(rx, n) (0x0434 + rx->rxn_reg_stride * n)
205+
#define CDC_RX_RXn_RX_PATH_SEC7(rx, n) \
206+
(0x0434 + (rx->rxn_reg_stride * n) + ((n > 1) ? rx->rxn_reg_stride2 : 0))
206207
#define CDC_RX_DSM_OUT_DELAY_SEL_MASK GENMASK(2, 0)
207208
#define CDC_RX_DSM_OUT_DELAY_TWO_SAMPLE 0x2
208209
#define CDC_RX_RX0_RX_PATH_MIX_SEC0 (0x0438)
209210
#define CDC_RX_RX0_RX_PATH_MIX_SEC1 (0x043C)
210-
#define CDC_RX_RXn_RX_PATH_DSM_CTL(rx, n) (0x0440 + rx->rxn_reg_stride * n)
211+
#define CDC_RX_RXn_RX_PATH_DSM_CTL(rx, n) \
212+
(0x0440 + (rx->rxn_reg_stride * n) + ((n > 1) ? rx->rxn_reg_stride2 : 0))
211213
#define CDC_RX_RXn_DSM_CLK_EN_MASK BIT(0)
212214
#define CDC_RX_RX0_RX_PATH_DSM_CTL (0x0440)
213215
#define CDC_RX_RX0_RX_PATH_DSM_DATA1 (0x0444)
@@ -645,6 +647,7 @@ struct rx_macro {
645647
int rx_mclk_cnt;
646648
enum lpass_codec_version codec_version;
647649
int rxn_reg_stride;
650+
int rxn_reg_stride2;
648651
bool is_ear_mode_on;
649652
bool hph_pwr_mode;
650653
bool hph_hd2_mode;
@@ -1929,9 +1932,6 @@ static int rx_macro_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
19291932
CDC_RX_PATH_PGA_MUTE_MASK, 0x0);
19301933
}
19311934

1932-
if (j == INTERP_AUX)
1933-
dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, 2);
1934-
19351935
int_mux_cfg0 = CDC_RX_INP_MUX_RX_INT0_CFG0 + j * 8;
19361936
int_mux_cfg1 = int_mux_cfg0 + 4;
19371937
int_mux_cfg0_val = snd_soc_component_read(component, int_mux_cfg0);
@@ -2702,9 +2702,6 @@ static int rx_macro_enable_interp_clk(struct snd_soc_component *component,
27022702

27032703
main_reg = CDC_RX_RXn_RX_PATH_CTL(rx, interp_idx);
27042704
dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, interp_idx);
2705-
if (interp_idx == INTERP_AUX)
2706-
dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, 2);
2707-
27082705
rx_cfg2_reg = CDC_RX_RXn_RX_PATH_CFG2(rx, interp_idx);
27092706

27102707
if (SND_SOC_DAPM_EVENT_ON(event)) {
@@ -3821,6 +3818,7 @@ static int rx_macro_probe(struct platform_device *pdev)
38213818
case LPASS_CODEC_VERSION_2_0:
38223819
case LPASS_CODEC_VERSION_2_1:
38233820
rx->rxn_reg_stride = 0x80;
3821+
rx->rxn_reg_stride2 = 0xc;
38243822
def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_pre_2_5_defaults);
38253823
reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL);
38263824
if (!reg_defaults)
@@ -3834,6 +3832,7 @@ static int rx_macro_probe(struct platform_device *pdev)
38343832
case LPASS_CODEC_VERSION_2_7:
38353833
case LPASS_CODEC_VERSION_2_8:
38363834
rx->rxn_reg_stride = 0xc0;
3835+
rx->rxn_reg_stride2 = 0x0;
38373836
def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_2_5_defaults);
38383837
reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL);
38393838
if (!reg_defaults)

sound/soc/codecs/max9768.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,17 @@ static int max9768_set_gpio(struct snd_kcontrol *kcontrol,
5454
{
5555
struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol);
5656
struct max9768 *max9768 = snd_soc_component_get_drvdata(c);
57+
bool val = !ucontrol->value.integer.value[0];
58+
int ret;
5759

58-
gpiod_set_value_cansleep(max9768->mute, !ucontrol->value.integer.value[0]);
60+
if (val != gpiod_get_value_cansleep(max9768->mute))
61+
ret = 1;
62+
else
63+
ret = 0;
5964

60-
return 0;
65+
gpiod_set_value_cansleep(max9768->mute, val);
66+
67+
return ret;
6168
}
6269

6370
static const DECLARE_TLV_DB_RANGE(volume_tlv,

sound/soc/codecs/pcm3060-i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// PCM3060 I2C driver
44
//
5-
// Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com>
5+
// Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com>
66

77
#include <linux/i2c.h>
88
#include <linux/module.h>
@@ -55,5 +55,5 @@ static struct i2c_driver pcm3060_i2c_driver = {
5555
module_i2c_driver(pcm3060_i2c_driver);
5656

5757
MODULE_DESCRIPTION("PCM3060 I2C driver");
58-
MODULE_AUTHOR("Kirill Marinushkin <kmarinushkin@birdec.com>");
58+
MODULE_AUTHOR("Kirill Marinushkin <k.marinushkin@gmail.com>");
5959
MODULE_LICENSE("GPL v2");

sound/soc/codecs/pcm3060-spi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// PCM3060 SPI driver
44
//
5-
// Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com>
5+
// Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com>
66

77
#include <linux/module.h>
88
#include <linux/spi/spi.h>
@@ -55,5 +55,5 @@ static struct spi_driver pcm3060_spi_driver = {
5555
module_spi_driver(pcm3060_spi_driver);
5656

5757
MODULE_DESCRIPTION("PCM3060 SPI driver");
58-
MODULE_AUTHOR("Kirill Marinushkin <kmarinushkin@birdec.com>");
58+
MODULE_AUTHOR("Kirill Marinushkin <k.marinushkin@gmail.com>");
5959
MODULE_LICENSE("GPL v2");

0 commit comments

Comments
 (0)