Bug 99062

Summary: PulseAudio crashes with Digigram VX222 card
Product: PulseAudio Reporter: Marcin Lewandowski <marcin>
Component: coreAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Output of "info" in pacmd

Description Marcin Lewandowski 2016-12-12 12:46:05 UTC
I cannot reproduce the exact behaviour but I have issues with PulseAudio 8.0 shipped with ubuntu 16.04.

I was listening to music from Firefox, and then I started to hear only white noise.

In syslog I had plenty of

Dec 12 13:37:59 aksolotl pulseaudio[3292]: message repeated 15 times: [ [alsa-sink-VX PCM] alsa-sink.c: Failed to set hardware parameters: Zły argument]
Dec 12 13:37:59 aksolotl pulseaudio[3292]: [alsa-sink-VX PCM] alsa-sink.c: Failed to set hardware parameters: Zły argument
Dec 12 13:37:59 aksolotl kernel: [ 2758.081130] vx: cannot set different clock 48000 from the current 44100
Dec 12 13:37:59 aksolotl kernel: [ 2758.081174] vx: cannot set different clock 48000 from the current 44100
Dec 12 13:37:59 aksolotl kernel: [ 2758.081212] vx: cannot set different clock 48000 from the current 44100
Dec 12 13:37:59 aksolotl kernel: [ 2758.081250] vx: cannot set different clock 48000 from the current 44100
Comment 1 Marcin Lewandowski 2016-12-12 12:46:21 UTC
Created attachment 128429 [details]
Output of "info" in pacmd
Comment 2 Tanu Kaskinen 2016-12-12 15:47:53 UTC
Did you have pavucontrol open? I ask, because the card might refuse to switch the output rate if audio is being recorded at the same time, and pavucontrol will record from all inputs to show the volume meters.

The kernel errors suggest that the problem happens when switching sample rate from 44100 Hz to 48000 Hz. Could you try the following:

First, make sure that all devices are suspended. Don't play any music, don't have pavucontrol open. "pactl list sinks short" and "pactl list sources short" will show the state of all devices. The last field on each line is the device state, which should be "SUSPENDED".

Then, start playing silence at 44100 Hz: "pacat --device=alsa_output.pci-0000_09_01.0.analog-stereo --rate=44100 /dev/zero". Keep that command running, and run "paplay somefile.wav" (ogg and flac files are ok too) to verify that the audio is ok.

Stop pacat and paplay. Check with "pactl list sinks short" again that everything is suspended (after stopping playing, the sink will stay in the "IDLE" state for a few seconds, but it should quickly change to "SUSPENDED").

Assuming that no problems have been observed so far, start playing silence at 48000 Hz: "pacat --device=alsa_output.pci-0000_09_01.0.analog-stereo --rate=48000 /dev/zero". Again, keep that command running and check if audio is ok by playing some non-silence audio file.

If there are still no problems, let's check if recording from the sound card causes trouble. Make sure again that everything is suspended, then run "parec --device=alsa_input.pci-0000_09_01.0.analog-stereo --rate=44100 > /dev/null". Then play silence at 48000 Hz: "pacat --device=alsa_output.pci-0000_09_01.0.analog-stereo --rate=48000 /dev/zero". Does that cause errors? If it seems to work, is sound ok if you try to play a non-silence audio file while pacat keeps playing silence? What rate does "pactl list sinks short" show?
Comment 3 Tanu Kaskinen 2016-12-12 15:48:46 UTC
Also, to clarify: did you actually see a crash at some point, as suggested by the bug title? The bug description sounded like you only observed corrupted audio.
Comment 4 Marcin Lewandowski 2016-12-23 21:34:02 UTC
Hello I will try to reproduce it using your instruction after christmas
Comment 5 Marcin Lewandowski 2016-12-23 21:39:46 UTC
I was testing today the VX222 card on Debian Jessie (Kernel 3.16) and I also got crashes. 

When I tried to launch jackd (version 1) with sample rate 192kHz it immediately caused issues.

The logged messages from the kernel were:

vx: cannot start stream

then after a while

vx: cannot start pipe
vx: cannot start pipe

and system became totally dead.

On another attempt when I just used regular 44.1 kHz it just was unstable. At the fist attempt it was working, but then after Jack was shutdown it never allowed me to start again, telling that "device or resource is busy". Then it had crashed similarily to the previous report.

Tanu, if you are willing to work on this would it be helpful if I send you the card? I think I can also think about some renumeration (if it's reasonable).
Comment 6 Marcin Lewandowski 2016-12-23 21:40:23 UTC
Ah sorry, my previous comment was supposed to go there: https://bugzilla.kernel.org/show_bug.cgi?id=141541
Comment 7 GitLab Migration User 2018-07-30 10:26:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/419.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.