ALSA plugin isn't used in Bluetooth on Android.
There is a seperate liba2dp.c which does what alsa plugin does.
So the liba2dp.so needs to be loaded, which links to the A2dpAudioInterface
>
> pcm.rawbluetooth {
> @args [ ADDRESS ]
> @args.ADDRESS {
> type string
> }
> type bluetooth
> device $ADDRESS
> }
>
> pcm.bluetooth {
> @args [ ADDRESS ]
> @args.ADDRESS {
> type string
> }
> type plug
> slave {
> pcm {
> type bluetooth
> device $ADDRESS
> }
> }
> }
>
> But I can't understand who uses this file to configure ALSA.
> When HSP/HFP connection had established class BluetoothHandsfree calls
> methods of AudioManager like setParameters, setBluetoothScoOn
>
> Does AudioManager configure ALSA ?
>
> --
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
>
>
--
--Pavan Savoy
In A2DP the music data needs to go thru' UART (hci0 for BlueZ) and
hence the liba2dp.
i.e the Music Player needs to communicate with Bluetoothd.
For HFP/HSP, Android's SCO implementation of the audio gateway talks
to blueZ's headset implementation over DBUS for control and connection
establishment and uses vendor defined logic for voice data.
As in the data coming/going in/out of modem into BT-chip is vendor
specific implementation and Android doesn't restrict in any way.
humn, May be I am presenting it all wrong.
HFP/HSP has 2 parts right?
control or signalling which is an rfcomm channel
& SCO which is the data channel.
signalling via the rfcomm for the hfp/hsp happens via the bluetoothd over dbus.
SCO happens the way you mentioned it, when there is an incoming call.
The data pushed to BT chip via various means (not UART) is
encapsulated to SCO and sent over air.
This various means of pushing data to BT chip is what I meant by
vendor specific...
A2DP on the other hand, has both signalling and the data going over
the UART, which is at sink.c for control via dbus and liba2dp for the
data.
I am yet to see implementation for the SCO in android to send PCM data
over hci0 (say something like USB interface)....
>> For HFP/HSP, Android's SCO implementation of the audio gateway talks
>> to blueZ's headset implementation over DBUS for control and connection
>> establishment and uses vendor defined logic for voice data.
>> As in the data coming/going in/out of modem into BT-chip is vendor
>> specific implementation and Android doesn't restrict in any way.
>
>> --Pavan Savoy
>
> Wow! Is it mean that low-level android audio system directly sends/
> receives pcm data into/from "vendor
>> specific implementation" and receive without Android/bluez participation?
> And does android.media AndroidManager.java configure this
> communication?
>
> And really, why these profiles in android were so hardly changed ( AT
> commands parsing and sco/rfcomm connection transfered into android
> framework from bluez ) ? =)
>
> And thank you very much, you radically change my vision of these
> profiles =)
>
I wouldn't think any other drivers are in works - except for handling
signaling channel stuff.
However, I would let the Android framework experts comment on what can
be done or should be done for say applications like Skype or any other
VOIP apps to make use of Bluetooth SCO headset.
I suppose this would require the Voice data to be accessible from
Android somewhere ???
Any app which wants to use SCO audio, should use the AudioManager
public APIs to start and stop Bluetooth SCO.
That would be a2dp, However on the SCO front,
I am still in doubt how an application like skype can pick up voice
data from an wlan0/rmnet0/pp0 sort of interface and send it across to
BT chip ?
I suppose profiles are getting mixed up here :) between my question
and alex's concern....
HCI is not designed for SCO connections. SCO data is usually received
from modem and passed though CPU and get into BT module directly on
hardware. As you just mentioned, it is vendor specific stuff, however,
it is going on a linkage connected with several I2S/PCM routing. Since
SCO data should be some kind of realtime, it is usually only 8K sample
rate, this route is handled by vendor's HAL when any stream is defined
in this format with setParameters().
> I am yet to see implementation for the SCO in android to send PCM data
> over hci0 (say something like USB interface)....
HCI is not designed for SCO connections. SCO data is usually received
from modem and passed though CPU and get into BT module directly on
hardware. As you just mentioned, it is vendor specific stuff, however,
it is going on a linkage connected with several I2S/PCM routing. Since
SCO data should be some kind of realtime, it is usually only 8K sample
rate, this route is handled by vendor's HAL when any stream is defined
in this format with setParameters().