|
This commit introduces several things.
The original need was to fix the bluetooth SCO that was
not working on the minnow board. The reason was that this
board only has audio output through HDMI, but no input,
thus the "talk to bluetooth" stream could not be created.
So:
1) Introduces support for an optional USB mono microphone
When the mic is not detected, only the "listen" stream is
created (so that it is possible for the user to listen to
his/her audio messages).
So in the "capture" section, a new boolean "optional"
parameter is added.
2) mono to stereo conversion is not something straightforward
It requires the usage of a dedicated zone, so that mono
channel is duplicated to both the right and left channel.
This is why a 'front-seats-mono' zone is added to the json file.
3) CPU load and write 'quirk'
After having faced problems of heavy CPU load and write errors
on the playback device, the way sound output is done in the
softmixer has been reworked, to conform to ALSA examples.
It relies on a classic "'poll" followed by a call to
"snd_pcm_poll_descriptors_revents" that demangles the events.
On the minnow board, that does not work. Spurious null events,
that should be ignored, -must- be taken in account on the minnow
PCH device, else next writes often issue an EPIPE error,
leading to clipped sound.
Thus here a quirk section is added to the json file, and the
only quirk is QUIRK_BOGUS_POLL_REVENTS_DEMANGLING.
In the softmixer, when that quirk is set on a device, null
events are no longer ignored.
This commit must be taken together with:
- The fix for PCM ioplug in bluez-alsa
- The needed changes in softmixer
Change-Id: Ide1605e5480d773e2681ff762e3ecf4c84718fde
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Updated all the HALs to use the new bluealsa plugin,
that dynamically creates and deletes audio streams
upon bluetooth connections from mobile phones.
The plugin parameters consists in 2 sections.
The "sco" section is the place for voice calls.
It is where to specify which microphone to use
(this one must be declared in the captures devices),
and to what zone to do the playback (that zone must be defined,
too)
The "a2dp" is for music playback. The only needed paramter is
a playback zone. It can be different fromt the one used by SCO.
Additionnally, both SCO and A2DP have a "delayms" parameter
which is the size in milliseconds of the copy buffer for
the audio stream. The values set in this commit are good enough for
a demo, but can we optimized in the future.
Change-Id: I1c5da69c0de01d5dfdf852fa58372410f22e2a56
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|