Bug 98475 - pacat fails in pa_stream_write() for some channel counts
Summary: pacat fails in pa_stream_write() for some channel counts
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: clients (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Ahmed S. Darwish
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 96750
  Show dependency treegraph
 
Reported: 2016-10-28 15:22 UTC by Tanu Kaskinen
Modified: 2016-12-28 13:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tanu Kaskinen 2016-10-28 15:22:25 UTC
pacat --channels=1 /dev/zero    works
pacat --channels=2 /dev/zero    works
pacat --channels=3 /dev/zero    pa_stream_write() failed: Invalid argument
pacat --channels=4 /dev/zero    works
pacat --channels=5 /dev/zero    pa_stream_write() failed: Invalid argument
pacat --channels=6 /dev/zero    pa_stream_write() failed: Invalid argument
pacat --channels=7 /dev/zero    pa_stream_write() failed: Invalid argument
pacat --channels=8 /dev/zero    works
Comment 1 Tanu Kaskinen 2016-10-28 15:23:08 UTC
It looks like some very basic stuff is broken. Marking as a release blocker.
Comment 2 Ahmed S. Darwish 2016-11-22 20:37:21 UTC
These are 3 bugs in one psymptom ;-) Fixes for the first two are sent here:

    https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-November/027175.html

    https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-November/027176.html

Due to the above two fixes, commands like below ones now work succesfully:

    pacat --channels=3 /dev/urandom
    pacat --channels=5 /dev/urandom

Third issue can be reproduced with the following command:

    pacat  --channels=3 /dev/random

Note device change from urandom to random. Above final issue makes pa_stream_write() fails with EINVAL due to misaligned audio - which resulted from an incomplete pa_read() due to /dev/random strict randomness semantics. Maybe we should use a ring buffer in that case. Third patch to be sent soon.
Comment 3 Tanu Kaskinen 2016-11-24 19:13:28 UTC
The two patches have now been applied.
Comment 4 Ahmed S. Darwish 2016-11-28 04:08:22 UTC
Fixes for the third and final issue mentioned in the above is now submitted at:

    https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-November/027193.html

    https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-November/027194.html
Comment 5 Ahmed S. Darwish 2016-12-17 07:07:23 UTC
Updated version of the last patch sent here:

    https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-December/027254.html


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.