Skip to content

Commit 67140b6

Browse files
committed
Merge branch 'for-5.16' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.17 so we can apply new Tegra work
2 parents f316c9d + 046aede commit 67140b6

34 files changed

Lines changed: 957 additions & 322 deletions

Documentation/devicetree/bindings/sound/wlf,wm8962.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ properties:
1919
clocks:
2020
maxItems: 1
2121

22+
interrupts:
23+
maxItems: 1
24+
2225
"#sound-dai-cells":
2326
const: 0
2427

include/sound/soc-acpi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ struct snd_soc_acpi_link_adr {
147147
*/
148148
/* Descriptor for SST ASoC machine driver */
149149
struct snd_soc_acpi_mach {
150-
const u8 id[ACPI_ID_LEN];
150+
u8 id[ACPI_ID_LEN];
151151
const struct snd_soc_acpi_codecs *comp_ids;
152152
const u32 link_mask;
153153
const struct snd_soc_acpi_link_adr *links;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,11 @@ static int snd_acp6x_probe(struct pci_dev *pci,
146146
{
147147
struct acp6x_dev_data *adata;
148148
struct platform_device_info pdevinfo[ACP6x_DEVS];
149-
int ret, index;
149+
int index = 0;
150150
int val = 0x00;
151151
u32 addr;
152152
unsigned int irqflags;
153+
int ret;
153154

154155
irqflags = IRQF_SHARED;
155156
/* Yellow Carp device check */

sound/soc/codecs/cs35l41-spi.c

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,6 @@ static const struct spi_device_id cs35l41_id_spi[] = {
2626

2727
MODULE_DEVICE_TABLE(spi, cs35l41_id_spi);
2828

29-
static void cs35l41_spi_otp_setup(struct cs35l41_private *cs35l41,
30-
bool is_pre_setup, unsigned int *freq)
31-
{
32-
struct spi_device *spi;
33-
u32 orig_spi_freq;
34-
35-
spi = to_spi_device(cs35l41->dev);
36-
37-
if (!spi) {
38-
dev_err(cs35l41->dev, "%s: No SPI device\n", __func__);
39-
return;
40-
}
41-
42-
if (is_pre_setup) {
43-
orig_spi_freq = spi->max_speed_hz;
44-
if (orig_spi_freq > CS35L41_SPI_MAX_FREQ_OTP) {
45-
spi->max_speed_hz = CS35L41_SPI_MAX_FREQ_OTP;
46-
spi_setup(spi);
47-
}
48-
*freq = orig_spi_freq;
49-
} else {
50-
if (spi->max_speed_hz != *freq) {
51-
spi->max_speed_hz = *freq;
52-
spi_setup(spi);
53-
}
54-
}
55-
}
56-
5729
static int cs35l41_spi_probe(struct spi_device *spi)
5830
{
5931
const struct regmap_config *regmap_config = &cs35l41_regmap_spi;
@@ -65,6 +37,9 @@ static int cs35l41_spi_probe(struct spi_device *spi)
6537
if (!cs35l41)
6638
return -ENOMEM;
6739

40+
spi->max_speed_hz = CS35L41_SPI_MAX_FREQ;
41+
spi_setup(spi);
42+
6843
spi_set_drvdata(spi, cs35l41);
6944
cs35l41->regmap = devm_regmap_init_spi(spi, regmap_config);
7045
if (IS_ERR(cs35l41->regmap)) {
@@ -75,7 +50,6 @@ static int cs35l41_spi_probe(struct spi_device *spi)
7550

7651
cs35l41->dev = &spi->dev;
7752
cs35l41->irq = spi->irq;
78-
cs35l41->otp_setup = cs35l41_spi_otp_setup;
7953

8054
return cs35l41_probe(cs35l41, pdata);
8155
}

sound/soc/codecs/cs35l41.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ static int cs35l41_otp_unpack(void *data)
438438
const struct cs35l41_otp_packed_element_t *otp_map;
439439
struct cs35l41_private *cs35l41 = data;
440440
int bit_offset, word_offset, ret, i;
441-
unsigned int orig_spi_freq;
442441
unsigned int bit_sum = 8;
443442
u32 otp_val, otp_id_reg;
444443
u32 *otp_mem;
@@ -462,19 +461,13 @@ static int cs35l41_otp_unpack(void *data)
462461
goto err_otp_unpack;
463462
}
464463

465-
if (cs35l41->otp_setup)
466-
cs35l41->otp_setup(cs35l41, true, &orig_spi_freq);
467-
468464
ret = regmap_bulk_read(cs35l41->regmap, CS35L41_OTP_MEM0, otp_mem,
469465
CS35L41_OTP_SIZE_WORDS);
470466
if (ret < 0) {
471467
dev_err(cs35l41->dev, "Read OTP Mem failed: %d\n", ret);
472468
goto err_otp_unpack;
473469
}
474470

475-
if (cs35l41->otp_setup)
476-
cs35l41->otp_setup(cs35l41, false, &orig_spi_freq);
477-
478471
otp_map = otp_map_match->map;
479472

480473
bit_offset = otp_map_match->bit_offset;

sound/soc/codecs/cs35l41.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@
728728
#define CS35L41_FS2_WINDOW_MASK 0x00FFF800
729729
#define CS35L41_FS2_WINDOW_SHIFT 12
730730

731-
#define CS35L41_SPI_MAX_FREQ_OTP 4000000
731+
#define CS35L41_SPI_MAX_FREQ 4000000
732732

733733
#define CS35L41_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
734734
#define CS35L41_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
@@ -781,8 +781,6 @@ struct cs35l41_private {
781781
int irq;
782782
/* GPIO for /RST */
783783
struct gpio_desc *reset_gpio;
784-
void (*otp_setup)(struct cs35l41_private *cs35l41, bool is_pre_setup,
785-
unsigned int *freq);
786784
};
787785

788786
int cs35l41_probe(struct cs35l41_private *cs35l41,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2188,7 +2188,7 @@ static int rx_macro_config_classh(struct snd_soc_component *component,
21882188
snd_soc_component_update_bits(component,
21892189
CDC_RX_CLSH_DECAY_CTRL,
21902190
CDC_RX_CLSH_DECAY_RATE_MASK, 0x0);
2191-
snd_soc_component_update_bits(component,
2191+
snd_soc_component_write_field(component,
21922192
CDC_RX_RX1_RX_PATH_CFG0,
21932193
CDC_RX_RXn_CLSH_EN_MASK, 0x1);
21942194
break;

sound/soc/codecs/rk817_codec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,3 +539,4 @@ module_platform_driver(rk817_codec_driver);
539539
MODULE_DESCRIPTION("ASoC RK817 codec driver");
540540
MODULE_AUTHOR("binyuan <kevan.lan@rock-chips.com>");
541541
MODULE_LICENSE("GPL v2");
542+
MODULE_ALIAS("platform:rk817-codec");

sound/soc/codecs/rt5682.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2858,24 +2858,26 @@ int rt5682_register_dai_clks(struct rt5682_priv *rt5682)
28582858

28592859
for (i = 0; i < RT5682_DAI_NUM_CLKS; ++i) {
28602860
struct clk_init_data init = { };
2861+
struct clk_parent_data parent_data;
2862+
const struct clk_hw *parent;
28612863

28622864
dai_clk_hw = &rt5682->dai_clks_hw[i];
28632865

28642866
switch (i) {
28652867
case RT5682_DAI_WCLK_IDX:
28662868
/* Make MCLK the parent of WCLK */
28672869
if (rt5682->mclk) {
2868-
init.parent_data = &(struct clk_parent_data){
2870+
parent_data = (struct clk_parent_data){
28692871
.fw_name = "mclk",
28702872
};
2873+
init.parent_data = &parent_data;
28712874
init.num_parents = 1;
28722875
}
28732876
break;
28742877
case RT5682_DAI_BCLK_IDX:
28752878
/* Make WCLK the parent of BCLK */
2876-
init.parent_hws = &(const struct clk_hw *){
2877-
&rt5682->dai_clks_hw[RT5682_DAI_WCLK_IDX]
2878-
};
2879+
parent = &rt5682->dai_clks_hw[RT5682_DAI_WCLK_IDX];
2880+
init.parent_hws = &parent;
28792881
init.num_parents = 1;
28802882
break;
28812883
default:

sound/soc/codecs/rt5682s.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,24 +2693,26 @@ static int rt5682s_register_dai_clks(struct snd_soc_component *component)
26932693

26942694
for (i = 0; i < RT5682S_DAI_NUM_CLKS; ++i) {
26952695
struct clk_init_data init = { };
2696+
struct clk_parent_data parent_data;
2697+
const struct clk_hw *parent;
26962698

26972699
dai_clk_hw = &rt5682s->dai_clks_hw[i];
26982700

26992701
switch (i) {
27002702
case RT5682S_DAI_WCLK_IDX:
27012703
/* Make MCLK the parent of WCLK */
27022704
if (rt5682s->mclk) {
2703-
init.parent_data = &(struct clk_parent_data){
2705+
parent_data = (struct clk_parent_data){
27042706
.fw_name = "mclk",
27052707
};
2708+
init.parent_data = &parent_data;
27062709
init.num_parents = 1;
27072710
}
27082711
break;
27092712
case RT5682S_DAI_BCLK_IDX:
27102713
/* Make WCLK the parent of BCLK */
2711-
init.parent_hws = &(const struct clk_hw *){
2712-
&rt5682s->dai_clks_hw[RT5682S_DAI_WCLK_IDX]
2713-
};
2714+
parent = &rt5682s->dai_clks_hw[RT5682S_DAI_WCLK_IDX];
2715+
init.parent_hws = &parent;
27142716
init.num_parents = 1;
27152717
break;
27162718
default:

0 commit comments

Comments
 (0)