[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
Fri Dec 1 12:00:08 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240354#comment-240354 ] 

Asterisk Team commented on ASTERISK-27426:
------------------------------------------

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

> 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: Tzafrir Cohen
>
> 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