Skip to content

Commit 4f67e36

Browse files
authored
Merge pull request #3691 from plbossart/merge/sound-upstream-20220609
Merge/sound upstream 20220609
2 parents aa8824b + eb19347 commit 4f67e36

File tree

213 files changed

+16259
-678
lines changed

Some content is hidden

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

213 files changed

+16259
-678
lines changed

Documentation/devicetree/bindings/sound/atmel-sam9x5-wm8731-audio.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Board connectors:
1616
* Line In Jack
1717

1818
wm8731 pins:
19-
cf Documentation/devicetree/bindings/sound/wm8731.txt
19+
cf Documentation/devicetree/bindings/sound/wlf,wm8731.yaml
2020

2121
Example:
2222
sound {

Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ patternProperties:
110110
type: object
111111
$ref: nvidia,tegra186-asrc.yaml#
112112

113+
'^processing-engine@[0-9a-f]+$':
114+
type: object
115+
$ref: nvidia,tegra210-ope.yaml#
116+
113117
required:
114118
- compatible
115119
- reg
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-mbdrc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Tegra210 MBDRC
8+
9+
description:
10+
The Multi Band Dynamic Range Compressor (MBDRC) is part of Output
11+
Processing Engine (OPE) which interfaces with Audio Hub (AHUB) via
12+
Audio Client Interface (ACIF). MBDRC can be used as a traditional
13+
single full band or a dual band or a multi band dynamic processor.
14+
15+
maintainers:
16+
- Jon Hunter <jonathanh@nvidia.com>
17+
- Mohan Kumar <mkumard@nvidia.com>
18+
- Sameer Pujar <spujar@nvidia.com>
19+
20+
properties:
21+
compatible:
22+
oneOf:
23+
- const: nvidia,tegra210-mbdrc
24+
- items:
25+
- enum:
26+
- nvidia,tegra234-mbdrc
27+
- nvidia,tegra194-mbdrc
28+
- nvidia,tegra186-mbdrc
29+
- const: nvidia,tegra210-mbdrc
30+
31+
reg:
32+
maxItems: 1
33+
34+
required:
35+
- compatible
36+
- reg
37+
38+
additionalProperties: false
39+
40+
examples:
41+
- |
42+
dynamic-range-compressor@702d8200 {
43+
compatible = "nvidia,tegra210-mbdrc";
44+
reg = <0x702d8200 0x200>;
45+
};
46+
47+
...
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-ope.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Tegra210 OPE
8+
9+
description:
10+
The Output Processing Engine (OPE) is one of the AHUB client. It has
11+
PEQ (Parametric Equalizer) and MBDRC (Multi Band Dynamic Range Compressor)
12+
sub blocks for data processing.
13+
14+
maintainers:
15+
- Jon Hunter <jonathanh@nvidia.com>
16+
- Mohan Kumar <mkumard@nvidia.com>
17+
- Sameer Pujar <spujar@nvidia.com>
18+
19+
allOf:
20+
- $ref: name-prefix.yaml#
21+
22+
properties:
23+
compatible:
24+
oneOf:
25+
- const: nvidia,tegra210-ope
26+
- items:
27+
- enum:
28+
- nvidia,tegra234-ope
29+
- nvidia,tegra194-ope
30+
- nvidia,tegra186-ope
31+
- const: nvidia,tegra210-ope
32+
33+
reg:
34+
maxItems: 1
35+
36+
"#address-cells":
37+
const: 1
38+
39+
"#size-cells":
40+
const: 1
41+
42+
ranges: true
43+
44+
sound-name-prefix:
45+
pattern: "^OPE[1-9]$"
46+
47+
ports:
48+
$ref: /schemas/graph.yaml#/properties/ports
49+
properties:
50+
port@0:
51+
$ref: audio-graph-port.yaml#
52+
unevaluatedProperties: false
53+
description:
54+
OPE ACIF (Audio Client Interface) input port. This is connected
55+
to corresponding ACIF output port on AHUB (Audio Hub).
56+
57+
port@1:
58+
$ref: audio-graph-port.yaml#
59+
unevaluatedProperties: false
60+
description:
61+
OPE ACIF output port. This is connected to corresponding ACIF
62+
input port on AHUB.
63+
64+
patternProperties:
65+
'^equalizer@[0-9a-f]+$':
66+
type: object
67+
$ref: nvidia,tegra210-peq.yaml#
68+
69+
'^dynamic-range-compressor@[0-9a-f]+$':
70+
type: object
71+
$ref: nvidia,tegra210-mbdrc.yaml#
72+
73+
required:
74+
- compatible
75+
- reg
76+
77+
additionalProperties: false
78+
79+
examples:
80+
- |
81+
processing-engine@702d8000 {
82+
compatible = "nvidia,tegra210-ope";
83+
reg = <0x702d8000 0x100>;
84+
sound-name-prefix = "OPE1";
85+
};
86+
87+
...
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-peq.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Tegra210 PEQ
8+
9+
description:
10+
The Parametric Equalizer (PEQ) is a cascade of biquad filters with
11+
each filter tuned based on certain parameters. It can be used to
12+
equalize the irregularities in the speaker frequency response.
13+
PEQ sits inside Output Processing Engine (OPE) which interfaces
14+
with Audio Hub (AHUB) via Audio Client Interface (ACIF).
15+
16+
maintainers:
17+
- Jon Hunter <jonathanh@nvidia.com>
18+
- Mohan Kumar <mkumard@nvidia.com>
19+
- Sameer Pujar <spujar@nvidia.com>
20+
21+
properties:
22+
compatible:
23+
oneOf:
24+
- const: nvidia,tegra210-peq
25+
- items:
26+
- enum:
27+
- nvidia,tegra234-peq
28+
- nvidia,tegra194-peq
29+
- nvidia,tegra186-peq
30+
- const: nvidia,tegra210-peq
31+
32+
reg:
33+
maxItems: 1
34+
35+
required:
36+
- compatible
37+
- reg
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
equalizer@702d8100 {
44+
compatible = "nvidia,tegra210-peq";
45+
reg = <0x702d8100 0x100>;
46+
};
47+
48+
...

Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ allOf:
1515
properties:
1616
compatible:
1717
enum:
18+
- nxp,tfa9890
1819
- nxp,tfa9895
1920
- nxp,tfa9897
2021

drivers/base/regmap/regcache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ EXPORT_SYMBOL_GPL(regcache_mark_dirty);
531531
* @enable: flag if changes should not be written to the cache
532532
*
533533
* When a register map is marked with the cache bypass option, writes
534-
* to the register map API will only update the hardware and not the
534+
* to the register map API will only update the hardware and not
535535
* the cache directly. This is useful when syncing the cache back to
536536
* the hardware.
537537
*/

drivers/soundwire/qcom.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/of_device.h>
1414
#include <linux/pm_runtime.h>
1515
#include <linux/regmap.h>
16+
#include <linux/reset.h>
1617
#include <linux/slab.h>
1718
#include <linux/pm_wakeirq.h>
1819
#include <linux/slimbus.h>
@@ -142,6 +143,7 @@ struct qcom_swrm_ctrl {
142143
struct device *dev;
143144
struct regmap *regmap;
144145
void __iomem *mmio;
146+
struct reset_control *audio_cgcr;
145147
#ifdef CONFIG_DEBUG_FS
146148
struct dentry *debugfs;
147149
#endif
@@ -656,6 +658,8 @@ static int qcom_swrm_init(struct qcom_swrm_ctrl *ctrl)
656658
val = FIELD_PREP(SWRM_MCP_FRAME_CTRL_BANK_ROW_CTRL_BMSK, ctrl->rows_index);
657659
val |= FIELD_PREP(SWRM_MCP_FRAME_CTRL_BANK_COL_CTRL_BMSK, ctrl->cols_index);
658660

661+
reset_control_reset(ctrl->audio_cgcr);
662+
659663
ctrl->reg_write(ctrl, SWRM_MCP_FRAME_CTRL_BANK_ADDR(0), val);
660664

661665
/* Enable Auto enumeration */
@@ -1332,6 +1336,10 @@ static int qcom_swrm_probe(struct platform_device *pdev)
13321336
ctrl->bus.compute_params = &qcom_swrm_compute_params;
13331337
ctrl->bus.clk_stop_timeout = 300;
13341338

1339+
ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr");
1340+
if (IS_ERR(ctrl->audio_cgcr))
1341+
dev_err(dev, "Failed to get audio_cgcr reset required for soundwire-v1.6.0\n");
1342+
13351343
ret = qcom_swrm_get_port_config(ctrl);
13361344
if (ret)
13371345
goto err_clk;
@@ -1485,6 +1493,8 @@ static int __maybe_unused swrm_runtime_resume(struct device *dev)
14851493
qcom_swrm_get_device_status(ctrl);
14861494
sdw_handle_slave_status(&ctrl->bus, ctrl->status);
14871495
} else {
1496+
reset_control_reset(ctrl->audio_cgcr);
1497+
14881498
ctrl->reg_write(ctrl, SWRM_MCP_BUS_CTRL, SWRM_MCP_BUS_CLK_START);
14891499
ctrl->reg_write(ctrl, SWRM_INTERRUPT_CLEAR,
14901500
SWRM_INTERRUPT_STATUS_MASTER_CLASH_DET);

include/sound/cs35l41.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,9 @@ void cs35l41_configure_cs_dsp(struct device *dev, struct regmap *reg, struct cs_
881881
int cs35l41_set_cspl_mbox_cmd(struct device *dev, struct regmap *regmap,
882882
enum cs35l41_cspl_mbox_cmd cmd);
883883
int cs35l41_write_fs_errata(struct device *dev, struct regmap *regmap);
884+
int cs35l41_enter_hibernate(struct device *dev, struct regmap *regmap,
885+
enum cs35l41_boost_type b_type);
886+
int cs35l41_exit_hibernate(struct device *dev, struct regmap *regmap);
884887
int cs35l41_init_boost(struct device *dev, struct regmap *regmap,
885888
struct cs35l41_hw_cfg *hw_cfg);
886889
bool cs35l41_safe_reset(struct regmap *regmap, enum cs35l41_boost_type b_type);

include/sound/pcm.h

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,20 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
13921392

13931393
const char *snd_pcm_format_name(snd_pcm_format_t format);
13941394

1395+
/**
1396+
* snd_pcm_direction_name - Get a string naming the direction of a stream
1397+
* @direction: Stream's direction, one of SNDRV_PCM_STREAM_XXX
1398+
*
1399+
* Returns a string naming the direction of the stream.
1400+
*/
1401+
static inline const char *snd_pcm_direction_name(int direction)
1402+
{
1403+
if (direction == SNDRV_PCM_STREAM_PLAYBACK)
1404+
return "Playback";
1405+
else
1406+
return "Capture";
1407+
}
1408+
13951409
/**
13961410
* snd_pcm_stream_str - Get a string naming the direction of a stream
13971411
* @substream: the pcm substream instance
@@ -1400,10 +1414,7 @@ const char *snd_pcm_format_name(snd_pcm_format_t format);
14001414
*/
14011415
static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
14021416
{
1403-
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
1404-
return "Playback";
1405-
else
1406-
return "Capture";
1417+
return snd_pcm_direction_name(substream->stream);
14071418
}
14081419

14091420
/*

0 commit comments

Comments
 (0)