[PATCH v2 2/2] sound: usb: allow clock source validity interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



miniDSP USBStreamer UAC2 devices send clock validity changes with the
control field set to zero. The current interrupt handler ignores all
packets if the control field does not match the mixer element's, but
it really should only do that in case that field is needed to
distinguish multiple elements with the same ID.

This patch implements a logic that lets notifications packets pass
if the unit ID is unique for a given device.

Signed-off-by: Daniel Mack <daniel@xxxxxxxxxx>
---
 sound/usb/mixer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index cab6f52..652e281 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -2389,7 +2389,13 @@ static void snd_usb_mixer_interrupt_v2(struct usb_mixer_interface *mixer,
 			continue;
 
 		info = (struct usb_mixer_elem_info *)list;
-		if (info->control != control)
+
+		/*
+		 * Allow any value of 'control' in case there is only one
+		 * mixer element with the given unit ID.
+		 */
+		if (info->control != control &&
+		    (list != mixer->id_elems[unitid] || list->next_id_elem))
 			continue;
 
 		switch (attribute) {
-- 
2.4.3

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux