[Mostly SOLVED] - Installation of XMMS and Bluetooth settings?


Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,479
I wonder why audacious wont work then..? I have ALSA selected as the output plugin, everything defaulted.
Perhaps because XMMS is installed via opkg?


I fiddled with all the settings in Audacious and nothing works.


I must correct myself from earlier: XMMS does *not* play to my headphones when I use the default .asoundrc file - I switched files with the btswitch key combo while XMMS was still playing... when I closed and opened the program again, it played to the speakers instead of my headphones.
There's a way to make a keycombo to switch between two .asoundrc files?
 

Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,479
One other thing that would be great if someone could help with:


Playback controls are part of my Creative WP-350's, but only volume + and volume - work.... Play/Pause, << , and >> (next & previous tracks) don't do anything. Any ideas here?
I remember those being events you could capture using xev and then map to a key combo that the media player would listen for. Not sure about that though, I'm still playing with settings to find a decent buffer amount to try

I have those too, on my Samsung HM6450. Luckily it has its own volume control or I'd be deaf right now.


[EDIT]


Try putting the buffer to 750-800ms and adjust the period to 55, for me that seems to do the trick 99% of the time. <-- 1ghz unit though
Where do I change the buffer ms and period? In tha .asoundrc file? What exactly do I change? Right now I have this stuff:

Code:
pcm.dmixed {
    type dmix
    ipc_key 1234
    slave {
         pcm "hw:0"
         buffer_size 8192
         period_size 2048
         #periods 128
         period_time 0
         buffer_time 0
         rate 44100
    }
}


pcm.softvol {
    type softvol
    slave {
          pcm      "dmixed"
    }
    control {
          name     "Master"
          card 0
    }
}

pcm.!default {
    type     plug
    slave.pcm   "bluetooth"
}

pcm.dsp0 {
    type plug
    slave {
          pcm "hw:0"
    }
}

ctl.dsp0 {
    type plug
    slave.pcm "hw:0"
}

ctl.mixer0 {
    type plug
    slave.pcm "hw:0"
}

pcm.bluetooth {
type bluetooth
device 00:12:0E:2C:B0:D7

}
 

Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,479
I wonder why audacious wont work then..? I have ALSA selected as the output plugin, everything defaulted.
Perhaps because XMMS is installed via opkg?


I fiddled with all the settings in Audacious and nothing works.


I must correct myself from earlier: XMMS does *not* play to my headphones when I use the default .asoundrc file - I switched files with the btswitch key combo while XMMS was still playing... when I closed and opened the program again, it played to the speakers instead of my headphones.
There's a way to make a keycombo to switch between two .asoundrc files?
I'd really love to know this, as it would make it far more trivial to use my headphones.

Also, how come when I use bluetooth, I can't pause, fast forward, or rewind in mplayer without freezing it? It also freezes when the file ends, instead of quitting, and I have to control-c.
 

whynodd

Member
Joined
Sep 20, 2008
Messages
262
Just want to write down my experiences with bluetooth audio:

First, I connected my headset (in fact, it is a bluetooth motorbike intercom) to pandora. Then, I did the modifications to .asoundrc. Ok, mplayer works somehow (also freezes here).

XMMS installation via opkg fails. I tried 1000 other players and a lot of configuration file hacking. Even if I delete everything but the bluetooth-parts in .asoundrc, only mplayer manages to route sound to bluetooth. Sound is better than expected (its an intercom, not a high quality headphone...) and range is approx 7m(!).

So, I hope someone fixes at least audacious or an other simple player with a playlist. It seems there is just a gui-element missing, where I can put in "bluetooth" as the sink. Working transport controls from headset (pause, stop, next, previous) would be godlike.

If everything fails: Could someone hack 2 simple shell scripts? (I am not that experienced with those)

First script: A daemon that uses mplayer to play songs from a queue-file, kills mplayer automatically when freezed (watchdog-mechanic) and plays the next song from that list.

Second script: Is called from the file browser when clicking on music files (doesn't get easier). Then just adds that file to the queue-file and pops up one of those notifications on the lower right screen corner.
 

spiralofhope

Member
Joined
Jun 20, 2011
Messages
201
Website
blog.spiralofhope.com
First off, I tinkered with this nonsense and got a solution which includes proper volume control. It also includes crashes when fast-forwarding, stopping or exiting. Yay.

http://boards.openpandora.org/topic/15193-bluetooth-headsets-a-partly-working-solution//URL]

If any of you are interested in an actual permanent perfect solution, I believe that updating alsa is the magic we're looking for. Make some noise.

http://boards.openpandora.org/topic/15192-update-alsa-or-the-kitten-gets-it//URL]

--

Could someone hack 2 simple shell scripts? (I am not that experienced with those)
Maybe.

My answers will have technical crap in them, meant for others interested in such a project.

First script: A daemon that uses mplayer to play songs from a queue-file, kills mplayer automatically when freezed (watchdog-mechanic) and plays the next song from that list.
- mplayer may not support the concept of playing from a queue file, I don't know. I've used console software (like cplay) which handle such things, but I don't know how they do it. This may not be easy.

- I don't know if there is an easy way to tell when a process is frozen. If an existing mplayer process can be interacted with (e.g. through some sort of pipe mechanism?) then it feels like it would be easy. If not, then some other piece of software would have to be used -- or probably compiled for the pandora.

[edit] Oh, I wonder if sending a sig USR1 or some such would give a little feedback.

Second script: Is called from the file browser when clicking on music files (doesn't get easier). Then just adds that file to the queue-file and pops up one of those notifications on the lower right screen corner.
- Running a script when clicking on music files should be as simple as mucking about with the mime type association from whatever it is to a script. I think I've done this before, but I can't remember anything about it. This is probably doable.

- A pop up notification at the lower-right should be simple. Lots of existing scripts already do this sort of thing, so I'd bet that the os already has something cooked-in.

--

I would go further than all of this, and have any startup script overwrite the .asoundrc with a bluetooth-default one. Then on exit, return it to its earlier not-bluetooth state.

I'm also mildly interested in having some sort of alternate device, alternate mixer or whatever alsa does. Maybe it's possible to have a more complex .asoundrc, and then just have specific applications already set to use the bluetooth device. Then double-clicking a music file pops up your favourite media player, which is already configured to use bluetooth by default, but its preferences can be trivially changed to go back to regular alsa. Right now, I have alsa default to bluetooth, but I can adjust players to go back to using oss if I want playback on the pandora's speakers.
 
Last edited by a moderator:
Top