Re: wskbd_set_mixervolume

2022-02-11 Thread Alexandre Ratchov
27;ve no other options, have we? > > > > > > > > AFAICS, you're fixing a concrete use-case by tweaking what already > > > > exists, this won't make things more broken than they already are. I'm > > > > OK with it. > > > > > &g

Re: wskbd_set_mixervolume

2022-02-10 Thread Anton Lindqvist
t; > > > > > AFAICS, you're fixing a concrete use-case by tweaking what already > > > exists, this won't make things more broken than they already are. I'm > > > OK with it. > > > > Here's the complete diff including adding

Re: wskbd_set_mixervolume

2022-02-09 Thread Alexandre Ratchov
OK with it. > > Here's the complete diff including adding a cookie argument to > audio_attach_mi(). Is the caching necessary? device_lookup() seems cheap and there are at most two devices in most cases. Keeping the code minimal especially on rare and non-performace-critical code-paths would be nice. If you choose to drop the caching, this would allow to just add a a new "cookie" argument to wskbd_set_mixervolume(), similarly to what you did for audio_attach_mi()

Re: wskbd_set_mixervolume

2022-02-08 Thread Anton Lindqvist
audio->cookie = NULL; + for (i = 0; i < audio_cd.cd_ndevs; i++) { + struct audio_softc *sc; + + sc = (struct audio_softc *)device_lookup(&audio_cd, i); + if (sc == NULL) + contin

Re: wskbd_set_mixervolume

2022-02-07 Thread Alexandre Ratchov
On Mon, Feb 07, 2022 at 06:55:21PM +0100, Anton Lindqvist wrote: > On Mon, Feb 07, 2022 at 11:21:43AM +0100, Alexandre Ratchov wrote: > > On Sun, Feb 06, 2022 at 08:40:35AM +0100, Anton Lindqvist wrote: > > > > > > Polished diff. I'm omitting a necessary refactoring commit making > > > audio_attac

Re: wskbd_set_mixervolume

2022-02-07 Thread Alexandre Ratchov
er enabling the device in sndiod the volume > > > > > buttons > > > > > does not cause the volume to change. Turns out wskbd_set_mixervolume() > > > > > is only propagating volume changes to first attached audio device. Is > > > > > their any

Re: wskbd_set_mixervolume

2022-02-07 Thread Anton Lindqvist
on Lindqvist > > > > > > > > Hi, > > > > I recently got a USB headset with physical volume buttons, handled by > > > > ucc(4). However, after enabling the device in sndiod the volume buttons > > > > does not cause the volume to change. T

Re: wskbd_set_mixervolume

2022-02-07 Thread Anton Lindqvist
On Mon, Feb 07, 2022 at 11:21:43AM +0100, Alexandre Ratchov wrote: > On Sun, Feb 06, 2022 at 08:40:35AM +0100, Anton Lindqvist wrote: > > > > Polished diff. I'm omitting a necessary refactoring commit making > > audio_attach_mi() accept a new cookie argument. > > > > I'm not sure to understand t

Re: wskbd_set_mixervolume

2022-02-07 Thread Alexandre Ratchov
headset with physical volume buttons, handled by > > > ucc(4). However, after enabling the device in sndiod the volume buttons > > > does not cause the volume to change. Turns out wskbd_set_mixervolume() > > > is only propagating volume changes to first attached audio

Re: wskbd_set_mixervolume

2022-02-07 Thread Alexandre Ratchov
udio_softc *)device_lookup(&audio_cd, i); > + if (sc == NULL) > + continue; > + if (sc->cookie != cookie) { > + device_unref(&sc->dev); > + continue; > +

Re: wskbd_set_mixervolume

2022-02-06 Thread Alexandre Ratchov
headset with physical volume buttons, handled by > > > ucc(4). However, after enabling the device in sndiod the volume buttons > > > does not cause the volume to change. Turns out wskbd_set_mixervolume() > > > is only propagating volume changes to first attached audio

Re: wskbd_set_mixervolume

2022-02-06 Thread Alexandre Ratchov
On Sat, Feb 05, 2022 at 09:29:42AM +0100, Anton Lindqvist wrote: > Hi, > I recently got a USB headset with physical volume buttons, handled by > ucc(4). However, after enabling the device in sndiod the volume buttons > does not cause the volume to change. Turns out wskbd_set_mixerv

Re: wskbd_set_mixervolume

2022-02-05 Thread Anton Lindqvist
headset with physical volume buttons, handled by > > > ucc(4). However, after enabling the device in sndiod the volume buttons > > > does not cause the volume to change. Turns out wskbd_set_mixervolume() > > > is only propagating volume changes to first attached audio

Re: wskbd_set_mixervolume

2022-02-05 Thread Claudio Jeker
device in sndiod the volume buttons > > does not cause the volume to change. Turns out wskbd_set_mixervolume() > > is only propagating volume changes to first attached audio device. Is > > their any good not to consider all attached audio devices? > > I think this is tricky.

Re: wskbd_set_mixervolume

2022-02-05 Thread Anton Lindqvist
device in sndiod the volume buttons > > does not cause the volume to change. Turns out wskbd_set_mixervolume() > > is only propagating volume changes to first attached audio device. Is > > their any good not to consider all attached audio devices? > > I think this is tricky.

Re: wskbd_set_mixervolume

2022-02-05 Thread Mark Kettenis
> Date: Sat, 5 Feb 2022 09:29:42 +0100 > From: Anton Lindqvist > > Hi, > I recently got a USB headset with physical volume buttons, handled by > ucc(4). However, after enabling the device in sndiod the volume buttons > does not cause the volume to change. Turns out wskbd_s

wskbd_set_mixervolume

2022-02-05 Thread Anton Lindqvist
Hi, I recently got a USB headset with physical volume buttons, handled by ucc(4). However, after enabling the device in sndiod the volume buttons does not cause the volume to change. Turns out wskbd_set_mixervolume() is only propagating volume changes to first attached audio device. Is their any