PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : kabellos auch auf Linux Musik abspielen



sisqonrw
05.12.09, 17:57
Hi, ich habe den Samsung HT-Z320 jetzt gekauft und bei mir und angeschlossen. Über Handy kann ich ohne Probleme Musik abspielen. Der Sound von Videos ist auch zu hören. Mehr kann ich nicht sagen, da ich kein TV angeschlossen habe.

Jetzt wollte ich über mein Notebook auf Kubuntu es probieren. Mit dem Bluetooth Dongle findet der den Samsung HT-Z320 und ich kann eine Verbindung herstellen. Der spielt aber über die Mediaplayer VLC oder Amarok die Lieder nicht über die Anlage.

Unter Vista klappt es ohne Probleme! Unter Kubuntu müsste es doch auch gehen.

Hat das was mit A2DP zu tun?

Grüße

ThorstenHirsch
05.12.09, 18:20
Lassen wir mal die ganzen Produktnamen weg: du willst den Sound deines Rechners/Laptops über Bluetooth an deine neue Stereoanlage senden. Die Stereoanlage unterstützt Bluetooth und - wie du richtig erkannt hast - benutzt A2DP.

Angeblich funktioniert das unter Linux sogar schon länger als unter Windows und Mac OS X. Hier steht wie's geht. (http://blog.schneidexe.de/2008/08/drahtloser-stereosound-unter-ubuntu-mit.html)

buzz768
05.12.09, 18:25
http://wiki.bluez.org/wiki/HOWTO/AudioDevices
Zwischen A2DP und SCO umschalten kannst du mit Blueman.
edit: ups, nicht genau gelesen, ist ja kein Headset.. sollte aber ebenso funktionieren.
Die in #2 verlinkte Anleitung ist m.E. nicht mehr aktuell.

sisqonrw
05.12.09, 22:29
ich habe in meiner

~/.asoundrc

Datei folgendes mit meiner dvice adresse eingetragen.

pcm.bluetooth {
type bluetooth
device 00:11:22:33:44:55
}

was muss ich jetzt machen?

nutze vlc player, kaffeine und amarok

buzz768
06.12.09, 10:07
Du hast also statt 00:11:22:33:44:55 die Adresse deiner Stereoanlage eingetragen, okay.

http://www.linuxforen.de/forums/showthread.php?t=251916#6

Einstellungen für amarok und kaffeine sind in dem Link in #3 beschrieben (gelten bei neueren Versionen der Programme vermutlich nicht mehr exakt). Für vlc musst du laut Google die Datei ~/.vlc/vlcrc bearbeiten


# ALSA Devicename (Text)
alsadev=bluetooth

sisqonrw
06.12.09, 18:28
Ok noch mal von vorn. Irgend etwas mache ich falsch.

ich gehe nach dieser Anleitung. Leider ist mein Englisch nicht so gut.

http://wiki.bluez.org/wiki/HOWTO/AudioDevices#python

Der Bluetooth Dongle steckt im Notebook.

Habe Kbluetooth geladen und mit Samsung HT-Z320 verbunden. Die Anlage ist auch auf Bluetooth eingestellt. Der Meldet Ready.

Dann habe ich ~/.asoundrc editiert.


hcitool scan
Scanning ...
00:16:6C:6A:E8:3F Samsung Home Theater

habe in ~/.asoundrc


# ALSA library configuration file

# Include settings that are under the control of asoundconf(1).
# (To disable these settings, comment out this line.)
</home/salsero/.asoundrc.asoundconf>

pcm.bluetooth {
type bluetooth
device 00:16:6C:6A:E8:3F
}

stehen.

war das bis hier hin. Alles richtig? Danach weiß ich nicht genau was kommt. Vielleicht kann mir jemand weiterhelfen

buzz768
06.12.09, 19:09
Korrekt soweit. Nun musst du noch die Audio-Player so konfigurieren, dass sie das alsa-bluetooth Device verwenden. Wie das bei VLC geht, habe ich oben beschrieben. Probier doch einfach mal mit aplay eine wav-Datei abzuspielen


aplay -D bluetooth -f S16_LE audiodatei.wav

Oder eine mp3-Datei mit mplayer


mplayer -ao alsa:device=bluetooth audiodatei.mp3

sisqonrw
06.12.09, 19:25
Da ich VLC nutze habe ich folgendes in vlccr eingetragen:


# ALSA Devicename (Text)
#alsadev=default

alsadev=a2dpd

und auch:


# ALSA Devicename (Text)
#alsadev=default

alsadev=bluetooth

leider klappt es immer noch nicht :(

beim Test kommt folgendes:


aplay -D bluetooth -f S16_LE test.mp3
ALSA lib audio/pcm_bluetooth.c:1522:(bluetooth_parse_config) Unknown field slave
aplay: main:608: Fehler beim Öffnen des Audiogerätes: Invalid argument
salsero@salsero-laptop:~$ mplayer -ao alsa:device=bluetooth test.mp3
MPlayer SVN-r29237-4.4.1 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing test.mp3.
Audio only file format detected.
================================================== ========================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
mpg123: Can't rewind stream by 1700 bits!
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
================================================== ========================
[AO_ALSA] alsa-lib: audio/pcm_bluetooth.c:1522:(bluetooth_parse_config) Unknown field slave
[AO_ALSA] Playback open error: Invalid argument
Failed to initialize audio driver 'alsa:device=bluetooth'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


Exiting... (End of file)

sisqonrw
06.12.09, 19:28
muss ich das hier vorher auch ausführen:


salsero@salsero-laptop:~$ hcitool scan
Scanning ...
00:16:6C:6A:E8:3F Samsung Home Theater
salsero@salsero-laptop:~$ sudo a2dpd
[sudo] password for salsero:
A2DPD[20:27:16.281]: init_ipc: Selected IPC: unix, addr=127.0.0.1, bcst=127.0.0.255, port=21453
A2DPD[20:27:16.281]: make_daemon_process: a2dpd [Jul 21 2007 19:52:21] starting ...
A2DPD[20:27:16.296]: main: (errno=9:Bad file descriptor)a2dpd addr=00:16:6C:6A:E8:3F timer=0 us [Jul 21 2007 19:52:24]
A2DPD[20:27:16.296]: a2dpd_signal_init: Getting on DBUS
A2DPD[20:27:16.300]: a2dpd_signal_init: Installing watch
A2DPD[20:27:16.300]: add_dbus_watch: Added watch 0 0x97d9738 disabled
A2DPD[20:27:16.300]: add_dbus_watch: Added watch 1 0x97d9760 enabled
A2DPD[20:27:16.300]: a2dpd_signal_init: Registering object path: /com/access/a2dpd
A2DPD[20:27:16.300]: a2dpd_signal_init: Acquiring service: com.access.a2dpd
A2DPD[20:27:16.301]: a2dpd_signal_init: OK
A2DPD[20:27:16.301]: a2dpd_signal_init: OK
A2DPD[20:27:16.301]: a2dpd_register_sdp: Start
A2DPD[20:27:16.301]: add_avrtg:
A2DPD[20:27:16.302]: add_a2source:
A2DPD[20:27:16.302]: a2dpd_register_sdp: OK
A2DPD[20:27:16.302]: main_loop:
A2DPD[20:27:16.302]: make_server_socket:
A2DPD[20:27:16.302]: main_loop: (errno=98:Address already in use)Cannot get UNIX socket
A2DPD[20:27:16.302]: a2dpd_unregister_sdp: Start
A2DPD[20:27:16.303]: a2dpd_unregister_sdp: OK
A2DPD[20:27:16.303]: a2dpd_signal_kill: OK
A2DPD[20:27:16.303]: main: Terminated succesfully


auch wenn ich das mache, kommt immer noch kein Sound.

sisqonrw
06.12.09, 19:47
wenn ich anstatt kbluetooth den bluetooth-applet nutze kommt diese Meldung, wenn ich zur Anlage eine Verbindung herstellen möchte:

sieh Anhang

buzz768
07.12.09, 08:38
http://forums.fedoraforum.org/showthread.php?t=190468


I have my linux box streaming to my samsung home theater now!

Möglich sollte es also sein..

sisqonrw
07.12.09, 12:29
Es gibt so viele Anleitungen. Bin richtig durcheinander.

Muss in vlcrc

alsadev=bluetooth
oder
alsadev=a2dpd

stehen?

muss ich vor dem abspielen

sudo a2dpd

ausführen?

Sind follgende Einstellungen korrekt?


[a2dpd]
#
# Rate
# use 32000 if your headset seems to not support 44100 (HP/Logitech works well at 44100, Sonorix at 32000)
# However, 44100 is mandatory
# If using SCO, then 8000hz is the value needed.
# if the plugin do not give the 8000hz stream, then the conversion will be done by the daemon
# Until we use a real resample library, we won't get a good quality, this is prototype software.
#
rate=44100
#rate=32000

# buggy if I remember well
#channels=2

#
# plugin-rate default is the rate used between the plugin and the daemon
# if this value is not 0 then alsa will convert all stream to the specified rate and then send it to the daemon
# if this value is 0, then alsa will do no conversion at all, the daemon will do it's own resampling.
# This "features" is disabled because of the crappy quality of the daemon resampler
# For example, to test a2dpd resampling from 32000 to 44100 use plugin-rate=32000 and rate=44100
#plugin-rate=32000

# Allows to specify the sbc bitpool, this can help reducing bandwith
# 8 Allows to run on a 115200 bauds with corresponding quality ;)
# 64 needs USB or 921600 bauds
# Recommended value from Bluetooth spec. is 53
sbcbitpool=32

# flags that will later be combinable
# 1: display bandwith each seconds.
# 3: current state
flags=0

# Recommended
enablereversestereo=1

# Automatically connect to selected headset if a stream if started
# not recommended if running on battery ;)
enableautoconnect=1

# Automatically disconnect after a timeout (seconds)
timeout=20

#
# AVRCP Commands to run
# If these entries are emptied, then some keyboard entry will be sent to /dev/uinput
#
cmdplay=xmms --play
cmdpause=xmms --pause
cmdprev=xmms --rew
cmdnext=xmms --fwd
cmdnew=xmms --play
cmdstop=xmms --stop
#cmdplay=dcop amarok player play
#cmdpause=dcop amarok player pause
#cmdprev=dcop amarok player prev
#cmdnext=dcop amarok player next
#cmdnew=dcop amarok player play
#cmdstop=dcop amarok player stop

# Put to 0 to ignore AVRCP (if your computer freezes when commands are received)
enableavrcp=1

#
# Audio routing
#
# If set to 1 (at a2dp startup only) a2dp will reread configuration file
#*for audio routing changes each second
# This is now deprecated and should not be used, moreover, if the address is changed using dbus
# or a2dpd_ctl, then the file is reread and the change is lost...
enablerereadconfig=0

# Display debug traces or not
enabledebug=1

# Redirect stdout to this file
#logfile=/dev/null

# Poll stdin for control commands ('c'onnect/'s'tart/'p'ause/'d'isconnect/'a'utoconnect)
# Use a2dpd_ctl instead
enablestdin=0

# 0 => Bluetooth A2DP Sink
# 1 => Alsa
enableredirectalsa=0

# Your bluetooth headset address
address=00:16:6C:6A:E8:3F

# Address of your alsa output (default : plughw:0,0) you have to know what to do
alsaoutput=

muss ich auf Bluetooth A2DPD Sink einstellen oder auf ALSA?

sind meine Multimedia Einstellungen richtig? Sie Anhang

Muss ich kbluetooth nutzen oder bluetooth-applet?

Vielleicht ist das nur ein kleiner Fehler, warum es nicht geht.

buzz768
08.12.09, 17:38
Ich habe niemals a2dpd ausgeführt und es gibt bei mir auch keine ~/.a2dprc. Auch pulseaudio verwende ich nicht. Ich hatte lediglich ~/.asoundrc wie beschrieben editiert. Probeweise habe ich mal alles unter /var/lib/bluetooth/ gelöscht. Nach Anstecken des Bluetooth-Sticks läuft der Bluetooth-Dämon von selbst


ps aux| grep bluetooth
root 5887 0.0 0.0 0 0 ? S< 18:05 0:00 [bluetooth]
root 5889 0.0 0.2 3972 1948 ? S<s 18:05 0:00 /usr/sbin/bluetoothd --udev

Nun starte ich Blueman durch Eingabe von blueman-manager. Unter Adapter-> Einstellungen stelle ich "immer sichtbar" ein. Ich schalte dann das Headset in den Pairing-Modus und starte mit Blueman die Suche nach Geräten. Rechtsklick auf das gefundene Headset->Kopplung. Nach der PIN-Eingabe kann ich dann mit mplayer oder aplay wie oben beschrieben Musik auf dem Headset abspielen. Die Audio-Ausgabe von VLC landet aber trotz alsadev=bluetooth in ~/.vlc/vlcrc nicht auf dem Headset.

bluez 4.58
alsa-lib 1.0.21.a

sisqonrw
08.12.09, 20:11
Ich bin kurz vor dem Ziel. Auf der Anlage steht Acer. DAs ist mein Notebook.

der Mplayer meldet das hier:


mplayer -ao alsa:device=bluetooth test.mp3MPlayer SVN-r29237-4.4.1 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing test.mp3.
Audio only file format detected.
================================================== ========================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
mpg123: Can't rewind stream by 1700 bits!
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
================================================== ========================
[AO_ALSA] alsa-lib: audio/pcm_bluetooth.c:1522:(bluetooth_parse_config) Unknown field slave
[AO_ALSA] Playback open error: Invalid argument
Failed to initialize audio driver 'alsa:device=bluetooth'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


Exiting... (End of file)


oder

AO: [pulse] init failed: internal error

Habe ich es richtig verstanden, dass du mit VLC es auch nciht zum laufen bekommst?

buzz768
08.12.09, 20:36
Habe ich es richtig verstanden, dass du mit VLC es auch nciht zum laufen bekommst?
Ja, richtig, habe aber nicht weiter probiert


$ mplayer -ao alsa:device=bluetooth test.mp3
MPlayer SVN-r29776-4.4.1 (C) 2000-2009 MPlayer Team
141 audio & 306 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing test.mp3.
Audio only file format detected.
================================================== ========================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
================================================== ========================
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...

Hast du eigentlich das Paket bluez-alsa installiert?

sisqonrw
08.12.09, 20:52
ja habe ich

ist die Audioeinstellung richtig? Ist die Reihenfolge richtig? Spielt die eine Rolle?

buzz768
08.12.09, 21:00
http://forum.ubuntuusers.de/topic/seit-9-10-kein-audio-ueber-bluetooth/
oder schon gelesen?
Zu der Audioeinstellung kann ich nichts sagen, habe hier kein KDE.

sisqonrw
08.12.09, 22:20
weisst du ob im Backend Xine oder Gstreamer vorgezogen werden soll oder spielt das keine Rolle?

Habe blueman
https://launchpad.net/~blueman/+archive/ppa

neu installiert.

Bei https://launchpad.net/~themuso/+archive/ppa bin ich mir nicht sicher, weil das ja für Jaunty ist. Soll ich das installieren?

sisqonrw
09.12.09, 11:48
nach einem Neustart ging es. Danke für die Hilfe!