Re: Support for NUX MG-300 USB interface

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

 



On Mon, 18 Jan 2021 18:54:57 +0100,
Mike Oliphant wrote:
> 
> Here is the dmesg output with dyndbg enabled. It looks like it is failing
> to find the clock source, and hence cannot obtain the valid sample rates.
> 
> It looks like it is finding the clock selector (id: 40), but
> "uac_clock_selector_get_val()" is returning zero, and it never gets the
> clock source (id: 41).

Aha.  Maybe the firmware doesn't expect it being asked as it's the
single connection.

Does the patch below help anything?


Takashi

--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -298,6 +298,11 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip,
 	if (selector) {
 		int ret, i, cur;
 
+		if (selector->bNrInPins == 1) {
+			ret = 1;
+			goto find_source;
+		}
+
 		/* the entity ID we are looking for is a selector.
 		 * find out what it currently selects */
 		ret = uac_clock_selector_get_val(chip, selector->bClockID);
@@ -314,6 +319,7 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip,
 			return -EINVAL;
 		}
 
+	find_source:
 		cur = ret;
 		ret = __uac_clock_find_source(chip, fmt,
 					      selector->baCSourceID[ret - 1],



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

  Powered by Linux