sound output plugin for pandora-configbutton


Ziz

Advanced Member
Joined
Jan 15, 2006
Messages
3,583
Hello,

as stated here and here, I started to make a sound output plugin for kicksAss very fine pas.sh script, with which you can easily switch between the internal pandora audio and an arbitrary amount of bluetooth devices (e.g. head sets).
I am not done yet, but for people who already have installed pas.sh or which are not afraid of adding bluetooth devices themself as described here, this might already be very useful.

So, what is working:
  • My plugin can find installed sound output files and you can select them. All values are directly readed out of the directory of the pas.sh script.
  • soundoutput1.png
  • soundoutput2.png
  • However you can of course also change the position of the script:
  • soundoutput3.png
  • If pas.sh cannot be found at the given location, it will be extracted directly from the plugin file. I was so free too add the most recent version to my plugin. The environment variable PAS_PATH inside the script is changed to the wanted location, too. However you can always alter, improve or update the script once created (if needed):
  • soundoutput4.png
In the next days I will implement some nice dialog to add a new device. You saw the button on the first screenshot, but it is not working right now. ;) You shall be able to just add a bt device by MAC adress (maybe I will even add a function to choose from connected bluetooth devices...) or to edit the asoundrc_* file for you own needs. Furthermore I will add a list of all available asoundrc_* devices in the preferences menu of the plugin to easily edit or remove them. Stay tuned and have fun with the recent version:
Download link
Just copy the file soundoutput.so to /usr/share/configbutton, e.g. in the bash with
$ sudo cp soundoutput.so /usr/share/configbutton
I am not sure, whether configbutton will directly notice the plugin, but at least after a restart of the pandora the plugin should appear. Don't forget to activate it in the options menu of configbutton (right-click on the icon).

Regards,
Ziz

Edit: In the last screenshot, it has to be "pas.sh" of course. I will change this in the next version. ;)
 
This is a realy good Idea.
We can get more and more and Cheaper Bluetooth Speakers.

When your Project work fine ..maybe Notaz add that to the Zaxxon itself? :)
 
this is what i love so much about this community: collaboration.
very well done, alexander!
i'm happy i dun need to come up with some shitty GUI now :p
 
If the folder does not contain "pas.sh", version 0.4 will be installed and placed in it.

Improvement overall and no "will installed" nor "automaticly"
It also makes the subesequent infomessage redudant. It is better to steal attention when something goes wrong.

In the event that the distinction between it being found or not is imporant, a second message could say "no pas.sh found, install version 0.4 to %1$sfolder."
and the first could be.
"Select the folder you want pas.sh in, or where it is to be found already."

Edit: other fixes:

Disabled pulgins → Disabled
Enabled plugins → Enabled
(It says Plugin settings in the window title already)


Sound Output → Sound output
bluetooth → Bluetooth
TV-Out → TV-out
head sets → headsets

Show large icons → Large icons
(on the assumption that regular icons are shown beforehand/by default)
 
Last edited:
Well, most of your change requests are of configbutton and should maybe placed here. ;)

But I will improve the hints of my plugin. Btw. I am nearly done with the new version. So probably tomorrow I will upload a new version with the possibility to add and edit new configs. ;)
[doublepost=1486571866,1486546617][/doublepost]Okay, here is the new version, tell me, what you think. When I got some opinions and tests from you, I will create a pull request for slaeshjag, that the plugin can be shipped with the next firmware release. ;)

You can now add a new device directly with entering the MAC and a name of the bluetooth devic by hand or with this handy list, which should have all your paired or bluetooth devices. :D
soundoutput5.png


In the settings dialog all devices are shown and you can edit or delete them.
soundoutput6.png


However it warns you before reming a device. ;)
soundoutput7.png


The editing happens directly on the raw asoundrc_ file, which is handy if you want to tweak it in more detail.
soundoutput8.png


I also thought about the possbility to edit a device in the simple mode with name and MAC, too, but tbh: I doubt anybody would ever edit such a setting after creation (MAC addresses do not change...), so I decided to keep it simple and small. :)

Download and installation stays the same:
Download link
Just copy the file soundoutput.so to /usr/share/configbutton, e.g. in the bash with
$ sudo cp soundoutput.so /usr/share/configbutton
If you like the plugin (give me feedback!), I will maybe also create a pnd for the installation for people not so familiar with the terminal. ;)

Regards,
Ziz
 
After some feedback from canseco, fixing a critical bug and adding some minor new features, you can download the most recent version.
It does now create all needed configurations for you (including making backups) and also asks for root rights if needed;
soundoutput10.png

Furthermore you can now directly use a newly added device:
soundoutput9.png


Download link stays the same. ;)
 
The plugin itself works like a charm, I just installed it and everything shows up like it's supposed to.
As I'm at work right now I can't check the actual Bluetooth audio streaming but I will tonight, and I have no doubt that it will work.
As my living room BT speakers have no volume control, I guess the regular alsa mixer softvol will work? I wouldn't want to damage my kids ears when trying it :)

This really makes life for BT users like myself a lot easier, thanks a lot Ziz!
Big ups to you!
 
The plugin itself works like a charm, I just installed it and everything shows up like it's supposed to.
As I'm at work right now I can't check the actual Bluetooth audio streaming but I will tonight, and I have no doubt that it will work.
As my living room BT speakers have no volume control, I guess the regular alsa mixer softvol will work? I wouldn't want to damage my kids ears when trying it :)

This really makes life for BT users like myself a lot easier, thanks a lot Ziz!
Big ups to you!

the provided device templates come with a softvol control. so yeah, you can easily adjust the volume with alsamixer.
enjoy :)
 
The plugin itself works like a charm, I just installed it and everything shows up like it's supposed to.
As I'm at work right now I can't check the actual Bluetooth audio streaming but I will tonight, and I have no doubt that it will work.
Well, I have, so some feedbacks would be nice. :-D

As my living room BT speakers have no volume control, I guess the regular alsa mixer softvol will work? I wouldn't want to damage my kids ears when trying it :)
What KickAss said. :)

This really makes life for BT users like myself a lot easier, thanks a lot Ziz!
Big ups to you!
Glad you like it, but keep in mind that KickAss did the basic Alsa work, which I have no idea of. I am just good in copy and pasting some GUI code. ;)
 
I had time to test last night and it works perfectly. I played some SID tunes, mp3's and played some games. With the Wi-Fi switched off, the bluetooth audio stream works perfectly.
I did notice that the output can not be changed on the fly, the sound playing application needs to be restarted to change to the new audio output.
Softvol works fine, great!
I was wondering whether it would be possible to change Alsa's volume control slider with hot keys though so I wouldn't have to switch to desktop to change the volume.

So yeah, thanks again for this, I would recommend it for everyone using bt audio. Set-up is a breeze.
Also, use a Wi-Fi dongle if you need interwebs too.
 
Last edited:
I had time to test last night and works perfectly. I played some SID tunes, mp3's and played some games. With the Wi-Fi switched off, the bluetooth audio stream works perfectly.
I did notice that the output can not be changed on the fly, the sound playing application needs to be restarted to change to the new audio output.
Yeah, do you think, I should mention this somewhere?

Softvol works fine, great!
I was wondering whether it would be possible to change Alsa's volume control slider with hot keys though so I wouldn't have to switch to desktop to change the volume.
This is possible. Via Menu -> Setting -> Desktop -> Keyboard and then the "Application Shortcuts" tab you can add your own connection between button combinations and applications.
However the application you need for this is "amixer", which is not included in the Angström alsa-utils package. So I extracted the version from debian squeeze, you can download it here: http://ziz.gp2x.de/stuff/amixer
you can install it with sudo opkg install alsa-utils-amixer. Put this file somewhere (I put it directly in my home folder) and make it executable with chmod +x ./amixer.
Now you can add new short cuts e.g. for the run /home/your_user/amixer set Master 2+ , which increase the volume by ~1,5% The scale goes form 0 to 255 and it increase always double the value you give, so "2+" increases by 4. No idea, why. Deal with it. :cool:
I used Primary Shift U and Primary Shit I (both shoulder buttons + U or I) to adjust the volume. This makes sense as these are also the buttons for the brightness setting. :D

So yeah, thanks again for this, I would recommend it for everyone using bt audio. Set-up is a breeze.
Also, use a Wi-Fi dongle if you need interwebs too.
You are welcome. ;)

Edit: Fixed installation of amixer.
 
Last edited:
I will make a pull request the next days for @slaeshjag. Then the plugin is in the official pandora-configbutton repository.
Afterwards I will tell notaz about it and maybe, that amixer would be very handy to have. But I don't know, whether he wants to build amixer himself. Copy and pasting a binary from debian is not the way to go for a firmware inclusion. XD
[doublepost=1486983507,1486980320][/doublepost]I just spoke with notaz. amixer is included in the firmware, you need to install it with
sudo opkg install alsa-utils-amixer
It is just splitted form alsa-utils! :D
 
No somehow there is a problem with the buffer or something.. hmm I forgot what it was. I´ll search for it and post it here :D

ALSA lib audio/pcm_bluetooth.c:1607: (audioservice_expect) BT_OPEN failed

Something with SDL and bluetooth was it. Seemed like there is no solution.
 
Last edited:
Hm, you are right. No SDL application has sound. :(
[doublepost=1487322556,1487321536][/doublepost]Maybe the dmix plugin of alsa can help here as translator between SDL and the bluetooth plugin. But unfortunately I have no idea about this, so I need to read a lot of documentation first. A first little test failed. ^^'
 
i tried to investigate earlier. all my attempts failed. i also tried dmix, to no avail.

my pandora is back and i might have another look at this.
 
  • Like
Reactions: Ziz
i tried to investigate earlier. all my attempts failed. i also tried dmix, to no avail.

my pandora is back and i might have another look at this.
Great! You know I started using your script because I did not only fail at enabling bluetooth output, but also fucked up my whole alsa settings while doing so. :D
 
Back
Top