diff options
author | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-07-11 17:50:44 +0200 |
---|---|---|
committer | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-07-11 17:50:44 +0200 |
commit | 283bf0a4ab7dbd6f4393f6a1b4ef5a201ee92f62 (patch) | |
tree | d0ece00821901244465ef5fb3694389430db3085 /plugins/alsa/alsa-utils-bypath.c | |
parent | afd9f87786fe0cc3070ec976b89399603112c845 (diff) |
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 <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-utils-bypath.c')
-rw-r--r-- | plugins/alsa/alsa-utils-bypath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/alsa/alsa-utils-bypath.c b/plugins/alsa/alsa-utils-bypath.c index 71810c2..2f22333 100644 --- a/plugins/alsa/alsa-utils-bypath.c +++ b/plugins/alsa/alsa-utils-bypath.c @@ -88,12 +88,12 @@ PUBLIC AlsaPcmCtlT *AlsaByPathOpenPcm(SoftMixerT *mixer, AlsaDevInfoT *pcmDev, s pcmCtl->cid.longname=NULL; AFB_ApiInfo(mixer->api, - "%s OPEN PCM %s, direction %s", + "%s OPEN PCM '%s', direction %s", __func__, pcmCtl->cid.cardid, direction==SND_PCM_STREAM_PLAYBACK?"playback":"capture"); error = snd_pcm_open(&pcmCtl->handle, pcmCtl->cid.cardid, direction, SND_PCM_NONBLOCK); if (error < 0) { - AFB_ApiError(mixer->api, "AlsaByPathOpenPcm: fail openpcm cardid=%s error=%s", pcmCtl->cid.cardid, snd_strerror(error)); + AFB_ApiError(mixer->api, "%s: fail openpcm cardid=%s error=%s", __func__, pcmCtl->cid.cardid, snd_strerror(error)); goto OnErrorExit; } |