a2dp to stereo speakers

Plugging in devices such as LAN adapters, Wi-Fi cards, printers, etc. to Arch Linux ARM.

Re: a2dp to stereo speakers

Postby ygator » Wed Aug 03, 2011 8:42 pm

One of the bt dongles was recognized on an ubuntu install and I was able to play music to the speakers fine.
So that says the hardware can do it, but there is software and/or configuration issue.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: a2dp to stereo speakers

Postby ygator » Fri Aug 05, 2011 3:36 pm

Okay I think I have got this solved. I bet you have a custom kernel that has Bluetooth SCO compiled into it.

I was adding Minix FS support to my custom kernel and thought I would look at what Bluetooth options there were.
Sure enough there was Bluetooth SCO not compiled in.

Do you know if there are any other options you added to your kernel?
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: a2dp to stereo speakers

Postby pepedog » Fri Aug 05, 2011 4:15 pm

My kernel is a bit rare, trimslice custom.
What is yours and what is your plug? Standard kernel26? which is based mainly on https://raw.github.com/archlinuxarm/PKGBUILDs/master/core/kernel26/2.6.39.config
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: a2dp to stereo speakers

Postby ygator » Fri Aug 05, 2011 10:56 pm

I am on a dockstar and normally use the standard kernel.
However, I have a dockstar I use wireless on and the usb adapter I have is n, but the driver disallows it from doing n.
So I made the patch below. I am now going to recompile a new kernel with this patch, plus minix fs and bt sco support and give that a try.

I am trying to setup an easy way to build a kernel.
I made a shell script to get the kernel files
$this->bbcode_second_pass_code('', '#!/bin/bash
LOC=https://github.com/archlinuxarm/PKGBUILDs/raw/master/core/kernel26/
for f in 2.6.39.config PKGBUILD archlinuxarm.patch kernel26.install kernel26.preset
do
wget ${LOC}$f
done
')

I've added my patch to the PKGBUILD and then did a makepkg --asroot -As
I used to run it with -Acs, but that wipe everything out after it was done.
This works, but I want to leave everything out so it does not take another 4 hours to rebuild.
Does anyone know the command to rebuild and package it up without it trying to reapply the patches and everything else?



$this->bbcode_second_pass_code('', '--- linux-2.6.39.3/drivers/staging/rtl8712/usb_intf.c.0 2011-07-09 02:16:06.000000000 -0400
+++ linux-2.6.39.3/drivers/staging/rtl8712/usb_intf.c 2011-07-15 22:26:35.000000000 -0400
@@ -59,7 +59,7 @@
{USB_DEVICE(0x07B8, 0x8188)},
/* ASUS */
{USB_DEVICE(0x0B05, 0x1786)},
- {USB_DEVICE(0x0B05, 0x1791)}, /* 11n mode disable */
+ {USB_DEVICE(0x0B05, 0x1791)},
/* Belkin */
{USB_DEVICE(0x050D, 0x945A)},
/* Corega */
@@ -170,8 +170,6 @@
MODULE_DEVICE_TABLE(usb, rtl871x_usb_id_tbl);

static struct specific_device_id specific_device_id_tbl[] = {
- {.idVendor = 0x0b05, .idProduct = 0x1791,
- .flags = SPEC_DEV_ID_DISABLE_HT},
{.idVendor = 0x0df6, .idProduct = 0x0059,
.flags = SPEC_DEV_ID_DISABLE_HT},
{.idVendor = 0x13d3, .idProduct = 0x3306,
')
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: a2dp to stereo speakers

Postby pepedog » Fri Aug 05, 2011 11:51 pm

You could ask for this to be added in next kernel
This would be easier for me
$this->bbcode_second_pass_code('', 'pacman -S git
git clone https://github.com/archlinuxarm/PKGBUILDs.git
cd PKGBUILDs/core/kernel26')
Un comment make menuconfig, and add your patch and stuff

4 hours, have you considered screen? Anyway, this creates the entire package, Inc your patch and extra modules, no need to fiddle with anything
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: a2dp to stereo speakers

Postby ygator » Sat Aug 06, 2011 12:17 am

Getting closer...

Trying to play file to a Motorola Headset
$this->bbcode_second_pass_code('', '[root@dockstar ~]# aplay -D bluetooth *.wav
Playing WAVE 'Roland-GR-1-Pick-Bass-2-C4.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1065: Channels count non available
[root@dockstar ~]# aplay -D plug:bluetooth *.wav
Playing WAVE 'Roland-GR-1-Pick-Bass-2-C4.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_START_STREAM failed : Success(0)
ALSA lib audio/pcm_bluetooth.c:1572:(audioservice_recv) Too short (1 bytes) IPC packet from bluetoothd
aplay: set_params:1123: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: 125000
PERIOD_SIZE: (5512 5513)
PERIOD_BYTES: (22048 22052)
PERIODS: (3 5)
BUFFER_TIME: 500000
BUFFER_SIZE: 22050
BUFFER_BYTES: 88200
TICK_TIME: 0
')

Trying to play to by Bluetooth speakers (BT90S)
$this->bbcode_second_pass_code('', '[root@dockstar etc]# aplay -D bluetooth *.wav
ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
aplay: main:660: audio open error: Input/output error
[root@dockstar etc]# aplay -D plug:bluetooth *.wav
ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
aplay: main:660: audio open error: Input/output error
')
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: a2dp to stereo speakers

Postby ygator » Sat Aug 06, 2011 1:03 am

Here is what I am now getting when I plug in my bt dongle. This is just after a reboot and I have not start dbus or bluetooth.

$this->bbcode_second_pass_code('', '[ 140.422291] usb 1-1.3.2: new full speed USB device number 9 using orion-ehci
[ 140.558619] Bluetooth: Atheros AR30xx firmware driver ver 1.0
[ 140.915944] usbcore: registered new interface driver ath3k
[ 140.958020] usb 1-1.3.2: USB disconnect, device number 9
[ 142.221416] usb 1-1.3.2: new full speed USB device number 10 using orion-ehci
[ 142.462174] Bluetooth: Core ver 2.16
[ 142.466048] NET: Registered protocol family 31
[ 142.466059] Bluetooth: HCI device and connection manager initialized
[ 142.466071] Bluetooth: HCI socket layer initialized
[ 142.466079] Bluetooth: L2CAP socket layer initialized
[ 142.466224] Bluetooth: SCO socket layer initialized
[ 142.491024] Bluetooth: Generic Bluetooth USB driver ver 0.6
[ 142.497714] usbcore: registered new interface driver btusb
')
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: a2dp to stereo speakers

Postby ygator » Sat Aug 06, 2011 1:45 am

Success. I went and re-paired the devices and now it is working (at least with the speakers). I did do some other changes, but it may have just been the re-pairing that did it. At some point I will do a fresh install and make sure.

I am also able to play mp3 files with: mplayer -ao alsa:device=btspeakers music.mp3
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: a2dp to stereo speakers

Postby pepedog » Sat Aug 06, 2011 11:14 am

Great.
If you hack the /etc/asound.conf you won't need -ao alsa:device=btspeakers
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: a2dp to stereo speakers

Postby ygator » Sat Aug 06, 2011 4:59 pm

Hack it how?

I also have never gotten speak to work out a sound device either, but I can make the output of espeak go to a wav file and then play the wav file.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 12 guests