Bug 98151

Summary: snd_hda_codec_ca0132 module: unable to handle kernel NULL pointer dereference
Product: Drivers Reporter: Andreas Reis (andreas.reis)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: normal CC: tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Iwai for-next Subsystem:
Regression: No Bisected commit-id:
Attachments: Excerpts from dmesg, kernel config, and modinfo
snd_pcm_avail_delay() returned strange values
Fix NULL dereference in hdac DSP handling

Description Andreas Reis 2015-05-12 18:22:34 UTC
Created attachment 176541 [details]
Excerpts from dmesg, kernel config, and modinfo

On drm-intel-nightly (drm/i915: Make the sprite formats const), which is at "hda/realtek - Support headset mode for ALC298".

No sound from my CA0132 that's on my Haswell mainboard, instead I get said bug. You can view the relevant excerpts from dmesg and the kernel config, plus a modinfo snd-hda-codec-ca0132, in the attached file.

However, sound almost works properly if I compile the chosen drivers into the kernel (I just switched everything I had picked for alsa, that is). "Almost" since the Master mixer setting is ignored entirely. The PCM setting still works, though.

None of these problems affect my laptop (Haswell + ALC282), whose current kernel was compiled from the same sources.
Comment 1 Andreas Reis 2015-05-12 19:37:46 UTC
Created attachment 176561 [details]
snd_pcm_avail_delay() returned strange values

There's also this attached warning listed for each booth in boths' journals. IIRC it's been there for a long time already with no noticeable effect. The "returned value" varies for (almost) each boot.
Comment 2 Takashi Iwai 2015-05-19 08:39:29 UTC
Could you try the patch below?

The PA warnings might be rather an issue of alsa-lib plugin.  Does this happen even if you don't use dsnoop?
Comment 3 Takashi Iwai 2015-05-19 08:39:58 UTC
Created attachment 177331 [details]
Fix NULL dereference in hdac DSP handling
Comment 4 Andreas Reis 2015-05-19 09:26:21 UTC
Works. I'll check dsnoop later today.
Comment 5 Takashi Iwai 2015-05-19 09:50:05 UTC
OK, I'm going to queue the fix patch.  Thanks for a quick test.
Comment 6 Takashi Iwai 2015-06-02 14:50:54 UTC
The NULL-dereference fix was merged to upstream.  The rest, PA's messages, is about alsa-lib issue, and I'll fix in alsa-lib git tree.