LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
 
Search this Thread
Old 08-20-2014, 02:41 PM   #1
flyinggeorge
Member
 
Registered: Feb 2012
Location: United States
Distribution: Slackware 14.0
Posts: 159

Rep: Reputation: 3
Bluetooth headphones as an A2DP sink


Hello, all. I recently purchased a pair of bluetooth headphones and wish to set up my laptop (which runs slackware 14.0) to send audio to these headphones. I think this would make the headphones an A2DP sink.

Basically, I have been following generic instructions to complete this task.

http://wiki.gentoo.org/wiki/Bluetooth_Headset

My /etc/asound.conf
Code:
#pcm.bluetooth {
#       type bluetooth
#       device "48:C1:AC:F4:C2:98"
#       profile "auto"
#}

# First try autodetection:
@hooks [
        {
                func load
                files [
                        "/usr/share/alsa/bluetooth.conf"
                ]
                errors false
        }
]
My alsa restart command was slightly different than the wiki, but all was well. aplay -l still does not list any bluetooth connections.

Code:
bash-4.2$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: VT1802 Analog [VT1802 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: VT1802 Digital [VT1802 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: VT1802 HP [VT1802 HP]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
So, after setting my my asound.conf and pairing my headphones with the blueman-applet, I attempted to play a song using the syntax offered in the wiki:

Code:
mplayer -ao alsa:device=bluetooth *.mp3
Which returns this error:
Code:
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 54.21.101 (internal)
AUDIO: 44100 Hz, 2 ch, s16le, 966.8 kbit/68.51% (ratio: 120853->176400)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==========================================================================
[AO_ALSA] alsa-lib: dlmisc.c:236:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so
[AO_ALSA] Playback open error: No such device or address
Failed to initialize audio driver 'alsa:device=bluetooth'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video
This error is especially confusing because I do have the mentioned library installed.

Code:
locate libasound_module_pcm_bluetooth.so
/usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so
Why is this going wrong? Is there some configuration I am missing?
 
Old 08-20-2014, 03:05 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,679

Rep: Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563
Does mplayer work as root? Check that every part of the /usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so path is readable by your non-root user.
 
Old 08-20-2014, 11:50 PM   #3
flyinggeorge
Member
 
Registered: Feb 2012
Location: United States
Distribution: Slackware 14.0
Posts: 159

Original Poster
Rep: Reputation: 3
Code:
bash-4.2$ ls -l /usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so
-rwxr-xr-x 1 root root 138464 Jul 30  2013 /usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so
If I am reading this right, all users have access to read and execute.
 
Old 08-21-2014, 08:20 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,679

Rep: Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563
Yes, now check for o+rx on /usr/lib64/alsa-lib/, /usr/lib64/, /usr/, and / (though since it looks like you did that ls as a non-root user it is probably fine)

What does file `which mplayer` return? What does file /usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so return?
 
Old 08-21-2014, 11:56 AM   #5
flyinggeorge
Member
 
Registered: Feb 2012
Location: United States
Distribution: Slackware 14.0
Posts: 159

Original Poster
Rep: Reputation: 3
Okay, I'm not familiar with o, does this represent owned? Also I think you were asking for ls -l on those directories, so here is the output of that.

Code:
bash-4.2$ ls -l /usr/lib64/alsa-lib/
total 272
-rwxr-xr-x 1 root root   1093 Sep  9  2012 libasound_module_ctl_bluetooth.la
-rwxr-xr-x 1 root root 125504 Jul 30  2013 libasound_module_ctl_bluetooth.so
-rwxr-xr-x 1 root root   1093 Sep  9  2012 libasound_module_pcm_bluetooth.la
-rwxr-xr-x 1 root root 138464 Jul 30  2013 libasound_module_pcm_bluetooth.so
drwxr-xr-x 2 root root   4096 Sep 10  2012 smixer


bash-4.2$ ls -l /usr/
total 444
lrwxrwxrwx    1 root root      5 Jun  7  2013 X11 -> X11R6
drwsrwsrwt    2 root root   4096 Jun  7  2013 X11R6
lrwxrwxrwx    1 root root      8 Jun  7  2013 adm -> /var/adm
drwxr-xr-x    4 root root  94208 Aug 20 01:18 bin
lrwxrwxrwx    1 root root     10 Jun  7  2013 dict -> share/dict
drwxr-xr-x 1055 root root  36864 Aug 20 01:18 doc
drwxr-xr-x    2 root root   4096 Mar  2  2012 games
drwxr-xr-x  337 root root  36864 Aug 20 01:04 include
drwxr-xr-x    2 root root  12288 Sep 18  2013 info
drwxr-xr-x   64 root root  69632 Sep  7  2013 lib
drwxr-xr-x  180 root root 139264 Aug 20 01:18 lib64
drwxr-xr-x   18 root root   4096 Aug 20 01:18 libexec
drwxr-xr-x   17 root root   4096 Mar 13  2013 local
drwxr-xr-x   54 root root   4096 Aug 20 01:18 man
drwxr-xr-x    2 root root  16384 Sep 18  2013 sbin
drwxr-xr-x  239 root root   4096 Aug 20 01:18 share
lrwxrwxrwx    1 root root     10 Jun  7  2013 spool -> /var/spool
drwxr-xr-x    5 root root   4096 Jun 24 13:19 src
lrwxrwxrwx    1 root root      8 Jun  7  2013 tmp -> /var/tmp
drwxr-xr-x    4 root root   4096 Aug  4  2012 x86_64-slackware-linux


bash-4.2$ ls -l /
total 136
drwxr-xr-x   2 root root   4096 Jun 24 12:23 bin
drwxr-xr-x   2 root root   4096 Jun 24 12:03 boot
drwxr-xr-x  16 root root   5500 Aug 17 22:42 dev
drwxr-xr-x  95 root root  12288 Aug 20 13:32 etc
drwxr-xr-x  11  501 games  4096 Feb 19 22:09 glew-1.9.0
drwxr-xr-x   5 root root   4096 Dec 14  2013 home
drwxr-xr-x   2 root root   4096 Dec 19  2007 include
drwxr-xr-x   8 root root   4096 Aug 20 01:04 lib
drwxr-xr-x   2 root root  12288 Jun 24 12:24 lib64
drwx------   2 root root  16384 Jun  7  2013 lost+found
drwxr-xr-x   2 gene users  4096 Jul  3 22:29 lxdream-0.9.1-1.fc12
drwxr-xr-x  21 root root   4096 Jun  6 14:13 media
drwxr-xr-x  10 root root   4096 Sep 25  2006 mnt
drwxr-xr-x   3 root root   4096 May 29  2013 opt
drwxr-xr-x   3 root root   4096 Jul 11  2013 pentest
dr-xr-xr-x 219 root root      0 Aug 13 16:56 proc
drwx--x---  43 root root   4096 Aug 19 15:41 root
drwxr-xr-x   5 root root    100 Aug 13 21:01 run
drwxr-xr-x   2 root root  12288 Sep 18  2013 sbin
drwxr-xr-x   2 root root   4096 Jun 24 11:52 srv
drwxr-xr-x  13 root root      0 Aug 13 16:56 sys
drwxrwxrwt 303 root root  20480 Aug 21 05:47 tmp
drwxr-xr-x  17 root root   4096 Aug 20 01:18 usr
drwxr-xr-x  19 root root   4096 Aug  9 02:11 var
All of the above ls commands were run as my user (not root).


When you ask "what does file 'which mplayer' return?" I'm not sure if the syntax is '$file 'which mplayer' or if you mean to ask what does 'which mplayer' return. Because the former gives an error but the latter determines the position of the executable for mplayer.
Code:
bash-4.2$ which mplayer
/usr/bin/mplayer

bash-4.2$ file /usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so 
/usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x3c22a488e2337a8124c51f60bc215ad026ed8ccd, stripped
 
Old 08-21-2014, 06:21 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,679

Rep: Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563
o stands for other, see man chmod. Again just checking that regular users can read libasound_module_pcm_bluetooth.so and every part of the path down to it. Your previous post doesn't include the permissions on /usr nor / -- but they are probably permissive enough.

Code:
file `which mplayer`
is a command to run exactly (copy and paste, those are backticks not quotes for a reason, and there's no dollar sign). Checking to see if your mplayer binary is also 64-bit ELF. If it is, I'm out of ideas as to why ALSA wouldn't be able to open libasound_module_pcm_bluetooth.so.
 
Old 08-21-2014, 07:49 PM   #7
flyinggeorge
Member
 
Registered: Feb 2012
Location: United States
Distribution: Slackware 14.0
Posts: 159

Original Poster
Rep: Reputation: 3
My previous post does include ls -l output for /usr and /.

As for the other command, thank you for clearing up the confusion.

Code:
bash-4.2$ file `which mplayer`
/usr/bin/mplayer: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), stripped
It would appear that I am dealing with a 64bit executable. I too am clueless where to go from here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stereo bluetooth headphones vs Wired Headphones WHITE_POWER General 2 06-04-2013 03:35 PM
bluetooth a2dp stream ted_chou12 Linux - Software 1 03-25-2013 06:54 AM
[SOLVED] Bluetooth (A2DP) headphones in KDE dlachausse Slackware 4 02-06-2013 06:51 AM
Debian Squeeze: connect to A2DP (bluetooth) through command line math1985 Linux - Hardware 1 11-12-2012 05:14 PM
[SOLVED] bluetooth dongle with A2DP protocol RedNeck-LQ Linux - Hardware 2 01-21-2011 06:59 PM


All times are GMT -5. The time now is 08:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration