Bug 141541 - snd-vx222 module crashing
Summary: snd-vx222 module crashing
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-22 19:36 UTC by Mark Pengelly
Modified: 2017-01-09 13:39 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.4.0-21-generic
Tree: Mainline
Regression: No


Attachments
alsa-info good.txt (10.18 KB, text/plain)
2016-07-22 19:36 UTC, Mark Pengelly
Details
alsa-info bad.txt (10.27 KB, text/plain)
2016-07-22 19:41 UTC, Mark Pengelly
Details
alsamixer vs gnome mixer (50.75 KB, image/png)
2016-07-25 07:19 UTC, Mark Pengelly
Details
alsa-info (58.45 KB, text/plain)
2016-12-15 12:52 UTC, Marcin Lewandowski
Details
dmesg log after crash (9.62 KB, text/x-log)
2016-12-15 12:52 UTC, Marcin Lewandowski
Details
Test fix patch (1.78 KB, patch)
2016-12-15 13:31 UTC, Takashi Iwai
Details | Diff
dmesg log after crash with test patch applied (9.64 KB, text/x-log)
2016-12-15 16:41 UTC, Marcin Lewandowski
Details
Crash screenshot after regular operation on kernel 3.16 (227.46 KB, image/jpeg)
2016-12-23 21:42 UTC, Marcin Lewandowski
Details
Crash screenshot after 192khz on kernel 3.16 (154.84 KB, image/jpeg)
2016-12-23 21:42 UTC, Marcin Lewandowski
Details
dmesg log after crash for vx222 v1 on kernel 4.4.0-57-generic from ubuntu 16.04 (72.18 KB, application/octet-stream)
2017-01-09 11:08 UTC, Marcin Lewandowski
Details
Crash screenshot vx222v2 kernel 4.8.0-lowlatency from ubuntu 16.04 #1 (3.20 MB, image/jpeg)
2017-01-09 12:04 UTC, Marcin Lewandowski
Details
Crash screenshot vx222v2 kernel 4.8.0-lowlatency from ubuntu 16.04 #2 (3.07 MB, image/jpeg)
2017-01-09 12:05 UTC, Marcin Lewandowski
Details
Crash screenshot vx222v1 kernel 3.13.0 from ubuntu 14.04 (81.50 KB, text/x-log)
2017-01-09 13:37 UTC, Marcin Lewandowski
Details
Crash screenshot vx222v2 kernel 3.13.0 from ubuntu 14.04 (2.98 MB, image/jpeg)
2017-01-09 13:39 UTC, Marcin Lewandowski
Details

Description Mark Pengelly 2016-07-22 19:36:17 UTC
Created attachment 225471 [details]
alsa-info good.txt

I have a new install of xubuntu 16.04 i386. 

I am attempting to get the Digigram VX222v2 card working

As per the guidance on http://www.alsa-project.org/main/index.php/Matrix:Module-vx222 :

1. I do not compile alsa-driver as these updates are now in the kernel (right?).

2. I compile alsa-lib

3. I compile alsa-firmware

4. I compile alsa-utils

alsa-utils complains it needs a curses library, so (guessing here) I, apt-get install libncurses5-dev libncursesw5-dev

seems happier after that.

At this point I can play an MP3 or flac file via Parole. Sounds good. BTW (in case it matters) I'm plugged in on the headphones socket of the VX222v2 at this point; yet to test xlr output - which is the purpose of faffing with this card.

alsa-info good.txt is what this looks like.

As soon as I attempt to adjust volume via (pulse audio's?) gui, the card crashes.

alsa-info bad.txt reflects this.

Be glad for advice on how to provide info to debug.
Comment 1 Mark Pengelly 2016-07-22 19:41:22 UTC
Created attachment 225481 [details]
alsa-info bad.txt
Comment 2 Mark Pengelly 2016-07-22 19:54:43 UTC
Update. subtle change in that I can now adjust the volume to some extent, for a while it works as should, then lots of static/buzzing noise and then the crash. Feels like progress!
Comment 3 Mark Pengelly 2016-07-22 20:13:13 UTC
I'm wondering if my problem relates to issues between pulse-audio and alsa. I appreciate that the alsa info about his (ancient) card were perhaps pre pulse-audio days, yes? Hence all the OSS references... I don't need gui at all for my purposes; can live with only alsa mixer etc, so perhaps remove pulse-audio?
Comment 4 Raymond 2016-07-22 23:55:32 UTC
Simple mixer control 'Input VU Meter',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: -16069 [-6302%]
  Front Right: -3459 [-1356%]

Simple mixer control 'Output Peak Meter',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: -2549 [-1000%]
  Front Right: -888 [-348%]
Simple mixer control 'Output VU Meter',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: -16069 [-6302%]
  Front Right: -3459 [-1356%]

The values of those peak meters are out of range 0-255
Comment 5 Mark Pengelly 2016-07-23 05:18:56 UTC
Thanks Raymond. I'll attend to those issues and come back...
Comment 6 Raymond 2016-07-23 16:21:14 UTC
	control.11 {
		iface MIXER
		name 'Output VU Meter'
		value.0 -16070
		value.1 -3330
		comment {
			access 'read volatile'
			type INTEGER
			count 2
			range '0 - 255'
		}
	}
	control.12 {
		iface MIXER
		name 'Output Peak Meter'
		value.0 -2550
		value.1 8507
		comment {
			access 'read volatile'
			type INTEGER
			count 2
			range '0 - 255'
		}
	}

	control.14 {
		iface MIXER
		name 'Input VU Meter'
		value.0 -16070
		value.1 -3330
		comment {
			access 'read volatile'
			type INTEGER
			count 2
			range '0 - 255'
		}
	}
	control.15 {
		iface MIXER
		name 'Input Peak Meter'
		value.0 -4113
		value.1 8507
		comment {
			access 'read volatile'
			type INTEGER
			count 2
			range '0 - 255'
		}
	}
}

those controls are volatile which require special application (e.g. alsa-tools) to read the value of controls periodically
Comment 7 Mark Pengelly 2016-07-25 07:18:33 UTC
Thanks very much Raymond. BTW at this point I've removed pulseaudio.

Those four meters are clearly out of range and need some attention. I had noticed in alsamixer that they appeared un-adjustable, although I note in Gnome alsa mixer they have appear to have sliders that move (see screenshot)

Afraid I'm a bit of a noob when it comes to Alsa. If anyone can advise on how to configure these parameters to acceptable, in range, settings. I'd be grateful. Also if there's any reading to do to understand the 'read volatile' parameter my attention has been drawn to, grateful again. Quick google hasn't got me very far.

Conscious this 'kernel bug' posting is now inappropriate (right?); happy to make this solved, but advise on where to properly discuss such (Alsa?) matters appreciated.
Comment 8 Mark Pengelly 2016-07-25 07:19:44 UTC
Created attachment 225751 [details]
alsamixer vs gnome mixer

screenshot of alsamixer vs gnome mixer
Comment 9 Marcin Lewandowski 2016-12-15 12:51:52 UTC
Hello, I also encounter crashes with vx222 (v1 of the card). Definitely PulseAudio can trigger some bug, but they can happen also with PulseAudio disabled.

I attach kernel crash log from dmesg and alsa-info output.
Comment 10 Marcin Lewandowski 2016-12-15 12:52:09 UTC
Created attachment 247681 [details]
alsa-info
Comment 11 Marcin Lewandowski 2016-12-15 12:52:24 UTC
Created attachment 247691 [details]
dmesg log after crash
Comment 12 Takashi Iwai 2016-12-15 13:31:07 UTC
The stack trace indicates some out-of-bounds access.
Does the patch below fix anything?

(The bogus VU meter value is a different issue, and unlikely related with the crash.)
Comment 13 Takashi Iwai 2016-12-15 13:31:28 UTC
Created attachment 247701 [details]
Test fix patch
Comment 14 Marcin Lewandowski 2016-12-15 15:16:00 UTC
Dear Tahashi, thank you for quick reply. I will definitely give it a try, but I have to recompile the driver and it's quite time-consuming. I'll let you know as soon as it's done.
Comment 15 Marcin Lewandowski 2016-12-15 16:40:52 UTC
After applying a patch only right channel was working.

It was playing back succesfully for a few minutes and then immediately, without any specific action that could trigger that from my side, it started to beep in the right channel and crashed. dmesg crash is attached.
Comment 16 Marcin Lewandowski 2016-12-15 16:41:11 UTC
Created attachment 247721 [details]
dmesg log after crash with test patch applied
Comment 17 Marcin Lewandowski 2016-12-23 21:40:11 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.

Takashi, 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 18 Marcin Lewandowski 2016-12-23 21:42:35 UTC
Created attachment 248461 [details]
Crash screenshot after regular operation on kernel 3.16
Comment 19 Marcin Lewandowski 2016-12-23 21:42:54 UTC
Created attachment 248471 [details]
Crash screenshot after 192khz on kernel 3.16
Comment 20 Marcin Lewandowski 2017-01-09 11:08:20 UTC
Created attachment 250861 [details]
dmesg log after crash for vx222 v1 on kernel 4.4.0-57-generic from ubuntu 16.04
Comment 21 Marcin Lewandowski 2017-01-09 12:04:29 UTC
Created attachment 250871 [details]
Crash screenshot vx222v2 kernel 4.8.0-lowlatency from ubuntu 16.04 #1
Comment 22 Marcin Lewandowski 2017-01-09 12:05:46 UTC
Created attachment 250881 [details]
Crash screenshot vx222v2 kernel 4.8.0-lowlatency from ubuntu 16.04 #2
Comment 23 Marcin Lewandowski 2017-01-09 13:37:09 UTC
Created attachment 250891 [details]
Crash screenshot vx222v1 kernel 3.13.0 from ubuntu 14.04
Comment 24 Marcin Lewandowski 2017-01-09 13:39:49 UTC
Created attachment 250901 [details]
Crash screenshot vx222v2 kernel 3.13.0 from ubuntu 14.04

Note You need to log in before you can comment on or make changes to this bug.