[asterisk-bugs] [JIRA] (ASTERISK-27426) chan_console: cannot read and write at the same time with alsa backend

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Feb 22 15:21:20 CST 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-27426:
-------------------------------------

    Target Release Version/s: 13.20.0

> chan_console: cannot read and write at the same time with alsa backend
> ----------------------------------------------------------------------
>
>                 Key: ASTERISK-27426
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27426
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/General
>    Affects Versions: GIT
>            Reporter: Tzafrir Cohen
>            Assignee: Unassigned
>      Target Release: 13.20.0
>
>
> Trying to use chan_console on current master (9eacd55c7191a460fe8704f81b9e5e3beaf014b9). Ran into several issues.
> Configured the device. Got error -9997 (paInvalidSampleRate). 
> So device does not support 16000Hz. OK, it supports 8000Hz. Easy enough to fix in the code. At least for now.
> Now I connect the device and tried: 'channel originate Console/con1 application Playback demo-instruct'. "Nothing happens".
> Added some tracing to chan_console.c:console_write(). I see that the function gets called. The result of Pa_WriteStream() there is not checked. When I checked the result I noticed that I keep getting the error -9974 (paCanNotWriteToAnInputOnlyStream).
> Looking at the code of portaudio, I noticed that src/hostapi/alsa/pa_linux_alsa.c:ReadStream() temporarily disables writing for the time of the call to the function and likewise WriteStream temporarily disables reading.
> Thus I temporarily replaced the call to Pa_ReadStream() with a sleep(), and suddenly I have audio.
> Note that this applies to the ALSA backend. This does not happen when the OSS backend of portaudio is used (device /dev/dsp1 and such).



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list