summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-plug-route.c
AgeCommit message (Collapse)AuthorFilesLines
2019-02-18plug route: added a calculation for the number of physical channelsThierry Bultel1-5/+16
Adds (mainly for debug purpose) a calculation on the actual number of physical channels that are used by the created ttable Change-Id: I5717046003851ebe297a494dcdd97c4d67e34d0b Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18pcm plugs: rework the alsa config cleanupThierry Bultel1-2/+11
The alsa config (for softvol, routes, rate conversion ...) was cleaned up by the owner stream or zone, at their deletion time. This was a mistake, because when the stream or zone creation was not complete, the cleanup of the configuration was not done. Instead of doing that, the config is attached to the plug objects as private data (in the AlsaPcmCtlT structure). Since the AlsaPcmCtlT are always recorded in the creation transaction, it is easy to call the cleaning callback (when it exists) when the transaction is deleted. Change-Id: I952871518a20bfe0be6398887bc747338cf574fb Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18alsa-api-pcm: added support of quirksThierry Bultel1-0/+4
Adds an optional array of quirks in the parameters of playback and captures. For now, the only known quirk is a needed workarround for writing sound output on the minnow board. Change-Id: I6c65d110a1f9333ccb77cd8f4eeb9c088d0d2eca Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-01-24Git submodule migration to separated librariesRomain Forlot1-19/+19
- Replace controller binder functions definition with the binder ones. and remove the last used submodules to use the separated libraries. - Add liburcu as a project dependency in addition to the others ones. Bug-AGL: SPEC-2139 Change-Id: If46eed24018e28e58d1e62397f4355d2aa46a58e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-01-16bluetooth sco: fixed the softvol open errorThierry Bultel1-1/+1
This fixes #SPEC-2125. The fix consists in specifying the number of channels in the softvol pcm configuration. When it is not set, the libasound detects a configuration mismatch (the default number of channels being 2), and attempts to remove the sotfvol control, which for unknown reason, (broken support on kernel side ?) randomly fails. Change-Id: I816b623715e413452e6793ee519e97fac6fdde43 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-12-22Implemented the bug cleanup at application exitStephane Desneux1-1/+11
Fixes most memory leaks in softmixer. The concept of 'transaction' for dynamic streams has been generalized to the objects created at startup. The cleanup is done via a handle set through a atexit() call. Also added a missing strdup in alsa-api-loop, that fixes a double free. Warning, the bluez-alsa PCM are not closed in this version. This is intentional due to a BUG in the bluealsa ioplug PCM, that crashes upon close (pthread_cancel is used to terminate the io_thread and things get very bad. I have a pending fix for that, relying on a cancellation pipe, but deeper testing must be done). As an effect, only one phone call can be made, else 4a needs to be restarted Change-Id: Idb84cafe15f17c0ef02fcc70296d541dc55a2dcf Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2018-12-19Add support for bluetooth telephonyguppy_6.99.3guppy/6.99.36.99.3Thierry Bultel1-69/+145
This adds support for bluetooth telephony. A big rework in the softmixer internals has been mandatory, in order to support dynamic streams creation and deletions. Bluetooth telephony relies on the recent evolutions of bluez-alsa, the most important one being the support of HFP over Ofono. The softmixer opens PCM ioplugs provided by bluez-alsa. Bluetooth SCO needs 2 streams, one for listening and the other for talking. These streams are created upon requests sent by the hal-manager. The hal manager subscribes for bluez-alsa events and request the list of availalble transports. For each "attach" transaction verb, the softmixer maintains a list of the all created objects (sources, sinks, zones, ramps, streams, and more) Additionnally, it creates a new verb when the attach succeeds, that verb is typically something like "sco_XX:XX:XX:XX:XX:XX", and the only supported action at the present time is {"action":"remove"}, that performs all the cleanup of the registered objects. Change-Id: I1b119e6c079e60daf771e63c083a1ef33a39f379 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-06-22route plugin:fixed mismatch with several sound cardsThierry Bultel1-16/+40
Also sets the right number of channels. Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-06-16Use correct chanel number when creating PCMhal-rc2-sandboxJonathan Aillet1-2/+2
Use correct chanel number when creating PCM. Change-Id: I17ac0273f9a6eec1d3b49845f579495f2cdcf9d7 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-06-11Fixed compilation warning with _FORTIFY_SOURCE=2Thierry Bultel1-4/+9
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-06-10Cleanup and added return of previous volume when setting new valuefulup1-1/+1
2018-06-04Move to Dynamic Mixer API (work in progress)Fulup Ar Foll1-67/+108
2018-05-18Implements volume rampingFulup Ar Foll1-2/+2
2018-05-17Initial version with dynamic APIsFulup Ar Foll1-4/+7
2018-05-13First testable version.Fulup Ar Foll1-2/+2
Mixing with volume and mute per audio role works.
2018-05-13First version muxing multiple audio streams.Fulup Ar Foll1-1/+1
2018-05-13Initial version with softvol,Route,Multi,DmixFulup Ar Foll1-0/+140