From 283bf0a4ab7dbd6f4393f6a1b4ef5a201ee92f62 Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Wed, 11 Jul 2018 17:50:44 +0200 Subject: stops the read/write loop when the stream is muted 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 --- plugins/alsa/alsa-api-pcm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/alsa/alsa-api-pcm.c') diff --git a/plugins/alsa/alsa-api-pcm.c b/plugins/alsa/alsa-api-pcm.c index f8a2414..a51bb6f 100644 --- a/plugins/alsa/alsa-api-pcm.c +++ b/plugins/alsa/alsa-api-pcm.c @@ -521,7 +521,9 @@ PUBLIC AlsaSndPcmT * ApiPcmAttachOne(SoftMixerT *mixer, const char *uid, snd_pcm , "mute", &muteJ ); if (error) { - AFB_ApiNotice(mixer->api, "ApiPcmAttachOne: source missing [volume]|[mute] error=%s control=%s", wrap_json_get_error_string(error), json_object_get_string(controlsJ)); + AFB_ApiNotice(mixer->api, + "%s: source missing [volume]|[mute] error=%s control=%s", + __func__, wrap_json_get_error_string(error), json_object_get_string(controlsJ)); goto OnErrorExit; } -- cgit 1.2.3-korg