diff mbox

Regression in Traktor Audio10 driver (snd-usb-audio) mixer flags

Message ID s5h1t9mo32n.wl-tiwai@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Takashi Iwai Jan. 12, 2016, 10:17 p.m. UTC
On Tue, 12 Jan 2016 22:24:41 +0100,
Owen Williams wrote:
> 
> Finally found the bad commit:
> SHA da6d276957ea56b9514aa5c8d885edf22f0b3e65
> ALSA: usb-audio: Add resume support for Native Instruments controls

Great, thanks for spotting out!

> I did upgrade my firmware at some point, perhaps the newer firmware
> changed how this works.  Happy to test whatever patches against a newer
> kernel (I'm on Wily, so 4.2.0-23).

Could you try the patch below?


Takashi

---

Comments

Owen Williams Jan. 13, 2016, 4:23 a.m. UTC | #1
Yes, that does allow me to use the mixer flags again.  However I notice
when I connect the device it no longer starts up with the flags in the
default state I can specify when I connect the card to my mac -- is
that the resume functionality that's supposed to work?


On Tue, 2016-01-12 at 23:17 +0100, Takashi Iwai wrote:
> On Tue, 12 Jan 2016 22:24:41 +0100,
> Owen Williams wrote:
> > 
> > Finally found the bad commit:
> > SHA da6d276957ea56b9514aa5c8d885edf22f0b3e65
> > ALSA: usb-audio: Add resume support for Native Instruments controls
> 
> Great, thanks for spotting out!
> 
> > I did upgrade my firmware at some point, perhaps the newer firmware
> > changed how this works.  Happy to test whatever patches against a
> > newer
> > kernel (I'm on Wily, so 4.2.0-23).
> 
> Could you try the patch below?
> 
> 
> Takashi
> 
> ---
> diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
> index 0ce888dceed0..279025650568 100644
> --- a/sound/usb/mixer_quirks.c
> +++ b/sound/usb/mixer_quirks.c
> @@ -793,7 +793,7 @@ static int
> snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,
>  		return 0;
>  
>  	kcontrol->private_value &= ~(0xff << 24);
> -	kcontrol->private_value |= newval;
> +	kcontrol->private_value |= (unsigned int)newval << 24;
>  	err = snd_ni_update_cur_val(list);
>  	return err < 0 ? err : 1;
>  }
> 
>
Takashi Iwai Jan. 13, 2016, 6:39 a.m. UTC | #2
On Wed, 13 Jan 2016 05:23:53 +0100,
Owen Williams wrote:
> 
> Yes, that does allow me to use the mixer flags again.  However I notice
> when I connect the device it no longer starts up with the flags in the
> default state I can specify when I connect the card to my mac -- is
> that the resume functionality that's supposed to work?

This is likely by the restore via alsactl from the last saved state.
It's nothing new, this should have been present before, too.  But the
regression also prevented this happening, so you might notice it now.

In anyway, I'm going to queue the fix to upstream tree.


thanks,

Takashi

> 
> 
> On Tue, 2016-01-12 at 23:17 +0100, Takashi Iwai wrote:
> > On Tue, 12 Jan 2016 22:24:41 +0100,
> > Owen Williams wrote:
> > > 
> > > Finally found the bad commit:
> > > SHA da6d276957ea56b9514aa5c8d885edf22f0b3e65
> > > ALSA: usb-audio: Add resume support for Native Instruments controls
> > 
> > Great, thanks for spotting out!
> > 
> > > I did upgrade my firmware at some point, perhaps the newer firmware
> > > changed how this works.  Happy to test whatever patches against a
> > > newer
> > > kernel (I'm on Wily, so 4.2.0-23).
> > 
> > Could you try the patch below?
> > 
> > 
> > Takashi
> > 
> > ---
> > diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
> > index 0ce888dceed0..279025650568 100644
> > --- a/sound/usb/mixer_quirks.c
> > +++ b/sound/usb/mixer_quirks.c
> > @@ -793,7 +793,7 @@ static int
> > snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,
> >  		return 0;
> >  
> >  	kcontrol->private_value &= ~(0xff << 24);
> > -	kcontrol->private_value |= newval;
> > +	kcontrol->private_value |= (unsigned int)newval << 24;
> >  	err = snd_ni_update_cur_val(list);
> >  	return err < 0 ? err : 1;
> >  }
> > 
> > 
>
Owen Williams Jan. 13, 2016, 2:58 p.m. UTC | #3
Great, thanks for the fast fix.  What's a good way of tracking the fix
to figure out when it goes through the system and ends up in an ubuntu
kernel?

Also, do you also maintain the pulseaudio configuration for this card?
The current config is completely broken and I've created an alternative
that works but isn't perfect.

thanks,
Owen

On Wed, 2016-01-13 at 07:39 +0100, Takashi Iwai wrote:
> On Wed, 13 Jan 2016 05:23:53 +0100,
> Owen Williams wrote:
> > 
> > Yes, that does allow me to use the mixer flags again.  However I notice
> > when I connect the device it no longer starts up with the flags in the
> > default state I can specify when I connect the card to my mac -- is
> > that the resume functionality that's supposed to work?
> 
> This is likely by the restore via alsactl from the last saved state.
> It's nothing new, this should have been present before, too.  But the
> regression also prevented this happening, so you might notice it now.
> 
> In anyway, I'm going to queue the fix to upstream tree.
> 
> 
> thanks,
> 
> Takashi
> 
> > 
> > 
> > On Tue, 2016-01-12 at 23:17 +0100, Takashi Iwai wrote:
> > > On Tue, 12 Jan 2016 22:24:41 +0100,
> > > Owen Williams wrote:
> > > > 
> > > > Finally found the bad commit:
> > > > SHA da6d276957ea56b9514aa5c8d885edf22f0b3e65
> > > > ALSA: usb-audio: Add resume support for Native Instruments controls
> > > 
> > > Great, thanks for spotting out!
> > > 
> > > > I did upgrade my firmware at some point, perhaps the newer firmware
> > > > changed how this works.  Happy to test whatever patches against a
> > > > newer
> > > > kernel (I'm on Wily, so 4.2.0-23).
> > > 
> > > Could you try the patch below?
> > > 
> > > 
> > > Takashi
> > > 
> > > ---
> > > diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
> > > index 0ce888dceed0..279025650568 100644
> > > --- a/sound/usb/mixer_quirks.c
> > > +++ b/sound/usb/mixer_quirks.c
> > > @@ -793,7 +793,7 @@ static int
> > > snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,
> > >  		return 0;
> > >  
> > >  	kcontrol->private_value &= ~(0xff << 24);
> > > -	kcontrol->private_value |= newval;
> > > +	kcontrol->private_value |= (unsigned int)newval << 24;
> > >  	err = snd_ni_update_cur_val(list);
> > >  	return err < 0 ? err : 1;
> > >  }
> > > 
> > > 
> > 
> 
>
Takashi Iwai Jan. 13, 2016, 3:03 p.m. UTC | #4
On Wed, 13 Jan 2016 15:58:06 +0100,
Owen Williams wrote:
> 
> Great, thanks for the fast fix.  What's a good way of tracking the fix
> to figure out when it goes through the system and ends up in an ubuntu
> kernel?

Better to ask Ubuntu people.  I have no idea.

> Also, do you also maintain the pulseaudio configuration for this card?
> The current config is completely broken and I've created an alternative
> that works but isn't perfect.

Better to ask ask PA people.  PA configuration is basically
independent from ALSA raw stuff.


Takashi
diff mbox

Patch

diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 0ce888dceed0..279025650568 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -793,7 +793,7 @@  static int snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,
 		return 0;
 
 	kcontrol->private_value &= ~(0xff << 24);
-	kcontrol->private_value |= newval;
+	kcontrol->private_value |= (unsigned int)newval << 24;
 	err = snd_ni_update_cur_val(list);
 	return err < 0 ? err : 1;
 }