From a6a3325913efbe35a10e87fd3e9c3ce621fd32c7 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 31 May 2010 13:35:37 +0200 Subject: ALSA: usb-audio: support partially write-protected UAC2 controls So far, UAC2 controls are marked read-only if any of the channels are marked read-only in the descriptors. Change this behaviour and - mark them writeable unless all channels are read-only - store the read-only mask in usb_mixer_elem_info and - check the mask again in set_cur_mix_value(), and bail out for write-protected channels. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai --- sound/usb/mixer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/usb/mixer.h') diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h index 130123854a6..a7cf1007fbb 100644 --- a/sound/usb/mixer.h +++ b/sound/usb/mixer.h @@ -34,6 +34,8 @@ struct usb_mixer_elem_info { unsigned int id; unsigned int control; /* CS or ICN (high byte) */ unsigned int cmask; /* channel mask bitmap: 0 = master */ + unsigned int ch_readonly; + unsigned int master_readonly; int channels; int val_type; int min, max, res; -- cgit v1.2.3