Re: [PATCH 07/10] ALSA: usb-audio: UAC2: try to find and switch to valid clock

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

 



On Tue, 2 Apr 2013, Takashi Iwai wrote:

> At Sun, 31 Mar 2013 17:52:29 +0200,
> Eldad Zack wrote:
> > 
> > If a selector is available on a device, it may be pointing to a
> > clock source which is currently invalid.
> > If there is a valid clock source which can be selected, switch
> > to it.
> > 
> > Signed-off-by: Eldad Zack <eldad@xxxxxxxxxxxxxxx>
> > ---
> >  sound/usb/clock.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
> >  1 file changed, 63 insertions(+), 2 deletions(-)
> > 
> > diff --git a/sound/usb/clock.c b/sound/usb/clock.c
> > index 08fa345..6b79e25 100644
> > --- a/sound/usb/clock.c
> > +++ b/sound/usb/clock.c
> > @@ -99,6 +99,40 @@ static int uac_clock_selector_get_val(struct snd_usb_audio *chip, int selector_i

> > +	buf = uac_clock_selector_get_val(chip, selector_id);
> > +	if (buf != pin) {
> 
> uac_clock_selector_get_val() returns an int with a negative value,
> so it's safer to compare it as an int.

Right, and I need to return the error code, too. Thanks!

Cheers,
Eldad
_______________________________________________
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