Bug 116441 - irq / timeout issue with Digigram vx222e sound card.
Summary: irq / timeout issue with Digigram vx222e sound card.
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-15 17:45 UTC by Dominique
Modified: 2016-07-22 19:46 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.2.0-27-generic
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa info (11.41 KB, application/octet-stream)
2016-04-15 17:45 UTC, Dominique
Details
Fix patch (343 bytes, patch)
2016-04-20 15:57 UTC, Takashi Iwai
Details | Diff
Working alsa-info (11.67 KB, application/octet-stream)
2016-04-25 17:25 UTC, Dominique
Details

Description Dominique 2016-04-15 17:45:07 UTC
Created attachment 213011 [details]
alsa info

I have tried to get this card to work on two machines.

An HP Proliant DL380 server and a Dell OptiPlex 755 desktop

The result is the same error output on both machines. So now I know it's not the server hardware and is either the sound card or the driver.

The output of the alsa info script is attached.

The set of steps I used to produce the error is:

-Run Ubuntu 14.04 Live off USB thumb drive. 
-Add Ubuntu universe and multiverse repositories to sources.list
-sudo apt-get update
-sudo apt-get install alsa-firmware-loaders
-go to alsa-project.org downloads and download alsa-firmware-1.0.29.tar.bz2 
-extract pcxhrloader file into /lib/firmware/pcxhr
-sudo rmmod snd_pcxhr
-sudo modprobe snd_pcxhr

I can hear a blip on the speakers when I modprobe snd_pcxhr.

I have tried to move the PCI card to other slots, I have tried to change the irq in the bios on the HP the error output is always the same:

[ 1320.168074] INFO: task irq/16-snd_pcxh:16762 blocked for more than 120 seconds.
[ 1320.168080]       Not tainted 4.2.0-27-generic #32~14.04.1-Ubuntu

Then it gives a stack trace, see attached file for reference.
Comment 1 Raymond 2016-04-16 16:55:42 UTC
[   48.041803] snd_pcxhr 0000:02:04.0: Direct firmware load for pcxhr/xlxc222.dat failed with error -2
[   48.041810] snd_pcxhr 0000:02:04.0: pcxhr: can't load firmware pcxhr/xlxc222.dat
[   48.042325] snd_pcxhr: probe of 0000:02:04.0 failed with error -2
Comment 2 Dominique 2016-04-19 17:25:55 UTC
Hello Raymond,

That's the error that occurs upon first install. the solution was to extract pcxhrloader folder from the alsa-firmware-1.0.29.tar.bz2 package into the /lib/firmware/pcxhr folder. so the resulting file /lib/firmware/pcxhr/xlxc222.dat could be found, because firmware loader data files are not packaged into the kernel.

After that error there are unresolvable blocked task errors, when it loads the firmware data file.
Comment 3 Takashi Iwai 2016-04-20 15:28:24 UTC
Please give the alsa-info.sh output after a fresh boot with the firmware loaded.
Also, give the full output of dmesg at hanging, too.

It'd be also helpful if you can build the kernel with mutex lockdep enabled.  This will catch the mutex deadlock easier.
Comment 4 Takashi Iwai 2016-04-20 15:57:24 UTC
I found the mutex unbalance through reading the code now.  Could you try the patch below?
Comment 5 Takashi Iwai 2016-04-20 15:57:43 UTC
Created attachment 213401 [details]
Fix patch
Comment 6 Dominique 2016-04-25 17:23:48 UTC
The patch appears to be working.

For anyone looking to apply the patch, here are the set of steps I used to make it work:

1. I followed the instructions at:
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

2. I applied the patch file to ~/linux-lts-willy-4.2.0/sound/pci/pcxhr/pcxhr_core.c

3. recompiled the kernel as per the instructions on ubuntu.com:
fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic

(took 2hrs to recompile)

4. installed the kernel and reboot
dpkg -i linux-image-4.2.0-35-generic_4.2.0-35.40~14.04.1_amd64.deb
dpkg -i linux-image-extra-4.2.0-35-generic_4.2.0-35.40~14.04.1_amd64.deb
reboot

I'll attached the new alsa-info result
Comment 7 Dominique 2016-04-25 17:25:16 UTC
Created attachment 214131 [details]
Working alsa-info

This is the alsa-info after the patch has been applied.
Comment 8 Takashi Iwai 2016-04-26 05:50:37 UTC
Thanks for checking.  The patch was merged to the latest 4.6-rc and will be backported to stable branches soon later.
Comment 9 Mark Pengelly 2016-07-21 07:43:35 UTC
Will this patch be needed to get my VX222v2 card working also? 

I've been struggling to get it working for a while on my UbuntuStudio 16.04 using Takashi's guide on the Alsa website for it. I have kernel 4.4.0-31-lowlatency.

Also is the extraction of the /lib/firmware/pcxhr/xlxc222.dat needed in my instance - hadn't read about that anywhere else!
Comment 11 Takashi Iwai 2016-07-21 08:50:32 UTC
PCXHR and VX are completely different hardware, so irrelevant from this bug.
Comment 12 Takashi Iwai 2016-07-21 08:52:05 UTC
BTW, the firmware for snd-vx222 is found in alsa-firmware package.
Comment 13 Mark Pengelly 2016-07-22 16:54:15 UTC
Many thanks Takashi. When I load the firmware the VX222v2 sound card is there and works! but as soon as try to adjust the sound level (using the gui) the card crashes and the module appears to be removed (no sound card showing then).

I appreciate this thread is probably not the right place to discuss this.

If you think this is a kernel issue I'd happily start a new post in this forum, but perhaps I'd be better posting somewhere else? Your advise (as I'm a noob in some respects) appreciated. Any advise on what logs to look at also appreciated. Nothing showing in dmesg of any help I think.
Comment 14 Dominique 2016-07-22 17:32:10 UTC
Hello Mark,

This bug is resolved, please create a new bug with your alsa-info and link to it here. I will try to help you out.

I tried to get the snd-vx222 module to work for my digigram VX222 card to work but I found the pcxhr module was the one that got it to work.

I used the alsamixer command line program to unmute the master channel and adjust the volume.
Comment 15 Mark Pengelly 2016-07-22 19:46:30 UTC
THANKS Dominique. I have created a new bug here: https://bugzilla.kernel.org/show_bug.cgi?id=141541

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