Thread: [PATCH] allow volume keys to work without OSS emulation
Brought to you by:
matthiasgrimm
|
From: John S. S. <to...@to...> - 2004-11-18 05:05:55
Attachments:
pbbuttonsd-0.6.6-alsa.patch
|
Hi all, This patch allows pbbuttonsd to use ALSA without requiring the OSS emulation modules be loaded. More comments are included in the patch file. It allows for muting and increase/decrease of the volume. One thing I've noticed is that gtkpbbuttonsd does not recognise when it changes the volume. Can anyone give me a hint why that might be? cheers, John |
|
From: Matthias G. <mat...@us...> - 2004-11-18 18:28:59
|
Am Donnerstag, 18. November 2004 06:03 schrieb John Steele Scott: > Hi all, > > This patch allows pbbuttonsd to use ALSA without requiring the OSS > emulation modules be loaded. More comments are included in the patch file. nice work :-) > It allows for muting and increase/decrease of the volume. One thing I've > noticed is that gtkpbbuttonsd does not recognise when it changes the > volume. Can anyone give me a hint why that might be? Yes I can. You need to send the volume information to gtkpbbuttons. This could be done with the function call: singletag_to_clients (CHANGEVALUE, base->mute ? TAG_MUTE : TAG_VOLUME, vol); Add this line somewhere in your function alsamixer_set_and_send() and gtkpbbuttons will display your volume again. The only thing left to do is to decide which channel's volume should be sent. Best Regards Matthias |
|
From: John S. S. <to...@to...> - 2004-11-19 02:18:07
Attachments:
pbbuttonsd-0.6.6-alsa-20041119.patch
|
> Yes I can. You need to send the volume information to gtkpbbuttons. This > could be done with the function call: > > singletag_to_clients (CHANGEVALUE, base->mute ? TAG_MUTE : TAG_VOLUME, > vol); Thanks Matthias, I have updated the patch. It ended up being a bit more difficult than that, because ALSA does not place any restrictions on how drivers specify the volume. For instance, on my iBook G4, the volume range is from 0 to 176. I have included code to map this range to 0-100, but the rounding makes things appear weird sometimes. cheers, John |
|
From: Matthias G. <mat...@us...> - 2004-11-21 16:55:42
|
Am Freitag, 19. November 2004 03:14 schrieb John Steele Scott:
> I have updated the patch. It ended up being a bit more difficult than that,
> because ALSA does not place any restrictions on how drivers specify the
> volume. For instance, on my iBook G4, the volume range is from 0 to 176. I
> have included code to map this range to 0-100, but the rounding makes
> things appear weird sometimes.
Hi John,
I just integrated your module in my distribution and i got some problems you
might know a solution for:
1. Your patch don't compile on my machine out of the box.
The problem: The linker doesn't got the alsa libraries after running
configure. Have you modified files not included in the patch? I had to
modify src/Makefile.am to add the ALSA_LIBS.
I updated my autoconf and libasound2 but there was no trick.
2. Your module doesn't change volume on my machine (G3 Pismo).
The problem: Your module change the master volume channel only (viewed with
the alsamixer), but this channel does nothing on my machine. I have to
change the PC Speaker volume channel to get a result, but I don't know how
to specify that channel in dev_Mixer. What is the right keyword for the PC
Speaker channel?
Running pbbuttonsd with OSS emulation of ALSA modify both channels due to
the MixerChannels configuration option. Maybe you could use the
MixerChannels configuration option to control this too.
After solving this little problems the alsamixer will become part of my
distribution. You will be able to compile your favourite version with ALSA or
OSS or decide at runtime with a new configuration option. I will send you the
package for test after the above problems have been solved.
Best regards
Matthias
|
|
From: John S. S. <to...@to...> - 2004-11-22 18:57:20
|
Matthias Grimm <mat...@us...> writes: > Hi John, > I just integrated your module in my distribution and i got some problems you > might know a solution for: > > 1. Your patch don't compile on my machine out of the box. > The problem: The linker doesn't got the alsa libraries after running > configure. Have you modified files not included in the patch? I had to > modify src/Makefile.am to add the ALSA_LIBS. > I updated my autoconf and libasound2 but there was no trick. Did you run "autoreconf --force" in the top level directory? I did test my patch on a clean copy of the sources, but I'm not an expert with the autotools. I thought AM_PATH_ALSA added the alsa libs to LDFLAGS automatically. > 2. Your module doesn't change volume on my machine (G3 Pismo). > The problem: Your module change the master volume channel only (viewed with > the alsamixer), but this channel does nothing on my machine. I have to > change the PC Speaker volume channel to get a result, but I don't know how > to specify that channel in dev_Mixer. What is the right keyword for the PC > Speaker channel? > Running pbbuttonsd with OSS emulation of ALSA modify both channels due to > the MixerChannels configuration option. Maybe you could use the > MixerChannels configuration option to control this too. Ah, I just assumed that all mixers would have a working "Master". I will try and get this fixed (by adding the MixerChannels option) this week some time. cheers, John |
|
From: Matthias G. <mat...@us...> - 2004-11-29 20:50:26
|
On Tue, 23 Nov 2004 05:26:36 +1030
John Steele Scott <to...@to...> wrote:
> Did you run "autoreconf --force" in the top level directory? I did test my patch
Yes, I did.
> on a clean copy of the sources, but I'm not an expert with the autotools. I
> thought AM_PATH_ALSA added the alsa libs to LDFLAGS automatically.
No, it doesn't. AM_PATH_ALSA exported some new symbols ALSA_LIBS
and another one but they won't be used by Makefile.in. First I thought
the problem occour due to my ancient version of automake and autoconf
but after an update nothing changed.
But this is not a real problem. I added ALSA_LIBS to LDFLAGS in my
Makefile.am and everything works.
> > 2. Your module doesn't change volume on my machine (G3 Pismo).
> > The problem: Your module change the master volume channel only (viewed with
> > the alsamixer), but this channel does nothing on my machine. I have to
> > change the PC Speaker volume channel to get a result, but I don't know how
> > to specify that channel in dev_Mixer. What is the right keyword for the PC
> > Speaker channel?
> > Running pbbuttonsd with OSS emulation of ALSA modify both channels due to
> > the MixerChannels configuration option. Maybe you could use the
> > MixerChannels configuration option to control this too.
>
> Ah, I just assumed that all mixers would have a working "Master". I will try and
> get this fixed (by adding the MixerChannels option) this week some time.
Great. After you have solved this little problem and after some more testing
pbbuttonsd 0.6.7 will be released. If you like to test a little bit by now please have
a look into the CVS repository.
Best Regards
Matthias
|