History

Merge tag 'sound-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai: "It's been relatively calm in this cycle from the feature POV, but there were lots of cleanup works in the wide-range of code for converting with the auto-cleanup macros like guard(). The mostly user-visible changes are the support of a couple of new compress-offload API extensions, and the support of new ASoC codec / platform drivers as well as USB-audio quirks. Here we go with some highlights: Core: - Compress-offload API extension for 64bit timestamp support - Compress-offload API extension for OPUS codec support - Workaround for PCM locking issue with PREEMPT_RT and softirq - KCSAN warning fix for ALSA sequencer core ASoC: - Continued cleanup works for ASoC core APIs - Lots of cleanups and conversions of DT bindings - Substantial maintainance work on the Intel AVS drivers - Support for Qualcomm Glymur and PM4125, Realtek RT1321, Shanghai FourSemi FS2104/5S, Texas Instruments PCM1754 and TAS2783A - Remove support for TI WL1273 for old Nokia systems USB-audio: - Support for Tascam US-144mkII, Presonus S1824c support - More flexible quirk option handling - Fix for USB MIDI timer bug triggered by fuzzer Others: - A large series of cleanups with guard() & co macros over (non-ASoC) sound drivers (PCI, ISA, HD-audio, USB-audio, drivers, etc) - TAS5825 HD-audio side-codec support" * tag 'sound-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (454 commits) ALSA: usb-audio: don't hardcode gain for output channel of Presonus Studio ALSA: usb-audio: add the initial mix for Presonus Studio 1824c ALSA: doc: improved docs about quirk_flags in snd-usb-audio ALSA: usb-audio: make param quirk_flags change-able in runtime ALSA: usb-audio: improve module param quirk_flags ALSA: usb-audio: add two-way convert between name and bit for QUIRK_FLAG_* ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free ALSA: usb-audio: add mono main switch to Presonus S1824c ALSA: compress: document 'chan_map' member in snd_dec_opus ASoC: cs35l56: Add support for CS35L56 B2 silicon ASoC: cs35l56: Set fw_regs table after getting REVID ALSA: hda/realtek: Add quirk for HP Spectre 14t-ea100 ASoc: tas2783A: Fix an error code in probe() ASoC: tlv320aic3x: Fix class-D initialization for tlv320aic3007 ASoC: qcom: sc8280xp: use sa8775p/ subdir for QCS9100 / QCS9075 ASoC: stm32: sai: manage context in set_sysclk callback ASoC: renesas: msiof: ignore 1st FSERR ASoC: renesas: msiof: Add note for The possibility of R/L opposite Capture ASoC: renesas: msiof: setup both (Playback/Capture) in the same time ASoC: renesas: msiof: tidyup DMAC stop timing ...

Linus Torvalds committed 1 year ago

Commit 05a54fa2 parents e1b1d03 f65dc3b602 files · +24397 −16206Browse files

Showing the changes to include/uapi (5 of 602 files). Show all

Unified · Split

5 files
  1. include/uapi/sound/compress_offload.h +33 −2
  2. include/uapi/sound/compress_params.h +40 −1
  3. include/uapi/sound/intel/avs/tokens.h +15 −0
  4. include/uapi/sound/snd_ar_tokens.h +18 −2
  5. include/uapi/sound/sof/tokens.h +2 −0
include/uapi/sound/compress_offload.h+33−2
@@ -13,8 +13,7 @@ · 12 unmodified lines
1313 #include <sound/asound.h>
1414 #include <sound/compress_params.h>
1515
16−
17−#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 3, 0)
16+#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 4, 1)
1817 /**
1918 * struct snd_compressed_buffer - compressed buffer
2019 * @fragment_size: size of buffer fragment in bytes
@@ -56,6 +55,25 @@ struct snd_compr_tstamp { · 35 unmodified lines
5655 __u32 sampling_rate;
5756 } __attribute__((packed, aligned(4)));
5857
58+/**
59+ * struct snd_compr_tstamp64 - timestamp descriptor with fields in 64 bit
60+ * @byte_offset: Byte offset in ring buffer to DSP
61+ * @copied_total: Total number of bytes copied from/to ring buffer to/by DSP
62+ * @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by
63+ * large steps and should only be used to monitor encoding/decoding
64+ * progress. It shall not be used for timing estimates.
65+ * @pcm_io_frames: Frames rendered or received by DSP into a mixer or an audio
66+ * output/input. This field should be used for A/V sync or time estimates.
67+ * @sampling_rate: sampling rate of audio
68+ */
69+struct snd_compr_tstamp64 {
70+ __u32 byte_offset;
71+ __u64 copied_total;
72+ __u64 pcm_frames;
73+ __u64 pcm_io_frames;
74+ __u32 sampling_rate;
75+} __attribute__((packed, aligned(4)));
76+
5977 /**
6078 * struct snd_compr_avail - avail descriptor
6179 * @avail: Number of bytes available in ring buffer for writing/reading
@@ -66,6 +84,16 @@ struct snd_compr_avail { · 4 unmodified lines
6684 struct snd_compr_tstamp tstamp;
6785 } __attribute__((packed, aligned(4)));
6886
87+/**
88+ * struct snd_compr_avail64 - avail descriptor with tstamp in 64 bit format
89+ * @avail: Number of bytes available in ring buffer for writing/reading
90+ * @tstamp: timestamp information
91+ */
92+struct snd_compr_avail64 {
93+ __u64 avail;
94+ struct snd_compr_tstamp64 tstamp;
95+} __attribute__((packed, aligned(4)));
96+
6997 enum snd_compr_direction {
7098 SND_COMPRESS_PLAYBACK = 0,
7199 SND_COMPRESS_CAPTURE,
@@ -189,6 +217,7 @@ struct snd_compr_task_status { · 117 unmodified lines
189217 * Note: only codec params can be changed runtime and stream params cant be
190218 * SNDRV_COMPRESS_GET_PARAMS: Query codec params
191219 * SNDRV_COMPRESS_TSTAMP: get the current timestamp value
220+ * SNDRV_COMPRESS_TSTAMP64: get the current timestamp value in 64 bit format
192221 * SNDRV_COMPRESS_AVAIL: get the current buffer avail value.
193222 * This also queries the tstamp properties
194223 * SNDRV_COMPRESS_PAUSE: Pause the running stream
@@ -211,6 +240,8 @@ struct snd_compr_task_status { · 16 unmodified lines
211240 struct snd_compr_metadata)
212241 #define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
213242 #define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
243+#define SNDRV_COMPRESS_TSTAMP64 _IOR('C', 0x22, struct snd_compr_tstamp64)
244+#define SNDRV_COMPRESS_AVAIL64 _IOR('C', 0x23, struct snd_compr_avail64)
214245 #define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
215246 #define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
216247 #define SNDRV_COMPRESS_START _IO('C', 0x32)
include/uapi/sound/compress_params.h+40−1
@@ -43,7 +43,8 @@ · 42 unmodified lines
4343 #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
4444 #define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
4545 #define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
46−#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
46+#define SND_AUDIOCODEC_OPUS_RAW ((__u32) 0x00000011)
47+#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_OPUS_RAW
4748
4849 /*
4950 * Profile and modes are listed with bit masks. This allows for a
@@ -324,6 +325,43 @@ struct snd_dec_ape { · 274 unmodified lines
324325 __u32 seek_table_present;
325326 } __attribute__((packed, aligned(4)));
326327
328+/**
329+ * struct snd_dec_opus - Opus decoder parameters (raw opus packets)
330+ * @version: Usually should be '1' but can be split into major (4 upper bits)
331+ * and minor (4 lower bits) sub-fields.
332+ * @num_channels: Number of output channels.
333+ * @pre_skip: Number of samples to discard at 48 kHz.
334+ * @sample_rate: Sample rate of original input.
335+ * @output_gain: Gain to apply when decoding (in Q7.8 format).
336+ * @mapping_family: Order and meaning of output channels. Only values 0 and 1
337+ * are expected; values 2..255 are not recommended for playback.
338+ *
339+ * @chan_map: Optional channel mapping table. Describes mapping of opus streams
340+ * to decoded channels. Fields:
341+ * @chan_map.stream_count: Number of streams encoded in each Ogg packet.
342+ * @chan_map.coupled_count: Number of streams whose decoders are used
343+ * for two channels.
344+ * @chan_map.channel_map: Which decoded channel to be used for each one.
345+ * Supports only mapping families 0 and 1,
346+ * max number of channels is 8.
347+ *
348+ * These options were extracted from RFC7845 Section 5.
349+ */
350+
351+struct snd_dec_opus {
352+ __u8 version;
353+ __u8 num_channels;
354+ __u16 pre_skip;
355+ __u32 sample_rate;
356+ __u16 output_gain;
357+ __u8 mapping_family;
358+ struct snd_dec_opus_ch_map {
359+ __u8 stream_count;
360+ __u8 coupled_count;
361+ __u8 channel_map[8];
362+ } chan_map;
363+} __attribute__((packed, aligned(4)));
364+
327365 union snd_codec_options {
328366 struct snd_enc_wma wma;
329367 struct snd_enc_vorbis vorbis;
@@ -334,6 +372,7 @@ union snd_codec_options { · 4 unmodified lines
334372 struct snd_dec_wma wma_d;
335373 struct snd_dec_alac alac_d;
336374 struct snd_dec_ape ape_d;
375+ struct snd_dec_opus opus_d;
337376 struct {
338377 __u32 out_sample_rate;
339378 } src_d;
include/uapi/sound/intel/avs/tokens.h+15−0
@@ -133,6 +133,21 @@ enum avs_tplg_token { · 132 unmodified lines
133133 AVS_TKN_PATH_FE_FMT_ID_U32 = 1902,
134134 AVS_TKN_PATH_BE_FMT_ID_U32 = 1903,
135135
136+ /* struct avs_tplg_path_template (conditional) */
137+ AVS_TKN_CONDPATH_TMPL_ID_U32 = 1801,
138+ AVS_TKN_CONDPATH_TMPL_SOURCE_TPLG_NAME_STRING = 2002,
139+ AVS_TKN_CONDPATH_TMPL_SOURCE_PATH_TMPL_ID_U32 = 2003,
140+ AVS_TKN_CONDPATH_TMPL_SINK_TPLG_NAME_STRING = 2004,
141+ AVS_TKN_CONDPATH_TMPL_SINK_PATH_TMPL_ID_U32 = 2005,
142+ AVS_TKN_CONDPATH_TMPL_COND_TYPE_U32 = 2006,
143+ AVS_TKN_CONDPATH_TMPL_OVERRIDABLE_BOOL = 2007,
144+ AVS_TKN_CONDPATH_TMPL_PRIORITY_U8 = 2008,
145+
146+ /* struct avs_tplg_path (conditional) */
147+ AVS_TKN_CONDPATH_ID_U32 = 1901,
148+ AVS_TKN_CONDPATH_SOURCE_PATH_ID_U32 = 2102,
149+ AVS_TKN_CONDPATH_SINK_PATH_ID_U32 = 2103,
150+
136151 /* struct avs_tplg_pin_format */
137152 AVS_TKN_PIN_FMT_INDEX_U32 = 2201,
138153 AVS_TKN_PIN_FMT_IOBS_U32 = 2202,
include/uapi/sound/snd_ar_tokens.h+18−2
@@ -3,6 +3,8 @@ · 2 unmodified lines
33 #ifndef __SND_AR_TOKENS_H__
44 #define __SND_AR_TOKENS_H__
55
6+#include <linux/types.h>
7+
68 #define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x1
79 #define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x2
810
@@ -118,6 +120,12 @@ enum ar_event_types { · 109 unmodified lines
118120 * LPAIF_WSA = 2,
119121 * LPAIF_VA = 3,
120122 * LPAIF_AXI = 4
123+ * Possible values for MI2S
124+ * I2S_INTF_TYPE_PRIMARY = 0,
125+ * I2S_INTF_TYPE_SECONDARY = 1,
126+ * I2S_INTF_TYPE_TERTIARY = 2,
127+ * I2S_INTF_TYPE_QUATERNARY = 3,
128+ * I2S_INTF_TYPE_QUINARY = 4,
121129 *
122130 * %AR_TKN_U32_MODULE_FMT_INTERLEAVE: PCM Interleaving
123131 * PCM_INTERLEAVED = 1,
@@ -184,8 +192,8 @@ enum ar_event_types { · 60 unmodified lines
184192 #define AR_TKN_U32_MODULE_INSTANCE_ID 201
185193 #define AR_TKN_U32_MODULE_MAX_IP_PORTS 202
186194 #define AR_TKN_U32_MODULE_MAX_OP_PORTS 203
187−#define AR_TKN_U32_MODULE_IN_PORTS 204
188−#define AR_TKN_U32_MODULE_OUT_PORTS 205
195+#define AR_TKN_U32_MODULE_IN_PORTS 204 /* deprecated */
196+#define AR_TKN_U32_MODULE_OUT_PORTS 205 /* deprecated */
189197 #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID 206
190198 #define AR_TKN_U32_MODULE_DST_IN_PORT_ID 207
191199 #define AR_TKN_U32_MODULE_SRC_INSTANCE_ID 208
@@ -232,4 +240,12 @@ enum ar_event_types { · 40 unmodified lines
232240 #define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260
233241 #define AR_TKN_U32_MODULE_LOG_MODE 261
234242
243+#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006
244+struct audioreach_module_priv_data {
245+ __le32 size; /* size in bytes of the array, including all elements */
246+ __le32 type; /* SND_SOC_AR_TPLG_MODULE_CFG_TYPE */
247+ __le32 priv[2]; /* Private data for future expansion */
248+ __le32 data[0]; /* config data */
249+};
250+
235251 #endif /* __SND_AR_TOKENS_H__ */
include/uapi/sound/sof/tokens.h+2−0
@@ -106,6 +106,8 @@ · 105 unmodified lines
106106 */
107107 #define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417
108108
109+#define SOF_TKN_COMP_SCHED_DOMAIN 418
110+
109111 /* SSP */
110112 #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
111113 #define SOF_TKN_INTEL_SSP_MCLK_ID 501