Skip to content

Commit 4bd26e8

Browse files
committed
Merge remote-tracking branch 'takashi/for-next' into sound/upstream-20251003
2 parents 6a8c7e5 + 74662f9 commit 4bd26e8

401 files changed

Lines changed: 13309 additions & 13467 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/ti,tas2781.yaml

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2-
# Copyright (C) 2022 - 2023 Texas Instruments Incorporated
2+
# Copyright (C) 2022 - 2025 Texas Instruments Incorporated
33
%YAML 1.2
44
---
55
$id: http://devicetree.org/schemas/sound/ti,tas2781.yaml#
@@ -11,30 +11,77 @@ maintainers:
1111
- Shenghao Ding <shenghao-ding@ti.com>
1212

1313
description: |
14+
The TAS2118/TAS2X20 is mono, digital input Class-D audio
15+
amplifier optimized for efficiently driving high peak power into
16+
small loudspeakers.
17+
The TAS257x is mono, digital input Class-D audio amplifier optimized
18+
for efficiently driving high peak power into small loudspeakers.
19+
Integrated speaker voltage and current sense provides for real time
20+
monitoring of loudspeaker behavior.
1421
The TAS2563/TAS2781 is a mono, digital input Class-D audio
1522
amplifier optimized for efficiently driving high peak power into
1623
small loudspeakers. An integrated on-chip DSP supports Texas
1724
Instruments Smart Amp speaker protection algorithm. The
1825
integrated speaker voltage and current sense provides for real time
1926
monitoring of loudspeaker behavior.
27+
The TAS5825/TAS5827 is a stereo, digital input Class-D audio
28+
amplifier optimized for efficiently driving high peak power into
29+
small loudspeakers. An integrated on-chip DSP supports Texas
30+
Instruments Smart Amp speaker protection algorithm.
2031
2132
Specifications about the audio amplifier can be found at:
33+
https://www.ti.com/lit/gpn/tas2120
34+
https://www.ti.com/lit/gpn/tas2320
2235
https://www.ti.com/lit/gpn/tas2563
36+
https://www.ti.com/lit/gpn/tas2572
2337
https://www.ti.com/lit/gpn/tas2781
38+
https://www.ti.com/lit/gpn/tas5825m
39+
https://www.ti.com/lit/gpn/tas5827
2440
2541
properties:
2642
compatible:
2743
description: |
44+
ti,tas2020: 3.2-W Mono Digital Input Class-D Speaker Amp with 5.5V PVDD
45+
Support.
46+
47+
ti,tas2118: 5-W Mono Digital Input Class-D Speaker Amp with Integrated
48+
8.4-V Class-H Boost.
49+
50+
ti,tas2120: 8.2-W Mono Digital Input Class-D Speaker Amp with
51+
Integrated 14.75V Class-H Boost.
52+
53+
ti,tas2320: 15-W Mono Digital Input Class-D Speaker Amp with 15V Support.
54+
2855
ti,tas2563: 6.1-W Boosted Class-D Audio Amplifier With Integrated
2956
DSP and IV Sense, 16/20/24/32bit stereo I2S or multichannel TDM.
3057
58+
ti,tas2570: 5.8-W Digital Input smart amp with I/V sense and integrated
59+
11-V Class-H Boost
60+
61+
ti,tas2572: 6.6-W Digital Input smart amp with I/V sense and integrated
62+
13-V Class-H Boost
63+
3164
ti,tas2781: 24-V Class-D Amplifier with Real Time Integrated Speaker
3265
Protection and Audio Processing, 16/20/24/32bit stereo I2S or
3366
multichannel TDM.
67+
68+
ti,tas5825: 38-W Stereo, Inductor-Less, Digital Input, Closed-Loop 4.5V
69+
to 26.4V Class-D Audio Amplifier with 192-kHz Extended Audio Processing.
70+
71+
ti,tas5827: 47-W Stereo, Digital Input, High Efficiency Closed-Loop Class-D
72+
Amplifier with Class-H Algorithm
3473
oneOf:
3574
- items:
3675
- enum:
76+
- ti,tas2020
77+
- ti,tas2118
78+
- ti,tas2120
79+
- ti,tas2320
3780
- ti,tas2563
81+
- ti,tas2570
82+
- ti,tas2572
83+
- ti,tas5825
84+
- ti,tas5827
3885
- const: ti,tas2781
3986
- enum:
4087
- ti,tas2781
@@ -61,12 +108,30 @@ required:
61108

62109
allOf:
63110
- $ref: dai-common.yaml#
111+
- if:
112+
properties:
113+
compatible:
114+
contains:
115+
enum:
116+
- ti,tas2020
117+
- ti,tas2118
118+
- ti,tas2120
119+
- ti,tas2320
120+
then:
121+
properties:
122+
reg:
123+
maxItems: 4
124+
items:
125+
minimum: 0x48
126+
maximum: 0x4b
127+
64128
- if:
65129
properties:
66130
compatible:
67131
contains:
68132
enum:
69133
- ti,tas2563
134+
- ti,tas5825
70135
then:
71136
properties:
72137
reg:
@@ -79,6 +144,21 @@ allOf:
79144
minimum: 0x4c
80145
maximum: 0x4f
81146

147+
- if:
148+
properties:
149+
compatible:
150+
contains:
151+
enum:
152+
- ti,tas2570
153+
- ti,tas2572
154+
then:
155+
properties:
156+
reg:
157+
maxItems: 4
158+
items:
159+
minimum: 0x48
160+
maximum: 0x4b
161+
82162
- if:
83163
properties:
84164
compatible:
@@ -97,6 +177,20 @@ allOf:
97177
minimum: 0x38
98178
maximum: 0x3f
99179

180+
- if:
181+
properties:
182+
compatible:
183+
contains:
184+
enum:
185+
- ti,tas5827
186+
then:
187+
properties:
188+
reg:
189+
maxItems: 6
190+
items:
191+
minimum: 0x60
192+
maximum: 0x65
193+
100194
additionalProperties: false
101195

102196
examples:

Documentation/sound/alsa-configuration.rst

Lines changed: 75 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,38 +2297,81 @@ skip_validation
22972297
of the unit descriptor instead of a driver probe error, so that we
22982298
can check its details.
22992299
quirk_flags
2300-
Contains the bit flags for various device specific workarounds.
2301-
Applied to the corresponding card index.
2302-
2303-
* bit 0: Skip reading sample rate for devices
2304-
* bit 1: Create Media Controller API entries
2305-
* bit 2: Allow alignment on audio sub-slot at transfer
2306-
* bit 3: Add length specifier to transfers
2307-
* bit 4: Start playback stream at first in implement feedback mode
2308-
* bit 5: Skip clock selector setup
2309-
* bit 6: Ignore errors from clock source search
2310-
* bit 7: Indicates ITF-USB DSD based DACs
2311-
* bit 8: Add a delay of 20ms at each control message handling
2312-
* bit 9: Add a delay of 1-2ms at each control message handling
2313-
* bit 10: Add a delay of 5-6ms at each control message handling
2314-
* bit 11: Add a delay of 50ms at each interface setup
2315-
* bit 12: Perform sample rate validations at probe
2316-
* bit 13: Disable runtime PM autosuspend
2317-
* bit 14: Ignore errors for mixer access
2318-
* bit 15: Support generic DSD raw U32_BE format
2319-
* bit 16: Set up the interface at first like UAC1
2320-
* bit 17: Apply the generic implicit feedback sync mode
2321-
* bit 18: Don't apply implicit feedback sync mode
2322-
* bit 19: Don't closed interface during setting sample rate
2323-
* bit 20: Force an interface reset whenever stopping & restarting
2324-
a stream
2325-
* bit 21: Do not set PCM rate (frequency) when only one rate is
2326-
available for the given endpoint.
2327-
* bit 22: Set the fixed resolution 16 for Mic Capture Volume
2328-
* bit 23: Set the fixed resolution 384 for Mic Capture Volume
2329-
* bit 24: Set minimum volume control value as mute for devices
2330-
where the lowest playback value represents muted state instead
2331-
of minimum audible volume
2300+
The option provides a refined and flexible control for applying quirk
2301+
flags. It allows to specify the quirk flags for each device, and can
2302+
be modified dynamically via sysfs.
2303+
The old usage accepts an array of integers, each of which applies quirk
2304+
flags on the device in the order of probing.
2305+
E.g., ``quirk_flags=0x01,0x02`` applies get_sample_rate to the first
2306+
device, and share_media_device to the second device.
2307+
The new usage accepts a string in the format of
2308+
``VID1:PID1:FLAGS1;VID2:PID2:FLAGS2;...``, where ``VIDx`` and ``PIDx``
2309+
specify the device, and ``FLAGSx`` specify the flags to be applied.
2310+
``VIDx`` and ``PIDx`` are 4-digit hexadecimal numbers, and can be
2311+
specified as ``*`` to match any value. ``FLAGSx`` can be a set of
2312+
flags given by name, separated by ``|``, or a hexadecimal number
2313+
representing the bit flags. The available flag names are listed below.
2314+
An exclamation mark can be prefixed to a flag name to negate the flag.
2315+
For example, ``1234:abcd:mixer_playback_min_mute|!ignore_ctl_error;*:*:0x01;``
2316+
applies the ``mixer_playback_min_mute`` flag and clears the
2317+
``ignore_ctl_error`` flag for the device 1234:abcd, and applies the
2318+
``skip_sample_rate`` flag for all devices.
2319+
2320+
* bit 0: ``get_sample_rate``
2321+
Skip reading sample rate for devices
2322+
* bit 1: ``share_media_device``
2323+
Create Media Controller API entries
2324+
* bit 2: ``align_transfer``
2325+
Allow alignment on audio sub-slot at transfer
2326+
* bit 3: ``tx_length``
2327+
Add length specifier to transfers
2328+
* bit 4: ``playback_first``
2329+
Start playback stream at first in implement feedback mode
2330+
* bit 5: ``skip_clock_selector``
2331+
Skip clock selector setup
2332+
* bit 6: ``ignore_clock_source``
2333+
Ignore errors from clock source search
2334+
* bit 7: ``itf_usb_dsd_dac``
2335+
Indicates ITF-USB DSD-based DACs
2336+
* bit 8: ``ctl_msg_delay``
2337+
Add a delay of 20ms at each control message handling
2338+
* bit 9: ``ctl_msg_delay_1m``
2339+
Add a delay of 1-2ms at each control message handling
2340+
* bit 10: ``ctl_msg_delay_5m``
2341+
Add a delay of 5-6ms at each control message handling
2342+
* bit 11: ``iface_delay``
2343+
Add a delay of 50ms at each interface setup
2344+
* bit 12: ``validate_rates``
2345+
Perform sample rate validations at probe
2346+
* bit 13: ``disable_autosuspend``
2347+
Disable runtime PM autosuspend
2348+
* bit 14: ``ignore_ctl_error``
2349+
Ignore errors for mixer access
2350+
* bit 15: ``dsd_raw``
2351+
Support generic DSD raw U32_BE format
2352+
* bit 16: ``set_iface_first``
2353+
Set up the interface at first like UAC1
2354+
* bit 17: ``generic_implicit_fb``
2355+
Apply the generic implicit feedback sync mode
2356+
* bit 18: ``skip_implicit_fb``
2357+
Don't apply implicit feedback sync mode
2358+
* bit 19: ``iface_skip_close``
2359+
Don't close interface during setting sample rate
2360+
* bit 20: ``force_iface_reset``
2361+
Force an interface reset whenever stopping & restarting a stream
2362+
* bit 21: ``fixed_rate``
2363+
Do not set PCM rate (frequency) when only one rate is available
2364+
for the given endpoint
2365+
* bit 22: ``mic_res_16``
2366+
Set the fixed resolution 16 for Mic Capture Volume
2367+
* bit 23: ``mic_res_384``
2368+
Set the fixed resolution 384 for Mic Capture Volume
2369+
* bit 24: ``mixer_playback_min_mute``
2370+
Set minimum volume control value as mute for devices where the
2371+
lowest playback value represents muted state instead of minimum
2372+
audible volume
2373+
* bit 25: ``mixer_capture_min_mute``
2374+
Similar to bit 24 but for capture streams
23322375

23332376
This module supports multiple devices, autoprobe and hotplugging.
23342377

include/sound/compress_driver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct snd_compr_ops {
161161
struct snd_compr_metadata *metadata);
162162
int (*trigger)(struct snd_compr_stream *stream, int cmd);
163163
int (*pointer)(struct snd_compr_stream *stream,
164-
struct snd_compr_tstamp *tstamp);
164+
struct snd_compr_tstamp64 *tstamp);
165165
int (*copy)(struct snd_compr_stream *stream, char __user *buf,
166166
size_t count);
167167
int (*mmap)(struct snd_compr_stream *stream,

include/sound/cs35l56.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@
8585
#define CS35L56_DSP1_XMEM_UNPACKED24_0 0x2800000
8686
#define CS35L56_DSP1_FW_VER 0x2800010
8787
#define CS35L56_DSP1_HALO_STATE 0x28021E0
88+
#define CS35L56_B2_DSP1_HALO_STATE 0x2803D20
8889
#define CS35L56_DSP1_PM_CUR_STATE 0x2804308
90+
#define CS35L56_B2_DSP1_PM_CUR_STATE 0x2804678
8991
#define CS35L56_DSP1_XMEM_UNPACKED24_8191 0x2807FFC
9092
#define CS35L56_DSP1_CORE_BASE 0x2B80000
9193
#define CS35L56_DSP1_SCRATCH1 0x2B805C0
@@ -337,9 +339,6 @@ extern const struct regmap_config cs35l56_regmap_sdw;
337339
extern const struct regmap_config cs35l63_regmap_i2c;
338340
extern const struct regmap_config cs35l63_regmap_sdw;
339341

340-
extern const struct cs35l56_fw_reg cs35l56_fw_reg;
341-
extern const struct cs35l56_fw_reg cs35l63_fw_reg;
342-
343342
extern const struct cirrus_amp_cal_controls cs35l56_calibration_controls;
344343

345344
extern const char * const cs35l56_tx_input_texts[CS35L56_NUM_INPUT_SRC];

include/sound/emu10k1.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,8 +1842,7 @@ unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg,
18421842
void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
18431843
int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
18441844
int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
1845-
static inline void snd_emu1010_fpga_lock(struct snd_emu10k1 *emu) { mutex_lock(&emu->emu1010.lock); };
1846-
static inline void snd_emu1010_fpga_unlock(struct snd_emu10k1 *emu) { mutex_unlock(&emu->emu1010.lock); };
1845+
DEFINE_GUARD(snd_emu1010_fpga_lock, struct snd_emu10k1 *, mutex_lock(&(_T)->emu1010.lock), mutex_unlock(&(_T)->emu1010.lock))
18471846
void snd_emu1010_fpga_write_lock(struct snd_emu10k1 *emu, u32 reg, u32 value);
18481847
void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
18491848
void snd_emu1010_fpga_read(struct snd_emu10k1 *emu, u32 reg, u32 *value);

include/sound/gus.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,6 @@ struct _SND_IW_LFO_PROGRAM {
515515

516516
/* gus_mem.c */
517517

518-
void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup);
519518
int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block);
520519
struct snd_gf1_mem_block *snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner,
521520
char *name, int size, int w_16,

include/sound/hda_codec.h

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ int snd_hda_override_conn_list(struct hda_codec *codec, hda_nid_t nid, int nums,
360360
int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux,
361361
hda_nid_t nid, int recursive);
362362
unsigned int snd_hda_get_num_devices(struct hda_codec *codec, hda_nid_t nid);
363-
int snd_hda_get_devices(struct hda_codec *codec, hda_nid_t nid,
364-
u8 *dev_list, int max_devices);
363+
unsigned int snd_hda_get_devices(struct hda_codec *codec, hda_nid_t nid,
364+
u8 *dev_list, unsigned int max_devices);
365365
int snd_hda_get_dev_select(struct hda_codec *codec, hda_nid_t nid);
366366
int snd_hda_set_dev_select(struct hda_codec *codec, hda_nid_t nid, int dev_id);
367367

@@ -503,6 +503,36 @@ static inline bool hda_codec_need_resume(struct hda_codec *codec)
503503
return !codec->relaxed_resume && codec->jacktbl.used;
504504
}
505505

506+
/*
507+
* PM with auto-cleanup: call like CLASS(snd_hda_power, pm)(codec)
508+
* If the error handling is needed, refer pm.err.
509+
*/
510+
struct __hda_power_obj {
511+
struct hda_codec *codec;
512+
int err;
513+
};
514+
515+
static inline struct __hda_power_obj __snd_hda_power_up(struct hda_codec *codec)
516+
{
517+
struct __hda_power_obj T = { .codec = codec };
518+
T.err = snd_hda_power_up(codec);
519+
return T;
520+
}
521+
522+
static inline struct __hda_power_obj __snd_hda_power_up_pm(struct hda_codec *codec)
523+
{
524+
struct __hda_power_obj T = { .codec = codec };
525+
T.err = snd_hda_power_up_pm(codec);
526+
return T;
527+
}
528+
529+
DEFINE_CLASS(snd_hda_power, struct __hda_power_obj,
530+
snd_hda_power_down((_T).codec), __snd_hda_power_up(codec),
531+
struct hda_codec *codec)
532+
DEFINE_CLASS(snd_hda_power_pm, struct __hda_power_obj,
533+
snd_hda_power_down_pm((_T).codec), __snd_hda_power_up_pm(codec),
534+
struct hda_codec *codec)
535+
506536
#ifdef CONFIG_SND_HDA_PATCH_LOADER
507537
/*
508538
* patch firmware

include/sound/hdaudio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ int snd_hdac_stream_set_lpib(struct hdac_stream *azx_dev, u32 value);
651651
#define snd_hdac_dsp_lock(dev) mutex_lock(&(dev)->dsp_mutex)
652652
#define snd_hdac_dsp_unlock(dev) mutex_unlock(&(dev)->dsp_mutex)
653653
#define snd_hdac_stream_is_locked(dev) ((dev)->locked)
654+
DEFINE_GUARD(snd_hdac_dsp_lock, struct hdac_stream *, snd_hdac_dsp_lock(_T), snd_hdac_dsp_unlock(_T))
654655
/* DSP loader helpers */
655656
int snd_hdac_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format,
656657
unsigned int byte_size, struct snd_dma_buffer *bufp);

include/sound/soc-component.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct snd_compress_ops {
4747
struct snd_compr_stream *stream, int cmd);
4848
int (*pointer)(struct snd_soc_component *component,
4949
struct snd_compr_stream *stream,
50-
struct snd_compr_tstamp *tstamp);
50+
struct snd_compr_tstamp64 *tstamp);
5151
int (*copy)(struct snd_soc_component *component,
5252
struct snd_compr_stream *stream, char __user *buf,
5353
size_t count);
@@ -427,7 +427,7 @@ int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream,
427427
struct snd_compr_codec_caps *codec);
428428
int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes);
429429
int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream,
430-
struct snd_compr_tstamp *tstamp);
430+
struct snd_compr_tstamp64 *tstamp);
431431
int snd_soc_component_compr_copy(struct snd_compr_stream *cstream,
432432
char __user *buf, size_t count);
433433
int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream,

0 commit comments

Comments
 (0)