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 ...
Showing the changes to include/uapi (5 of 602 files). Show all
Unified · Split
| @@ -13,8 +13,7 @@ · 12 unmodified lines | |||
| 13 | #include <sound/asound.h> | 13 | #include <sound/asound.h> |
| 14 | #include <sound/compress_params.h> | 14 | #include <sound/compress_params.h> |
| 15 | 15 | ||
| 16 | 16 | #define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 4, 1) | |
| 17 | #define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 3, 0) | ||
| 18 | /** | 17 | /** |
| 19 | * struct snd_compressed_buffer - compressed buffer | 18 | * struct snd_compressed_buffer - compressed buffer |
| 20 | * @fragment_size: size of buffer fragment in bytes | 19 | * @fragment_size: size of buffer fragment in bytes |
| @@ -56,6 +55,25 @@ struct snd_compr_tstamp { · 35 unmodified lines | |||
| 56 | __u32 sampling_rate; | 55 | __u32 sampling_rate; |
| 57 | } __attribute__((packed, aligned(4))); | 56 | } __attribute__((packed, aligned(4))); |
| 58 | 57 | ||
| 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 | |||
| 59 | /** | 77 | /** |
| 60 | * struct snd_compr_avail - avail descriptor | 78 | * struct snd_compr_avail - avail descriptor |
| 61 | * @avail: Number of bytes available in ring buffer for writing/reading | 79 | * @avail: Number of bytes available in ring buffer for writing/reading |
| @@ -66,6 +84,16 @@ struct snd_compr_avail { · 4 unmodified lines | |||
| 66 | struct snd_compr_tstamp tstamp; | 84 | struct snd_compr_tstamp tstamp; |
| 67 | } __attribute__((packed, aligned(4))); | 85 | } __attribute__((packed, aligned(4))); |
| 68 | 86 | ||
| 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 | |||
| 69 | enum snd_compr_direction { | 97 | enum snd_compr_direction { |
| 70 | SND_COMPRESS_PLAYBACK = 0, | 98 | SND_COMPRESS_PLAYBACK = 0, |
| 71 | SND_COMPRESS_CAPTURE, | 99 | SND_COMPRESS_CAPTURE, |
| @@ -189,6 +217,7 @@ struct snd_compr_task_status { · 117 unmodified lines | |||
| 189 | * Note: only codec params can be changed runtime and stream params cant be | 217 | * Note: only codec params can be changed runtime and stream params cant be |
| 190 | * SNDRV_COMPRESS_GET_PARAMS: Query codec params | 218 | * SNDRV_COMPRESS_GET_PARAMS: Query codec params |
| 191 | * SNDRV_COMPRESS_TSTAMP: get the current timestamp value | 219 | * SNDRV_COMPRESS_TSTAMP: get the current timestamp value |
| 220 | * SNDRV_COMPRESS_TSTAMP64: get the current timestamp value in 64 bit format | ||
| 192 | * SNDRV_COMPRESS_AVAIL: get the current buffer avail value. | 221 | * SNDRV_COMPRESS_AVAIL: get the current buffer avail value. |
| 193 | * This also queries the tstamp properties | 222 | * This also queries the tstamp properties |
| 194 | * SNDRV_COMPRESS_PAUSE: Pause the running stream | 223 | * SNDRV_COMPRESS_PAUSE: Pause the running stream |
| @@ -211,6 +240,8 @@ struct snd_compr_task_status { · 16 unmodified lines | |||
| 211 | struct snd_compr_metadata) | 240 | struct snd_compr_metadata) |
| 212 | #define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) | 241 | #define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) |
| 213 | #define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail) | 242 | #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) | ||
| 214 | #define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) | 245 | #define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) |
| 215 | #define SNDRV_COMPRESS_RESUME _IO('C', 0x31) | 246 | #define SNDRV_COMPRESS_RESUME _IO('C', 0x31) |
| 216 | #define SNDRV_COMPRESS_START _IO('C', 0x32) | 247 | #define SNDRV_COMPRESS_START _IO('C', 0x32) |
| @@ -43,7 +43,8 @@ · 42 unmodified lines | |||
| 43 | #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E) | 43 | #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E) |
| 44 | #define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F) | 44 | #define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F) |
| 45 | #define SND_AUDIOCODEC_APE ((__u32) 0x00000010) | 45 | #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 | ||
| 47 | 48 | ||
| 48 | /* | 49 | /* |
| 49 | * Profile and modes are listed with bit masks. This allows for a | 50 | * Profile and modes are listed with bit masks. This allows for a |
| @@ -324,6 +325,43 @@ struct snd_dec_ape { · 274 unmodified lines | |||
| 324 | __u32 seek_table_present; | 325 | __u32 seek_table_present; |
| 325 | } __attribute__((packed, aligned(4))); | 326 | } __attribute__((packed, aligned(4))); |
| 326 | 327 | ||
| 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 | |||
| 327 | union snd_codec_options { | 365 | union snd_codec_options { |
| 328 | struct snd_enc_wma wma; | 366 | struct snd_enc_wma wma; |
| 329 | struct snd_enc_vorbis vorbis; | 367 | struct snd_enc_vorbis vorbis; |
| @@ -334,6 +372,7 @@ union snd_codec_options { · 4 unmodified lines | |||
| 334 | struct snd_dec_wma wma_d; | 372 | struct snd_dec_wma wma_d; |
| 335 | struct snd_dec_alac alac_d; | 373 | struct snd_dec_alac alac_d; |
| 336 | struct snd_dec_ape ape_d; | 374 | struct snd_dec_ape ape_d; |
| 375 | struct snd_dec_opus opus_d; | ||
| 337 | struct { | 376 | struct { |
| 338 | __u32 out_sample_rate; | 377 | __u32 out_sample_rate; |
| 339 | } src_d; | 378 | } src_d; |
| @@ -133,6 +133,21 @@ enum avs_tplg_token { · 132 unmodified lines | |||
| 133 | AVS_TKN_PATH_FE_FMT_ID_U32 = 1902, | 133 | AVS_TKN_PATH_FE_FMT_ID_U32 = 1902, |
| 134 | AVS_TKN_PATH_BE_FMT_ID_U32 = 1903, | 134 | AVS_TKN_PATH_BE_FMT_ID_U32 = 1903, |
| 135 | 135 | ||
| 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 | |||
| 136 | /* struct avs_tplg_pin_format */ | 151 | /* struct avs_tplg_pin_format */ |
| 137 | AVS_TKN_PIN_FMT_INDEX_U32 = 2201, | 152 | AVS_TKN_PIN_FMT_INDEX_U32 = 2201, |
| 138 | AVS_TKN_PIN_FMT_IOBS_U32 = 2202, | 153 | AVS_TKN_PIN_FMT_IOBS_U32 = 2202, |
| @@ -3,6 +3,8 @@ · 2 unmodified lines | |||
| 3 | #ifndef __SND_AR_TOKENS_H__ | 3 | #ifndef __SND_AR_TOKENS_H__ |
| 4 | #define __SND_AR_TOKENS_H__ | 4 | #define __SND_AR_TOKENS_H__ |
| 5 | 5 | ||
| 6 | #include <linux/types.h> | ||
| 7 | |||
| 6 | #define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x1 | 8 | #define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x1 |
| 7 | #define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x2 | 9 | #define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x2 |
| 8 | 10 | ||
| @@ -118,6 +120,12 @@ enum ar_event_types { · 109 unmodified lines | |||
| 118 | * LPAIF_WSA = 2, | 120 | * LPAIF_WSA = 2, |
| 119 | * LPAIF_VA = 3, | 121 | * LPAIF_VA = 3, |
| 120 | * LPAIF_AXI = 4 | 122 | * 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, | ||
| 121 | * | 129 | * |
| 122 | * %AR_TKN_U32_MODULE_FMT_INTERLEAVE: PCM Interleaving | 130 | * %AR_TKN_U32_MODULE_FMT_INTERLEAVE: PCM Interleaving |
| 123 | * PCM_INTERLEAVED = 1, | 131 | * PCM_INTERLEAVED = 1, |
| @@ -184,8 +192,8 @@ enum ar_event_types { · 60 unmodified lines | |||
| 184 | #define AR_TKN_U32_MODULE_INSTANCE_ID 201 | 192 | #define AR_TKN_U32_MODULE_INSTANCE_ID 201 |
| 185 | #define AR_TKN_U32_MODULE_MAX_IP_PORTS 202 | 193 | #define AR_TKN_U32_MODULE_MAX_IP_PORTS 202 |
| 186 | #define AR_TKN_U32_MODULE_MAX_OP_PORTS 203 | 194 | #define AR_TKN_U32_MODULE_MAX_OP_PORTS 203 |
| 187 | #define AR_TKN_U32_MODULE_IN_PORTS 204 | 195 | #define AR_TKN_U32_MODULE_IN_PORTS 204 /* deprecated */ |
| 188 | #define AR_TKN_U32_MODULE_OUT_PORTS 205 | 196 | #define AR_TKN_U32_MODULE_OUT_PORTS 205 /* deprecated */ |
| 189 | #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID 206 | 197 | #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID 206 |
| 190 | #define AR_TKN_U32_MODULE_DST_IN_PORT_ID 207 | 198 | #define AR_TKN_U32_MODULE_DST_IN_PORT_ID 207 |
| 191 | #define AR_TKN_U32_MODULE_SRC_INSTANCE_ID 208 | 199 | #define AR_TKN_U32_MODULE_SRC_INSTANCE_ID 208 |
| @@ -232,4 +240,12 @@ enum ar_event_types { · 40 unmodified lines | |||
| 232 | #define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260 | 240 | #define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260 |
| 233 | #define AR_TKN_U32_MODULE_LOG_MODE 261 | 241 | #define AR_TKN_U32_MODULE_LOG_MODE 261 |
| 234 | 242 | ||
| 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 | |||
| 235 | #endif /* __SND_AR_TOKENS_H__ */ | 251 | #endif /* __SND_AR_TOKENS_H__ */ |
| @@ -106,6 +106,8 @@ · 105 unmodified lines | |||
| 106 | */ | 106 | */ |
| 107 | #define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417 | 107 | #define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417 |
| 108 | 108 | ||
| 109 | #define SOF_TKN_COMP_SCHED_DOMAIN 418 | ||
| 110 | |||
| 109 | /* SSP */ | 111 | /* SSP */ |
| 110 | #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500 | 112 | #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500 |
| 111 | #define SOF_TKN_INTEL_SSP_MCLK_ID 501 | 113 | #define SOF_TKN_INTEL_SSP_MCLK_ID 501 |