Merge tag 'sound-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"This was a relatively calm cycle, and most of changes are rather small
device-specific fixes. Here are highlights:
Core:
- Further enhancements of ALSA rawmidi and sequencer APIs for MIDI
2.0
- compress-offload API extensions for ASRC support
ASoC:
- Allow clocking on each DAI in an audio graph card to be configured
separately
- Improved power management for Renesas RZ-SSI
- KUnit testing for the Cirrus DSP framework
- Memory to meory operation support for Freescale/NXP platforms
- Support for pause operations in SOF
- Support for Allwinner suinv F1C100s, Awinc AW88083, Realtek
ALC5682I-VE
HD- and USB-audio:
- Add support for Focusrite Scarlett 4th Gen 16i16, 18i16, and 18i20
interfaces via new FCP driver
- TAS2781 SPI HD-audio sub-codec support
- Various device-specific quirks as usual"
* tag 'sound-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (235 commits)
ALSA: hda: tas2781-spi: Fix bogus error handling in tas2781_hda_spi_probe()
ALSA: hda: tas2781-spi: Fix error code in tas2781_read_acpi()
ALSA: hda: tas2781-spi: Delete some dead code
ALSA: usb: fcp: Fix return code from poll ops
ALSA: usb: fcp: Fix incorrect resp->opcode retrieval
ALSA: usb: fcp: Fix meter_levels type to __le32
ALSA: hda/realtek: Enable Mute LED on HP Laptop 14s-fq1xxx
ALSA: hda: tas2781-spi: Fix -Wsometimes-uninitialized in tasdevice_spi_switch_book()
ALSA: ctxfi: Simplify dao_clear_{left,right}_input() functions
ALSA: hda: tas2781-spi: select CRC32 instead of CRC32_SARWATE
ALSA: usb: fcp: Fix hwdep read ops types
ALSA: scarlett2: Add device_setup option to use FCP driver
ALSA: FCP: Add Focusrite Control Protocol driver
ALSA: hda/tas2781: Add tas2781 hda SPI driver
ALSA: hda/realtek - Fixed headphone distorted sound on Acer Aspire A115-31 laptop
ASoC: xilinx: xlnx_spdif: Simpify using devm_clk_get_enabled()
ALSA: hda: Support for Ideapad hotkey mute LEDs
ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83JX, 83MC and 83NM
ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83LC
ASoC: dapm: add support for preparing streams
...
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include <sound/asound.h>
|
||||
|
||||
/** version of the sequencer */
|
||||
#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 4)
|
||||
#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 5)
|
||||
|
||||
/**
|
||||
* definition of sequencer event types
|
||||
@@ -92,6 +92,9 @@
|
||||
#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66 /* ports connected */
|
||||
#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67 /* ports disconnected */
|
||||
|
||||
#define SNDRV_SEQ_EVENT_UMP_EP_CHANGE 68 /* UMP EP info has changed */
|
||||
#define SNDRV_SEQ_EVENT_UMP_BLOCK_CHANGE 69 /* UMP block info has changed */
|
||||
|
||||
/* 70-89: synthesizer events - obsoleted */
|
||||
|
||||
/** user-defined events with fixed length
|
||||
@@ -253,6 +256,12 @@ struct snd_seq_ev_quote {
|
||||
struct snd_seq_event *event; /* quoted event */
|
||||
} __packed;
|
||||
|
||||
/* UMP info change notify */
|
||||
struct snd_seq_ev_ump_notify {
|
||||
unsigned char client; /**< Client number */
|
||||
unsigned char block; /**< Block number (optional) */
|
||||
};
|
||||
|
||||
union snd_seq_event_data { /* event data... */
|
||||
struct snd_seq_ev_note note;
|
||||
struct snd_seq_ev_ctrl control;
|
||||
@@ -265,6 +274,7 @@ union snd_seq_event_data { /* event data... */
|
||||
struct snd_seq_connect connect;
|
||||
struct snd_seq_result result;
|
||||
struct snd_seq_ev_quote quote;
|
||||
struct snd_seq_ev_ump_notify ump_notify;
|
||||
};
|
||||
|
||||
/* sequencer event */
|
||||
|
||||
@@ -716,7 +716,7 @@ enum {
|
||||
* Raw MIDI section - /dev/snd/midi??
|
||||
*/
|
||||
|
||||
#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 4)
|
||||
#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 5)
|
||||
|
||||
enum {
|
||||
SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
|
||||
@@ -728,6 +728,9 @@ enum {
|
||||
#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002
|
||||
#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004
|
||||
#define SNDRV_RAWMIDI_INFO_UMP 0x00000008
|
||||
#define SNDRV_RAWMIDI_INFO_STREAM_INACTIVE 0x00000010
|
||||
|
||||
#define SNDRV_RAWMIDI_DEVICE_UNKNOWN 0
|
||||
|
||||
struct snd_rawmidi_info {
|
||||
unsigned int device; /* RO/WR (control): device number */
|
||||
@@ -740,7 +743,8 @@ struct snd_rawmidi_info {
|
||||
unsigned char subname[32]; /* name of active or selected subdevice */
|
||||
unsigned int subdevices_count;
|
||||
unsigned int subdevices_avail;
|
||||
unsigned char reserved[64]; /* reserved for future use */
|
||||
int tied_device; /* R: tied rawmidi device (UMP/legacy) */
|
||||
unsigned char reserved[60]; /* reserved for future use */
|
||||
};
|
||||
|
||||
#define SNDRV_RAWMIDI_MODE_FRAMING_MASK (7<<0)
|
||||
|
||||
@@ -334,6 +334,14 @@ union snd_codec_options {
|
||||
struct snd_dec_wma wma_d;
|
||||
struct snd_dec_alac alac_d;
|
||||
struct snd_dec_ape ape_d;
|
||||
struct {
|
||||
__u32 out_sample_rate;
|
||||
} src_d;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
struct snd_codec_desc_src {
|
||||
__u32 out_sample_rate_min;
|
||||
__u32 out_sample_rate_max;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
/** struct snd_codec_desc - description of codec capabilities
|
||||
@@ -347,6 +355,9 @@ union snd_codec_options {
|
||||
* @modes: Supported modes. See SND_AUDIOMODE defines
|
||||
* @formats: Supported formats. See SND_AUDIOSTREAMFORMAT defines
|
||||
* @min_buffer: Minimum buffer size handled by codec implementation
|
||||
* @pcm_formats: Output (for decoders) or input (for encoders)
|
||||
* PCM formats (required to accel mode, 0 for other modes)
|
||||
* @u_space: union space (for codec dependent data)
|
||||
* @reserved: reserved for future use
|
||||
*
|
||||
* This structure provides a scalar value for profiles, modes and stream
|
||||
@@ -370,7 +381,12 @@ struct snd_codec_desc {
|
||||
__u32 modes;
|
||||
__u32 formats;
|
||||
__u32 min_buffer;
|
||||
__u32 reserved[15];
|
||||
__u32 pcm_formats;
|
||||
union {
|
||||
__u32 u_space[6];
|
||||
struct snd_codec_desc_src src;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
__u32 reserved[8];
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
/** struct snd_codec
|
||||
@@ -395,6 +411,8 @@ struct snd_codec_desc {
|
||||
* @align: Block alignment in bytes of an audio sample.
|
||||
* Only required for PCM or IEC formats.
|
||||
* @options: encoder-specific settings
|
||||
* @pcm_format: Output (for decoders) or input (for encoders)
|
||||
* PCM formats (required to accel mode, 0 for other modes)
|
||||
* @reserved: reserved for future use
|
||||
*/
|
||||
|
||||
@@ -411,7 +429,8 @@ struct snd_codec {
|
||||
__u32 format;
|
||||
__u32 align;
|
||||
union snd_codec_options options;
|
||||
__u32 reserved[3];
|
||||
__u32 pcm_format;
|
||||
__u32 reserved[2];
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Focusrite Control Protocol Driver for ALSA
|
||||
*
|
||||
* Copyright (c) 2024-2025 by Geoffrey D. Bennett <g at b4.vu>
|
||||
*/
|
||||
/*
|
||||
* DOC: FCP (Focusrite Control Protocol) User-Space API
|
||||
*
|
||||
* This header defines the interface between the FCP kernel driver and
|
||||
* user-space programs to enable the use of the proprietary features
|
||||
* available in Focusrite USB audio interfaces. This includes Scarlett
|
||||
* 2nd Gen, 3rd Gen, 4th Gen, Clarett USB, Clarett+, and Vocaster
|
||||
* series devices.
|
||||
*
|
||||
* The interface is provided via ALSA's hwdep interface. Opening the
|
||||
* hwdep device requires CAP_SYS_RAWIO privileges as this interface
|
||||
* provides near-direct access.
|
||||
*
|
||||
* For details on the FCP protocol, refer to the kernel scarlett2
|
||||
* driver in sound/usb/mixer_scarlett2.c and the fcp-support project
|
||||
* at https://github.com/geoffreybennett/fcp-support
|
||||
*
|
||||
* For examples of using these IOCTLs, see the fcp-server source in
|
||||
* the fcp-support project.
|
||||
*
|
||||
* IOCTL Interface
|
||||
* --------------
|
||||
* FCP_IOCTL_PVERSION:
|
||||
* Returns the protocol version supported by the driver.
|
||||
*
|
||||
* FCP_IOCTL_INIT:
|
||||
* Initialises the protocol and synchronises sequence numbers
|
||||
* between the driver and device. Must be called at least once
|
||||
* before sending commands. Can be safely called again at any time.
|
||||
*
|
||||
* FCP_IOCTL_CMD:
|
||||
* Sends an FCP command to the device and returns the response.
|
||||
* Requires prior initialisation via FCP_IOCTL_INIT.
|
||||
*
|
||||
* FCP_IOCTL_SET_METER_MAP:
|
||||
* Configures the Level Meter control's mapping between device
|
||||
* meters and control channels. Requires FCP_IOCTL_INIT to have been
|
||||
* called first. The map size and number of slots cannot be changed
|
||||
* after initial configuration, although the map itself can be
|
||||
* updated. Once configured, the Level Meter remains functional even
|
||||
* after the hwdep device is closed.
|
||||
*
|
||||
* FCP_IOCTL_SET_METER_LABELS:
|
||||
* Set the labels for the Level Meter control. Requires
|
||||
* FCP_IOCTL_SET_METER_MAP to have been called first. labels[]
|
||||
* should contain a sequence of null-terminated labels corresponding
|
||||
* to the control's channels.
|
||||
*/
|
||||
#ifndef __UAPI_SOUND_FCP_H
|
||||
#define __UAPI_SOUND_FCP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define FCP_HWDEP_MAJOR 2
|
||||
#define FCP_HWDEP_MINOR 0
|
||||
#define FCP_HWDEP_SUBMINOR 0
|
||||
|
||||
#define FCP_HWDEP_VERSION \
|
||||
((FCP_HWDEP_MAJOR << 16) | \
|
||||
(FCP_HWDEP_MINOR << 8) | \
|
||||
FCP_HWDEP_SUBMINOR)
|
||||
|
||||
#define FCP_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF)
|
||||
#define FCP_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF)
|
||||
#define FCP_HWDEP_VERSION_SUBMINOR(v) ((v) & 0xFF)
|
||||
|
||||
/* Get protocol version */
|
||||
#define FCP_IOCTL_PVERSION _IOR('S', 0x60, int)
|
||||
|
||||
/* Start the protocol */
|
||||
|
||||
/* Step 0 and step 2 responses are variable length and placed in
|
||||
* resp[] one after the other.
|
||||
*/
|
||||
struct fcp_init {
|
||||
__u16 step0_resp_size;
|
||||
__u16 step2_resp_size;
|
||||
__u32 init1_opcode;
|
||||
__u32 init2_opcode;
|
||||
__u8 resp[];
|
||||
} __attribute__((packed));
|
||||
|
||||
#define FCP_IOCTL_INIT _IOWR('S', 0x64, struct fcp_init)
|
||||
|
||||
/* Perform a command */
|
||||
|
||||
/* The request data is placed in data[] and the response data will
|
||||
* overwrite it.
|
||||
*/
|
||||
struct fcp_cmd {
|
||||
__u32 opcode;
|
||||
__u16 req_size;
|
||||
__u16 resp_size;
|
||||
__u8 data[];
|
||||
} __attribute__((packed));
|
||||
#define FCP_IOCTL_CMD _IOWR('S', 0x65, struct fcp_cmd)
|
||||
|
||||
/* Set the meter map */
|
||||
struct fcp_meter_map {
|
||||
__u16 map_size;
|
||||
__u16 meter_slots;
|
||||
__s16 map[];
|
||||
} __attribute__((packed));
|
||||
#define FCP_IOCTL_SET_METER_MAP _IOW('S', 0x66, struct fcp_meter_map)
|
||||
|
||||
/* Set the meter labels */
|
||||
struct fcp_meter_labels {
|
||||
__u16 labels_size;
|
||||
char labels[];
|
||||
} __attribute__((packed));
|
||||
#define FCP_IOCTL_SET_METER_LABELS _IOW('S', 0x67, struct fcp_meter_labels)
|
||||
|
||||
#endif /* __UAPI_SOUND_FCP_H */
|
||||
@@ -153,6 +153,8 @@
|
||||
/* Stream */
|
||||
#define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3 1200
|
||||
#define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 1201
|
||||
#define SOF_TKN_STREAM_PLAYBACK_PAUSE_SUPPORTED 1202
|
||||
#define SOF_TKN_STREAM_CAPTURE_PAUSE_SUPPORTED 1203
|
||||
|
||||
/* Led control for mute switches */
|
||||
#define SOF_TKN_MUTE_LED_USE 1300
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102 /* channels freely swappable */
|
||||
#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103 /* pair-wise swappable */
|
||||
|
||||
#define SNDRV_CTL_TLVT_FCP_CHANNEL_LABELS 0x110 /* channel labels */
|
||||
|
||||
/*
|
||||
* TLV structure is right behind the struct snd_ctl_tlv:
|
||||
* unsigned int type - see SNDRV_CTL_TLVT_*
|
||||
|
||||
Reference in New Issue
Block a user