Hey Pizzasgood,
being a "victim" of a CM6501 audio chip, I am unable to use the current volume control on Puppy, so I gave retrovol a try - and it partially worked.
The problem is: the usb audio I need to select for volume control is listed as "Speaker1" in both alsamixer and retrovol. I know that I can chose what audio channel can be controlled over the desktop slider, but I have no idea which one to chose, as the dropdown list offers TWO "Speaker" channels (but no Speaker1), and none of them seem to work (I already tested them both). Do you have any idea what else I could try? Or is there probably a way to alter retrovol to provide better usb audio support? It would be nice if I didn't have to open retrovol's volume control window to change the volume level but could use the slider instead.

Okay, I think I might know what's wrong. I'm guessing that that particular control doesn't use integer as the datatype. Right now I decide which controls to put in the dropdown by just grabbing all integer controls.

Could you post the output of the following command for me?

Code:

amixer contents

Then I can see what datatype it uses and adjust my code appropriately. Probably what I'll need to do is specifically filter out booleans and enumerated, and include everything else.

I'm going to try to get the work I've done today packaged up by tonight. So far I've fixed the bug with not restarting after using Exit, added an optional (enabled by default) menu that appears on right-click on the tray icon, moved the tray-related options in the configuration window to their own tab, and hopefully fixed the problems people were having with using trays at the top of their screens.

I will hopefully begin addressing the balance stuff and adjusting the available controls for the tray mixer this weekend if I have time._________________Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Version 0.5 is uploaded. It does the things I mentioned in the above post.

One slight (inconsequential) annoyance: I wrote some code to detect whether it's in a taskbar at the top of the screen or one at the bottom of the screen, so that it can reverse the order of the popup menu when you rightclick the icon. That way no matter where you place it, the item under the mouse at first will be the one to open the main window, with the exit option the furthest away. This is more convenient and safer (harder to accidentally close it). The problem is that when retrovol first starts, there isn't a taskbar yet, so it thinks it's on the top. Then JWM fires up, and if the taskbar is at the bottom, Retrovol doesn't know to update its menu.

This doesn't hurt anything. It all works fine still. But don't get too used to the menu layout that it will give you for now, because I will correct the above behavior in the next version. (Unless you use a taskbar at the top, in which case you can feel free to start getting used to it immediately).

One other small thing people may notice: Until now, I had it showing the popup slider three pixels above the icon, to account for the border of the taskbar. But I can't really know in advance with certainty what that will be. I don't like hardcoded guesses like that, so I removed the offset. In the next version I will add a configuration option to set it, and maybe a feature to guess it (I already have code that calculates the size of the border on the opposite edge - between the icon and the edge of the screen - so I could just assume both edges are the same thickness).

Another thing I intend to do in one of the next two versions is save the window position and dimensions. Those were requested features and I agree that it's annoying to have it pop up way over in the middle all the time.

I also still need to make the PID handling more robust. It works fine normally, but there is still a potential issue if it crashes or is killed. Well, fixing normal kills is easy - just add a signal handler for SIGTERM so that it exits cleanly, which is a good idea anyway . But if it somehow crashes or gets hit by kill -9, and if it leaves a zombie process (which appears to be a problem with JWM, not Retrovol, though I need to do more testing before I can say for sure), then it won't start again until the old PID file is removed. Should be pretty easy to fix. I might tackle that this weekend as a warmup before the balance stuff.

WarMocK wrote:

One tar-gzipped amixer output, coming up.

Thanks. It turns out those controls do use ints. So they should work. Whether they are the right ones, I have no idea.

When you look at it in the main window, is there a "Speaker" entry along with the "Speaker1" entry?

What's happening is that there are two controls named "Speaker Playback Volume", but one is at "index=1" and appears to be an 8-channel device with numbers that range from 0-197, whereas the first one is (I assume) at index 0, and your file shows it as being a 2-channel device with a value range from 0-8065.

Off the top of my head, I believe the main-window code appends the index number to the end of the name and strips off some of the extra fluff (all the "Volume" strings, for example), thus the "Speaker1" entry despite there being no "Speaker1" in the amixer output. The tray slider dropdown, on the other hand, uses the raw unaltered names. I'm guessing that the second entry in the dropdown would be the one you want, since I'm assuming Speaker1 corresponds to the one with index=1, which has a larger numid than the one without, so it should probably show up after it.

When I work on it this weekend I'll take a look at the code used in those two areas (I'll be looking at it anyway for the balance support) and see if I can see why one would work and not the other.

One thing that would help a little is if you turn down the volume in the one that works (verifying that it is in fact working by playing some music or whatever), run that command, and then turn the volume up and do it again. Then post both copies. Then do the same thing using the dropdown set to the first Speaker entry, then to the second one.

Off the top of my head, I'm guessing that maybe the dropdown is not handling the index properly and seeing the first "Speaker" control twice instead of seeing two separate ones._________________Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Pizzasgood, that's what I meant when I said I need to select "Speaker1" in both alsamixer and retrovol. I should have added "instead of Speaker" to the sentence to clearly point that out, sorry for that.
And like I said, I tested both "Speaker" entries for the desktop slider, but none of them worked (I tested the second entry of the listbox first because I assumed it was Speaker1 and that the index number just was cut off by the program). I'll give it a try later and generate some output for both speaker devices with different sound volumes and post them here. See you later.

EDIT: here you go!
The 2 at the end of the filename indicates that both speaker sliders were throttled down, while the file without the 2 is the output with only speaker1 either been throttled (low) or at maximum (full).

Okay, I see what's happening. That part of the code (along with the code that loads settings from a file) is based solely on the name of the device, under the erroneous assumption that they are unique. I'll have to adjust it to allow an index to be saved/loaded along with the name, when needed (else default to 0).

Thanks for bringing that to my attention.

In other news, among other things I implemented balance today. You hold shift to change the left channel, and hold ctrl to change the right channel. Scrolling and arrow keys (and pg-up/down) will maintain the difference between the two settings when neither shift nor ctrl is held. The click/drag method, however, will reset them to be equal if you don't hold one of those down. I might change it to have the click and drag set the louder of the two channels and reposition the lesser to maintain the gap. (The current behavior was not intentional, just the default that happened due to how I implemented everything.)

I'm not going to package it up until I get the index stuff incorporated, along with the position memory. I might have time for those tomorrow, or I might not. As always, the current progress is in the SVN repo for the impatient _________________Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

It now automatically remembers the window position and dimensions - not perfectly, because it isn't able to determine the added size that window decorations adds. (I just thought of an idea that might avoid that issue at least in some cases, so I'll try it before the next version.)

Ability to define the offset between the slider and the tray icon (otherwise it tries to guess)

Fixes, improvements:

Added signal handlers to exit cleanly on SIGINT and SIGTERM.

Added rudimentary zombie detection (which should only happen if the program is sent SIGKILL (kill -9) and it doesn't exit correctly).

The menu is ordered correctly, and automatically reverses if the taskbar is moved from the top of the screen to the bottom (or vice-versa) without restarting Retrovol.

Determination of whether it is at the top or bottom works more accurately.

Fixed bug with incorrect slider offset when at top of screen.

Changed code to rely on the numid of controls instead of name, fixing the bug with duplicate names.

Fixed bug when the tray program exits and restarts while retrovol is running.

Note: This new version uses numid to identify slider controls, so if you had already told an older version of Retrovol which sliders to display and use for the tray, you will need to adjust your .retrovolrc file (or just delete it if you don't mind losing your preferences). The simplest solution that preserves other settings is to open the file in a text editor and remove the "tray_slider_control" and "sliders:" sections. If you want to keep the same slider layout, however, you can manually upgrade the file by replacing the name of each slider with that slider's numid (run "amixer controls" for a list). Note that unlike with the names, the numid should not be quoted. Also, since a numid isn't very descriptive, you might want to place a comment after it explaining which control it is for (e.g. 37 #Master Volume Control).

The new version no longer specifically requires tabs to be used in the "sliders:" section - it will work with any number of spaces and tabs there. (All other sections must still be completely left-justified, however.)

I believe the fix for handling when the tray itself exits should fix the problem that Barry mentioned on his blog, along with the JWM issue when you kill and relaunch JWM._________________Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

A couple of issues, btw I just compiled retrovol-6 in Lupu, --prefix=/usr.

Now I made a pet and installed. On an X-restart retrovol appears in the JWM tray with the wrong background, fine, we haven't set it, but we haven't called retrovol either. It's not in ~/.xinitrc. I am a bit puzzled why it starts.

Second issue, if you put the entry on the first page of this thread in ~/.xinitrc and restart X the volume icon appears with the correct background but the mixer window appears.

If I could find how retrovol starts in my first instance I think I'd be there with solving my issue.

I'm guessing that maybe you have a script in /root/Startup/ that is launching it. If it's already launched once, the second time it's attempted to be launched would pop up the window instead of only starting the tray icon, even if the -hide option is used._________________Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Hey Pizzasgood,
I just installed the new dotpet, but for some reason it won't work. I threw out my old rc file to make sure it works, but I still can't select the speaker1 device listed in the main window. And when I try to set the output for the tray slider manually (either the numid or the name I got in the main control window), retrovol shows the incorrect sound level for a second, then goes on mute and resets itself to the CD output.
Any idea what I'm doing wrong here?

Sorry for the long delay. I was busy wrapping up college and getting gradumutated. Now I'm chilling at my graandparents' house until I can get my car working and legal so I can ride off into the sunset. (Well, actually it would be the sunrise, because I'm headed east, but that doesn't sound as cool.)

Anyways, yeah, it looks like the code I wrote doesn't quite work. I ran out of time and was rushing, and forgot to test whether the new dropdown code actually works (it doesn't). Sorry about that.

I'll go see what the problem is._________________Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Version 0.7 uploaded. The only change is that the dropdown to select the slider controlled by the tray now works._________________Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Could you elaborate? I know it isn't exact but it should be close._________________Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

No, this is a separate issue...
I see now. It comes down to the difference between using "quit" or the window manager close button, and right-clicking on the tray icon (with the right click menu disabled).

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum