diff options
author | Geoffrey D. Bennett <g@b4.vu> | 2024-03-13 05:05:30 +1030 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-04-18 08:31:13 +0200 |
commit | b1b3b258242c4e7c70b8da09904a8c5e2aadaa3a (patch) | |
tree | 9870de7581103506c81d2c5e4e0bfabc18a5c0bf /sound/usb | |
parent | 7d20f7b4f337ac075cf79f5047e68ea46189743f (diff) |
ALSA: scarlett2: Add support for config items with size = 32
Update scarlett2_usb_get_config() to support 32-bit values which are
needed by the upcoming Vocaster support.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <ee35dce0172b2aa3fec8163ab8f35bdc35a141bd.1710264833.git.g@b4.vu>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer_scarlett2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 8d08f71bd4d6..f2bbf90680f8 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -436,7 +436,7 @@ enum { }; /* Location, size, and activation command number for the configuration - * parameters. Size is in bits and may be 1, 8, or 16. + * parameters. Size is in bits and may be 1, 8, 16, or 32. * * Vocaster and 4th Gen devices have a parameter buffer to set certain * configuration parameters. When pbuf is set, rather than writing to @@ -2102,6 +2102,11 @@ static int scarlett2_usb_get_config( for (i = 0; i < count; i++, buf_16++) *buf_16 = le16_to_cpu(*(__le16 *)buf_16); + } else if (size == 4) { + u32 *buf_32 = buf; + + for (i = 0; i < count; i++, buf_32++) + *buf_32 = le32_to_cpu(*(__le32 *)buf_32); } return 0; } |