Skip to content

Commit f3f0452

Browse files
committed
Merge branch 'sound/upstream-20211207' into merge/sound-upstream-20211207
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2 parents 6958866 + 8036b51 commit f3f0452

103 files changed

Lines changed: 2300 additions & 651 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml

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

22+
memory-region:
23+
maxItems: 1
24+
description: |
25+
Shared memory region for AFE memif. A "shared-dma-pool".
26+
See ../reserved-memory/reserved-memory.txt for details.
27+
2228
mediatek,topckgen:
2329
$ref: "/schemas/types.yaml#/definitions/phandle"
2430
description: The phandle of the mediatek topckgen controller
@@ -125,6 +131,7 @@ required:
125131
- power-domains
126132
- clocks
127133
- clock-names
134+
- memory-region
128135

129136
additionalProperties: false
130137

@@ -139,6 +146,7 @@ examples:
139146
interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
140147
mediatek,topckgen = <&topckgen>;
141148
power-domains = <&spm 7>; //MT8195_POWER_DOMAIN_AUDIO
149+
memory-region = <&snd_dma_mem_reserved>;
142150
clocks = <&clk26m>,
143151
<&topckgen 163>, //CLK_TOP_APLL1
144152
<&topckgen 166>, //CLK_TOP_APLL2

Documentation/devicetree/bindings/sound/mt8195-mt6359-rt1011-rt5682.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ properties:
1616
compatible:
1717
const: mediatek,mt8195_mt6359_rt1011_rt5682
1818

19+
model:
20+
$ref: /schemas/types.yaml#/definitions/string
21+
description: User specified audio sound card name
22+
1923
mediatek,platform:
2024
$ref: "/schemas/types.yaml#/definitions/phandle"
2125
description: The phandle of MT8195 ASoC platform.

Documentation/devicetree/bindings/sound/mt8195-mt6359-rt1019-rt5682.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ properties:
1616
compatible:
1717
const: mediatek,mt8195_mt6359_rt1019_rt5682
1818

19+
model:
20+
$ref: /schemas/types.yaml#/definitions/string
21+
description: User specified audio sound card name
22+
1923
mediatek,platform:
2024
$ref: "/schemas/types.yaml#/definitions/phandle"
2125
description: The phandle of MT8195 ASoC platform.
@@ -28,6 +32,16 @@ properties:
2832
$ref: "/schemas/types.yaml#/definitions/phandle"
2933
description: The phandle of MT8195 HDMI codec node.
3034

35+
mediatek,adsp:
36+
$ref: "/schemas/types.yaml#/definitions/phandle"
37+
description: The phandle of MT8195 ADSP platform.
38+
39+
mediatek,dai-link:
40+
$ref: /schemas/types.yaml#/definitions/string-array
41+
description:
42+
A list of the desired dai-links in the sound card. Each entry is a
43+
name defined in the machine driver.
44+
3145
additionalProperties: false
3246

3347
required:

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

drivers/firmware/cirrus/cs_dsp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -759,11 +759,11 @@ int cs_dsp_coeff_write_ctrl(struct cs_dsp_coeff_ctl *ctl,
759759
{
760760
int ret = 0;
761761

762-
lockdep_assert_held(&ctl->dsp->pwr_lock);
763-
764762
if (!ctl)
765763
return -ENOENT;
766764

765+
lockdep_assert_held(&ctl->dsp->pwr_lock);
766+
767767
if (len + off * sizeof(u32) > ctl->len)
768768
return -EINVAL;
769769

@@ -827,11 +827,11 @@ int cs_dsp_coeff_read_ctrl(struct cs_dsp_coeff_ctl *ctl,
827827
{
828828
int ret = 0;
829829

830-
lockdep_assert_held(&ctl->dsp->pwr_lock);
831-
832830
if (!ctl)
833831
return -ENOENT;
834832

833+
lockdep_assert_held(&ctl->dsp->pwr_lock);
834+
835835
if (len + off * sizeof(u32) > ctl->len)
836836
return -EINVAL;
837837

include/sound/intel-nhlt.h

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010

1111
#include <linux/acpi.h>
1212

13+
enum nhlt_link_type {
14+
NHLT_LINK_HDA = 0,
15+
NHLT_LINK_DSP = 1,
16+
NHLT_LINK_DMIC = 2,
17+
NHLT_LINK_SSP = 3,
18+
NHLT_LINK_INVALID
19+
};
20+
1321
#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_INTEL_NHLT)
1422

1523
struct wav_fmt {
@@ -33,14 +41,6 @@ struct wav_fmt_ext {
3341
u8 sub_fmt[16];
3442
} __packed;
3543

36-
enum nhlt_link_type {
37-
NHLT_LINK_HDA = 0,
38-
NHLT_LINK_DSP = 1,
39-
NHLT_LINK_DMIC = 2,
40-
NHLT_LINK_SSP = 3,
41-
NHLT_LINK_INVALID
42-
};
43-
4444
enum nhlt_device_type {
4545
NHLT_DEVICE_BT = 0,
4646
NHLT_DEVICE_DMIC = 1,
@@ -132,6 +132,12 @@ void intel_nhlt_free(struct nhlt_acpi_table *addr);
132132

133133
int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt);
134134

135+
bool intel_nhlt_has_endpoint_type(struct nhlt_acpi_table *nhlt, u8 link_type);
136+
struct nhlt_specific_cfg *
137+
intel_nhlt_get_endpoint_blob(struct device *dev, struct nhlt_acpi_table *nhlt,
138+
u32 bus_id, u8 link_type, u8 vbps, u8 bps,
139+
u8 num_ch, u32 rate, u8 dir, u8 dev_type);
140+
135141
#else
136142

137143
struct nhlt_acpi_table;
@@ -150,6 +156,21 @@ static inline int intel_nhlt_get_dmic_geo(struct device *dev,
150156
{
151157
return 0;
152158
}
159+
160+
static inline bool intel_nhlt_has_endpoint_type(struct nhlt_acpi_table *nhlt,
161+
u8 link_type)
162+
{
163+
return false;
164+
}
165+
166+
static inline struct nhlt_specific_cfg *
167+
intel_nhlt_get_endpoint_blob(struct device *dev, struct nhlt_acpi_table *nhlt,
168+
u32 bus_id, u8 link_type, u8 vbps, u8 bps,
169+
u8 num_ch, u32 rate, u8 dir, u8 dev_type)
170+
{
171+
return NULL;
172+
}
173+
153174
#endif
154175

155176
#endif

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;

include/sound/soc-component.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ struct snd_soc_component_driver {
148148
struct vm_area_struct *vma);
149149
int (*ack)(struct snd_soc_component *component,
150150
struct snd_pcm_substream *substream);
151+
snd_pcm_sframes_t (*delay)(struct snd_soc_component *component,
152+
struct snd_pcm_substream *substream);
151153

152154
const struct snd_compress_ops *compress_ops;
153155

@@ -505,5 +507,7 @@ int snd_soc_pcm_component_pm_runtime_get(struct snd_soc_pcm_runtime *rtd,
505507
void snd_soc_pcm_component_pm_runtime_put(struct snd_soc_pcm_runtime *rtd,
506508
void *stream, int rollback);
507509
int snd_soc_pcm_component_ack(struct snd_pcm_substream *substream);
510+
void snd_soc_pcm_component_delay(struct snd_pcm_substream *substream,
511+
snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
508512

509513
#endif /* __SOC_COMPONENT_H */

include/sound/soc-dai.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ int snd_soc_dai_startup(struct snd_soc_dai *dai,
208208
struct snd_pcm_substream *substream);
209209
void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
210210
struct snd_pcm_substream *substream, int rollback);
211-
snd_pcm_sframes_t snd_soc_dai_delay(struct snd_soc_dai *dai,
212-
struct snd_pcm_substream *substream);
213211
void snd_soc_dai_suspend(struct snd_soc_dai *dai);
214212
void snd_soc_dai_resume(struct snd_soc_dai *dai);
215213
int snd_soc_dai_compress_new(struct snd_soc_dai *dai,
@@ -238,6 +236,8 @@ int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd,
238236
int rollback);
239237
int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream,
240238
int cmd);
239+
void snd_soc_pcm_dai_delay(struct snd_pcm_substream *substream,
240+
snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
241241

242242
int snd_soc_dai_compr_startup(struct snd_soc_dai *dai,
243243
struct snd_compr_stream *cstream);

sound/core/info_oss.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ int snd_oss_info_register(int dev, int num, char *string)
3232
mutex_lock(&strings);
3333
if (string == NULL) {
3434
x = snd_sndstat_strings[num][dev];
35-
if (x) {
36-
kfree(x);
37-
x = NULL;
38-
}
35+
kfree(x);
36+
x = NULL;
3937
} else {
4038
x = kstrdup(string, GFP_KERNEL);
4139
if (x == NULL) {

0 commit comments

Comments
 (0)