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

Friendly Automation (JIRA) noreply at issues.asterisk.org
Fri Feb 9 09:28:13 CST 2018


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

Friendly Automation commented on ASTERISK-27426:
------------------------------------------------

Change 8174 merged by Jenkins2:
chan_console: don't read and write at the same time

[https://gerrit.asterisk.org/8174|https://gerrit.asterisk.org/8174]

> 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
>
> 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