Ticket #113 (assigned defect)

Opened 8 years ago

Last modified 5 years ago

bluetooth headset support

Reported by: laforge@… Owned by: openmoko-devel
Priority: high Milestone:
Component: bluez Version: current svn head
Severity: critical Keywords:
Cc: buglog@…, marcel@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible:

Description

we need to configure the audio codec (via ASoC) in a way that it can
send/receive audio from/to the bluetooth chip via the codec interface, rather
than USB.

Change History

comment:1 Changed 7 years ago by marcel@…

  • Status changed from new to assigned

The overall idea is to have a generic bluetoothd-service-audio that can handle
A2DP and headset/handsfree profiles. However at the moment a separate headset
service exists that targets at embedded devices with SCO over PCM routing. This
actually only handles the headset/handsfree control channel. The audio part goes
directly via PCM to the codec. The final routing to the speaker or GSM has to be
done by another process and should be controllable by the UI.

comment:2 Changed 7 years ago by mickey@…

any news on that?

comment:3 Changed 7 years ago by marcel@…

The current bluez-utils CVS can be build with --enable-headset to compile and
install the Bluetooth headset service (for SCO over PCM).

A call to Manager.ActivateService?("headset") will start the headset service or
the /etc/bluetooth/headset.service file has to set autostart=true.

The daemon will follow the D-Bus specification that can be found in
audio-api.txt in the bluez-utils source code.

So initially you have to call Manager.CreateHeadset?("00:aa:bb:cc:dd:ee") to
setup the Bluetooth headset. This has be done only once and can be done via a
Bluetooth setup wizard.

After that step the Manager.DefaultHeadset?() will return the object path for the
configured default headset. It is possible to configure more than one, but that
should be the unlikely case. However Manager.ListHeadsets?() allows you to list
all object paths of all configured headsets.

After that you can use Headset.Connect() on the headset object path to connect
the headset. At this point the headset will be connected and the SCO connection
will have been created. However the SCO audio packets will go over the PCM and
you need to setup the correct routing on the codec.

See the full audio-api.txt description for other methods and signals like call
indication etc.

comment:4 Changed 7 years ago by bmidgley@…

fwiw, in order to get the correct routing from the codec, we will use

alsactl -f gsmbluetooth.state restore

but in the future that may change if openmoko gets an audio manager. There
really does need to be a manager so plugging in a wired headset reroutes audio
to it for example.

Currently there is no .state file that configures the codec so system audio
connects to bluetooth. That would be very convenient in testing and development.
(I'm filing a separate ticket for that)

comment:5 Changed 7 years ago by willie_chen@…

  • Owner changed from marcel@… to michael@…
  • Status changed from assigned to new

Hi Machiael,
Help us follow this issue.

comment:6 Changed 7 years ago by willie_chen@…

  • Cc marcel@… added
  • Severity changed from normal to critical

We need this to test ACM interface between BT and WM8753.

comment:7 Changed 6 years ago by roh

  • Owner changed from michael@… to michael

comment:8 Changed 6 years ago by john_lee

  • Status changed from new to assigned
  • Owner changed from michael to openmoko-devel
  • HasPatchForReview unset

comment:9 Changed 5 years ago by lindi

What's the status of this bug? Has somebody already managed to do the first successful test call with a bluetooth headset?

Note: See TracTickets for help on using tickets.