ALSA: scarlett2: Add ioctl commands to erase flash segments
authorGeoffrey D. Bennett <g@b4.vu>
Tue, 19 Dec 2023 17:50:29 +0000 (04:20 +1030)
committerTakashi Iwai <tiwai@suse.de>
Fri, 29 Dec 2023 14:39:27 +0000 (15:39 +0100)
commit6a7508e64ee3e8320c886020bcdcd70f7fcbff2c
treec178209a35f7290a5de9f0837db883c2f0fc7cf1
parent337b2f0e778f78f61972497994b70a05e8f6447d
ALSA: scarlett2: Add ioctl commands to erase flash segments

Add ioctls:
- SCARLETT2_IOCTL_SELECT_FLASH_SEGMENT
- SCARLETT2_IOCTL_ERASE_FLASH_SEGMENT
- SCARLETT2_IOCTL_GET_ERASE_PROGRESS

The settings or the firmware flash segment can be selected and then
erased (asynchronous operation), and the erase progress can be
monitored.

If the erase progress is not monitored, then subsequent hwdep
operations will block until the erase is complete.

Once the erase is started, ALSA controls that communicate with the
device will all return -EBUSY, and the device must be rebooted.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/227409adb672f174bf3db211e9bda016fb4646ea.1703001053.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/uapi/sound/scarlett2.h
sound/usb/mixer_scarlett2.c