[alsa-devel] [PATCH 06/10] ALSA: usb-audio: UAC2: do clock validity check earlier

Eldad Zack eldad at fogrefinery.com
Tue Apr 2 00:36:28 CEST 2013


Hi Torstein,

On Mon, 1 Apr 2013, Torstein Hegge wrote:

> On Sun, Mar 31, 2013 at 17:52:28 +0200, Eldad Zack wrote:
> > Move the check that parse_audio_format_rates_v2() do after
> > receiving the clock source entity ID directly into the find
> > function and add a validation flag to the function.
> > 
> > This patch does not introduce any logic flow change.
> 
> What would be lost by letting __uac_clock_find_source() always check
> that the clock source is valid? It would avoid having to pass the
> validate parameter, at the cost of having parse_audio_format_rates_v2()
> validate clock source.

I didn't want to change that logic since (1) I can't test it, my device
doesn't go through that code and (2) failing there on account of that
check would error out and not support the device (as far as I 
understand from the code). So if a (theoretical) device would only 
return valid one minute after it is connected, this will cause a
regression. I might be wrong, but I figured it's better to do one thing 
at a time.

Cheers,
Eldad


More information about the Alsa-devel mailing list