Age | Commit message (Collapse) | Author | Files | Lines |
|
When a sound card has multiple devices, it is invalid to set
the slave name of the dmix as "hw:cardname" because alsa does
not know which device to use.
The fix consists in using the device number, when it is given.
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
This adds sound playback for incoming sound from
connected bluetooth devices.
In this version, the softmixer relies on a modified
bluez-alsa version (https://github.com/iotbzh/bluez-alsa),
that provides an ioplug PCM bluezalsa connection proxy.
The softmixer api has a new verb to dynamically set the
device to listen to:
afb-client-demo ws://localhost:1234/api?token=\uuid=123 smixer bluezalsa_dev '{"interface":"hci0", "device":"F6:32:15:2A:80:70", "profile":"a2dp"}'
In this way it is possible to switch from a bluezalsa audio source to
another without any further configuration.
For now, only interface hci0 is supported.
This commit also migrates the softmixer binding to API v3
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Changes for app-afb-helpers-submodule:
* f0ce5b6 wrap-json: Fix duplicated lines in header file
* 764c355 Add '@' as binder middle name separator.
* 74be4cc Enhance 'wrap_json_clone_depth' description
* a37225f Fix: use of GetBindingDirPath without dynapi
* 4f99d16 Retrieve directory list from environment variables
* f46a0dc Remove the file .gitmodules
Changes for app-controller-submodule:
* 4e30eb1 New defaults useful functions on lua table
* 61cbc9a More precise log message when loading a Lua file
* 535df7f Fix: wrong legacy function signature
* b79a761 Split loading JSON controller file.
* c3d7de2 Release arguments once C function returned.
* a58d83b Fix : typo introduced in a previous commit.
* 86f65bd Fixed character counting that was shortening paths
* e32d98c Keep json unmodified during action execution
* 88892db Use prefix variable to find controller's plugins
Changes for app-templates:
* 9c1a0fb Fix: interpreted '&' character
* 9202fac More accurate comment about widget template file.
* f94e45e Align sample on actual default compile options
* d0acc2a Add support to binding version 3.
* 6fb3846 Warning if not using wgtpkg-pack to make a widget
* 35f3af1 Rework CMAKE_INSTALL_PREFIX and INSTALL_PREFIX var
* 332f377 Be able to overwrite BUILD_TYPE using CLI
* 1ec7531 Use CACHE variable for other common CMAKE variable
* 0880356 Fix:: wrong wgt using RELEASE BUILD TYPE
Change-Id: If6597632b9f719fcfd476697d1fd2332742d9801
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
|
|
Moves the log level of the message from info to debug.
Change-Id: I348421a17875b9061255c3b353e27070b0068c3b
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Now uses two threads for in the playing loop
The first one reads from the capture device (ie, a phys. capture, or snd_aloop) and writes
data to a circular buffer. The second one gets data from the circular buffer and outputs
it to the playback. This model solves a lot of correlated timing bugs between read & write
tasks.
The read tasks only wakes up the write task when the buffer is 80% full.
The buffer size big enough to hold 2 seconds of sound.
The mute implementation has also been simplified, since it has been found out that it was possible
to recover from an interrupted read, by calling snd_pcm_start additionnally to snd_pcm_prepare.
Thus, the mute code consists in listening to an extra file descriptor in the read loop.
Reading from that descriptor gives the mute or unmute command sent at higher level (in the
PCM control event callback).
When a 'mute' order is get, the capture sound fd is simply backup and replaced by '-1' in the
set of the poll of the read task.
When a 'unmute' order is get, the fd is simply restored.
The start threshold is only computed for capture, and hardcoded to 1 for playback.
This removes most of the remaining EPIPE on playback.
The stop threshold has been removed. It had bad side effects on the amount of writeable
data returned by snd_pcm_avail_update (was returning too small chunks)
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Uses the same logic as 'aplay' to set the start & stop
thresholds. With this fix, there are no more
periodic EPIPE errors when writing to playback
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
when the stream is muted (due to the configuration, or
due to a HAL request), the read/write loop is stopped.
The benefit is that muting will work with capture devices
that do not implement the mute in their driver.
The inconvenient of stopping the read loop is that it
has made appear an unexpected side-effect: the poll on
capture does not trig for further incoming frames.
The workaround is to completely close, then reopen
and configure the capture PCM.
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Changes of app-controller-submodule:
(440be09 - Jonathan Aillet) Use binding version to set controller definitions
(67b6d49 - Clément Bénier) ctl-lua: typo fix
(bac7d6d - Clément Bénier) asynchronism for test: LockWait added
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Changes of app-afb-helpers-submodule:
(52f0478 - Jonathan Aillet) Remove unnecessary 'AFB_DEBUG' redefinition
(fc1c62a - Jonathan Aillet) Use binding version to handle dynapi
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Changes of app-controller-submodule:
(b575a4b - Thierry Bultel) No longer set the API version
(4a72073 - Romain Forlot) Fix: plugin api assignement order
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Changes of app-controller-submodule:
* af15da8 No longer set the API version
* e45d063 Execute ConfigExec only if section is existing
* 2d1c3d2 Always set the api member even if NULL.
* 9622138 Ability to add a plugin after the initial load
Change-Id: Id7317eb97a623438d9c7857315144ca7d7242d2d
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
|
|
Changes of app-templates:
(eec9f07 - Romain Forlot) Fix: SYSROOT location detection... Wrong test.
(291aa4e - Romain Forlot) Change the default debug compilation options.
(22a2cbf - Romain Forlot) Clearer coverage compilation options configuration
(aa68dbd - Romain Forlot) Don't overwrite the autobuild script if it exists
(a13e7b9 - Romain Forlot) Disable the in-tree build method.
(51026d2 - Romain Forlot) Detect Yocto as OS distribution
(1f2944e - Romain Forlot) Fix: wrong compile options added
(92646f6 - Romain Forlot) Fallback using zip format if no wgtpkg-pack found
(f65761c - José Bollo) 02-variables.cmake: Avoid checking CXX version if not required
(3965d37 - José Bollo) config.cmake.sample: Remove dependency to libsystemd
(a45ae0c - José Bollo) config.cmake.sample: Remove dependency to libmicrohttpd
(9b17efe - Thierry Bultel) Added -D_FORTIFY_SOURCE=2 to CFLAGS
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Changes of app-afb-helpers-submodule:
(2c1edf4 - Thierry Bultel) No longer sets the API version
(5811a53 - Jonathan Aillet) At search, use the prefix parameter as a prefix
(2c29f15 - Loïc Collignon) Remove deprecated use of cmake/Qt macro
(797d04f - Thierry Bultel) No longer sets the API version
(5bec8c5 - Loïc Collignon) Rename method to avoid conflict with Qt's one
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Uses the new compatibility for vdyn based on V3
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Changes of app-controller-submodule:
(0f3063b - Romain Forlot) Be able to dispatch required api at the wanted time
(1ff524b - Romain Forlot) Change LUA package path at LUA interpreter load
(738ae54 - Romain Forlot) Don't load two times a plugin even for LUA
(c04f029 - Sebastien Douheret) Fixed hidden bound variable (apiHandle)
(cfe3919 - Sebastien Douheret) Fixed null value when push Lua arguments
(69c0585 - José Bollo) Adjust to compile with incoming bindings v3
(d7e260c - José Bollo) Remove declaration to not existing functions
(8ac6625 - Romain Forlot) Add 2 lua utilities function
(d3504bb - Jonathan Aillet) Update README.md for new metadata keys.
Change-Id: I794ed0ca3a054e7baf11769207007ef733854474
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
|
|
- removed the systemd polling usage
- uses a while loop for reading
- improved the write loop, leveraging the available space
at each iteration
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
|
|
This fixes the numerous XRUN issues seen on some cards.
The trick is to set the buffer_size & period size in
hw parameters. These ones are calculated from an expected
maximum latency.
Also, the writei is done in a loop to be robust to overruns
and partial writes.
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Also sets the right number of channels.
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
The value set was wrong, and attempting to bump
to an higher value later seems to be forbidden
by the alsalib (led to EINVAL when getting parameters
of PCM)
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Use correct chanel number when creating PCM.
Change-Id: I17ac0273f9a6eec1d3b49845f579495f2cdcf9d7
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Change-Id: I760e1a1b30db924babe5def22c8984719c607d1b
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
|
|
At runtime, the controller should search paths inside
${CMAKE_INSTALL_PREFIX}/${PROJECt_NAME}, typically:
/usr/libexec/agl/smixer
Change-Id: I499cdc068d663797568e64b904c4f4b4e5a07c32
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
|
|
Minor changes in 4a mixer default configuration tu authorise more
volume ramps.
Change-Id: If02e11cafc752ea8d83aa0817d6007a55f18f908
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
This reverts commit 02124becdcda965757d84bdb180bbef2e0e6baaa.
|
|
When adding a stream , instead of using a ':' to separate
prefix and verb, use a '#'.
Change-Id: I2cbb467a85c52dddd4714cfe644dcdf3a35df5d3
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Changes of app-templates:
(9b17efe - Thierry Bultel) Added -D_FORTIFY_SOURCE=2 to CFLAGS
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Correct issues when calling info verb :
- Two 'AFB_ReqFail' was called when an error was detected on
info call reqsuest json (generating an application framework error).
- The error messages wasn't up to date.
Change-Id: Ifbb94854bc8a9d13ddf702defa94eaa6cf87e9ba
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Wrong test on asprintf return code broke the app
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Remove yocto compilation errors concerning :
- An unitialized variable in 'alsa-api-pcm.c'
- A wrong use of asprintf in 'alsa-api-streams.c'
Change-Id: I170993d060a7a1d1a1c20979da0645c5ef2b1b91
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
The conversion from ms to us wasn't done correctly, it is fixed now.
Change-Id: I004e2e42c9b6d9da4f7089d34406bef57ab21d9e
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
|
|
Add default configuration of softmmixer when using in 4a.
Change-Id: I53df4f57b8f77366117c32e1f4ff70d83253fdef
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Authorize the new section 'mixerapi' to be present into the json sent
to initialize mixer.
Change-Id: I7feed818f19f2d93566f6e1634933462828dbdf0
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Instead of passing directly a 'const char *' to snd_output_printf function
use a "%s" format.
Change-Id: I46cd0fc6e5d139a6241dc3aa224b707d97a68125
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Move cmake install prefix from config.cmake to distrib osconfig.cmake.
Change-Id: I0e89e9b2a63941eced787ccd77313e441b0132f8
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Change afb binding version to avoid compilation warnings.
Change-Id: Ia8c8d8b5da04fba397a8e1e0879c433607e237d9
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
|