LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 05-02-2015, 05:17 AM   #1
firedrake
Member
 
Registered: May 2013
Posts: 59

Rep: Reputation: Disabled
snd-hda-intel with ca0132 - jack sensing works correctly after sleep/suspend


Hi,

First of all, if someone has problems with ca0132 and no sound from sound card (Creative SoundBlaster) unless running Windows and booting back to linux, please read my solution below.

I have a problem with jack sensing. It starts working correctly after I put my laptop in suspend/sleep mode. After resume everything works correctly. Usually there is a problem with sound after suspend/sleep but for me it helps to temporarily solve the issue.

I can manually turn on/off headphones and mute speaker by going to alsamixer or kmixer and toggling "HP/Spear", "HP/Speaker Auto Detect". If I turn off Auto Detect and leave HP/Speaker on I have sound on headphones. After turning on Auto Detect I have sound on speakers. Automatic jack sensing doesn't work till resume from sleep.

This started after upgrade to:
Code:
Upgrading alsa-lib-1.0.27.2-i486-1 package using ./alsa-lib-1.0.29-i686-1.txz
Upgrading alsa-utils-1.0.27.1-i486-1 package using ./alsa-utils-1.0.29-i686-1.txz
Upgrading alsa-oss-1.0.25-i486-1 package using ./alsa-oss-1.0.28-i686-1.txz
Upgrading alsa-firmware-1.0.25-i486-1 package using ./alsa-firmware-1.0.29-i686-1.txz
Installing new package ./alsa-plugins-1.0.29-i686-1.txz
Installing new package ./alsa-tools-1.0.29-i686-1.txz
Upgrading pyalsa-1.0.29-i686-1 package using ./pyalsa-1.0.29-i686-1.txz
Installing new package ./pyalsaaudio-0.7-i686-1.txz
I have an Alienware M17, Slackware 14.1, root partition f2fs, kernel 4.0, Creative CA0132 sound card:
lspci
Code:
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
aplay -L
Code:
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, CA0132 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, CA0132 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, CA0132 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, CA0132 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, CA0132 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, CA0132 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, CA0132 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, CA0132 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, CA0132 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
dmesg:
dmesg with lack of ca0132 irq jack sensing

acpi_listen doesn't return any jack/plugged event

Everything starts working correctly after resume from sleep mode.
acpi_listen:
Code:
jack/headphone HEADPHONE plug
jack/headphone HEADPHONE unplug
dmesg (suspend/resume):
Code:
[ 2018.624346] PM: Syncing filesystems ... done.
[ 2018.739855] PM: Preparing system for mem sleep
[ 2018.740221] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 2018.741701] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 2018.742781] PM: Entering mem sleep
[ 2018.742791] Suspending console(s) (use no_console_suspend to debug)
[ 2018.743041] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[ 2018.743075] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 2018.743283] sd 0:0:0:0: [sda] Stopping disk
[ 2018.766490] sd 1:0:0:0: [sdb] Stopping disk
[ 2019.164235] PM: suspend of devices complete after 420.772 msecs
[ 2019.164668] PM: late suspend of devices complete after 0.430 msecs
[ 2019.166006] ehci-pci 0000:00:1d.0: System wakeup enabled by ACPI
[ 2019.166369] ehci-pci 0000:00:1a.0: System wakeup enabled by ACPI
[ 2019.166399] xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
[ 2019.177369] PM: noirq suspend of devices complete after 12.684 msecs
[ 2019.177611] ACPI: Preparing to enter system sleep state S3
[ 2019.187179] PM: Saving platform NVS memory
[ 2019.187183] Disabling non-boot CPUs ...
[ 2019.187216] intel_pstate CPU 1 exiting
[ 2019.188383] smpboot: CPU 1 is now offline
[ 2019.195477] intel_pstate CPU 2 exiting
[ 2019.196645] smpboot: CPU 2 is now offline
[ 2019.201472] intel_pstate CPU 3 exiting
[ 2019.202620] smpboot: CPU 3 is now offline
[ 2019.207448] intel_pstate CPU 4 exiting
[ 2019.208608] smpboot: CPU 4 is now offline
[ 2019.215438] intel_pstate CPU 5 exiting
[ 2019.216576] smpboot: CPU 5 is now offline
[ 2019.223413] intel_pstate CPU 6 exiting
[ 2019.224555] smpboot: CPU 6 is now offline
[ 2019.229381] intel_pstate CPU 7 exiting
[ 2019.230512] smpboot: CPU 7 is now offline
[ 2019.235541] ACPI: Low-level resume complete
[ 2019.235584] PM: Restoring platform NVS memory
[ 2019.235939] Enabling non-boot CPUs ...
[ 2019.235977] x86: Booting SMP configuration:
[ 2019.235978] smpboot: Booting Node 0 Processor 1 APIC 0x1
[ 2019.263478] Initializing CPU#1
[ 2019.272028] CPU1 is up
[ 2019.272047] smpboot: Booting Node 0 Processor 2 APIC 0x2
[ 2019.283069] Initializing CPU#2
[ 2019.291112] CPU2 is up
[ 2019.291156] smpboot: Booting Node 0 Processor 3 APIC 0x3
[ 2019.302608] Initializing CPU#3
[ 2019.310394] CPU3 is up
[ 2019.310434] smpboot: Booting Node 0 Processor 4 APIC 0x4
[ 2019.321815] Initializing CPU#4
[ 2019.332225] CPU4 is up
[ 2019.332270] smpboot: Booting Node 0 Processor 5 APIC 0x5
[ 2019.343721] Initializing CPU#5
[ 2019.354284] CPU5 is up
[ 2019.354324] smpboot: Booting Node 0 Processor 6 APIC 0x6
[ 2019.365707] Initializing CPU#6
[ 2019.373680] CPU6 is up
[ 2019.373723] smpboot: Booting Node 0 Processor 7 APIC 0x7
[ 2019.385176] Initializing CPU#7
[ 2019.393396] CPU7 is up
[ 2019.401203] ACPI: Waking up from system sleep state S3
[ 2019.427053] xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI
[ 2019.427524] ehci-pci 0000:00:1a.0: System wakeup disabled by ACPI
[ 2019.427756] ehci-pci 0000:00:1d.0: System wakeup disabled by ACPI
[ 2019.427833] PM: noirq resume of devices complete after 12.642 msecs
[ 2019.428220] PM: early resume of devices complete after 0.361 msecs
[ 2019.428468] sdhci-pci 0000:09:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
[ 2019.428565] iwlwifi 0000:08:00.0: RF_KILL bit toggled to disable radio.
[ 2019.428977] sdhci-pci 0000:09:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
[ 2019.429268] sd 0:0:0:0: [sda] Starting disk
[ 2019.429269] sd 1:0:0:0: [sdb] Starting disk
[ 2019.492195] rtc_cmos 00:01: System wakeup disabled by ACPI
[ 2019.637350] usb 2-1.8: reset high-speed USB device number 3 using ehci-pci
[ 2019.733359] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 2019.735321] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[ 2019.735342] ata1.00: supports DRM functions and may not be fully accessible
[ 2019.735398] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[ 2019.735615] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[ 2019.735634] ata1.00: supports DRM functions and may not be fully accessible
[ 2019.735682] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[ 2019.735684] ata1.00: configured for UDMA/133
[ 2019.737350] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2019.739350] ata5: SATA link down (SStatus 0 SControl 300)
[ 2019.746386] ata3.00: configured for UDMA/100
[ 2021.576574] ca0132 DOWNLOAD OK :-) DSP IS RUNNING.
[ 2021.665957] psmouse serio1: synaptics: queried max coordinates: x [..5398], y [..4728]
[ 2021.871070] PM: resume of devices complete after 2439.817 msecs
[ 2021.871425] PM: Finishing wakeup.
[ 2021.871426] Restarting tasks ... done.
[ 2021.874657] video LNXVIDEO:00: Restoring backlight state
[ 2022.140957] atl1c 0000:07:00.0: atl1c: eth0 NIC Link is Up<1000 Mbps Full Duplex>
[ 2022.442697] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 2022.443819] ata2.00: ACPI cmd ef/5a:00:00:00:00:a0 (SET FEATURES) succeeded
[ 2022.445856] ata2.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[ 2022.446053] ata2.00: configured for UDMA/133
In both situations I get correct values from hdajacksensetest -a:
Code:
Pin 0x0b (Internal Speaker): present = Yes
Pin 0x0c (Black SPDIF Out, Left side): present = No
Pin 0x0d (Not connected): present = No
Pin 0x0e (Internal SPDIF In): present = No
Pin 0x0f (Not connected): present = No
Pin 0x10 (Black Headphone, Left side): present = Yes
Pin 0x11 (Black Line In, Left side): present = No
Pin 0x12 (Internal Mic, Mobile-In): present = No
Pin 0x13 (Not connected): present = No
Pin 0x18 (Not connected): present = No
In my opinion the only thing that there is a problem with is IRQ. It looks like codec cannot get the IRQ while booting. After sleep/resume it registers again IRQ. That why is able to invoke jack sensing event.
According to Audio Debugging Techniques - Jack sensing there is a problem with kernel driver that does not notify userspace correctly about jack change.

Does anyone know solution to this issue?
How can I reinitialize IRQs for sound?

Just to mention,
Code:
modprobe -r snd_hda_intel
modprobe snd_hda_intel
doesn't fix the problem.

FIX FOR no sound LINUX->WINDOWS->LINUX:
If someone has problems with no sound after boot and the only solution for him is to reboot to the Windows and come back to linux to have the sound again, try suspending your PC in linux. This one fixes the problem with ca0132 muted.
In my opinion there might be a problem with codec/ca0132 module initialization conflicting with something else in the system.
 
Old 05-03-2015, 05:51 AM   #2
firedrake
Member
 
Registered: May 2013
Posts: 59

Original Poster
Rep: Reputation: Disabled
snd-hda-intel with ca0132 - jack sensing works correctly after sleep/suspend

Hi,

I have a problem with jack sensing. It starts working correctly after I put my laptop in suspend/sleep mode. After resume everything works correctly. Usually there is a problem with sound after suspend/sleep but for me it helps to temporarily solve the issue.

I can manually turn on/off headphones and mute speaker by going to alsamixer or kmixer and toggling "HP/Spear", "HP/Speaker Auto Detect". If I turn off Auto Detect and leave HP/Speaker on I have sound on headphones. After turning on Auto Detect I have sound on speakers. Automatic jack sensing doesn't work till resume from sleep.

The complete description is in http://www.linuxquestions.org/questi...71#post5356571
I didn't want to copy thread but in the laptop forum I don't get any answer.

Kind regards.
 
Old 05-03-2015, 06:00 AM   #3
firedrake
Member
 
Registered: May 2013
Posts: 59

Original Poster
Rep: Reputation: Disabled
When I run alsa-info.sh I get:
Without jack sensing:
http://pastebin.com/WAHbcqWa

With jack sensing:
http://pastebin.com/v4tnZVky

If anyone has an idea what/where should I look for a solution to this issue, please let me know.
It drives me crazy !!!

Kind regards.
 
Old 05-03-2015, 09:46 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
Old 05-05-2015, 09:04 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I have snd_hda_intel, and in the middle of the alsamixer screen is a box entitled "Auto-Mute." Have you got that enabled?
 
Old 05-05-2015, 10:51 AM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
To me, this seems like a quirky hardware problem.
Have you tried the 'model=auto' option to the snd-hda-intel kernel module?
http://docs.slackware.com/howtos:har..._snd-hda-intel
 
Old 05-05-2015, 02:55 PM   #7
firedrake
Member
 
Registered: May 2013
Posts: 59

Original Poster
Rep: Reputation: Disabled
Hi,

I tried setting precise model - now I have /etc/modprobe.d/alsa-base.conf like this:
Code:
alias char-major-116 snd
alias char-major-14 soundcore

options snd major=116 cards_limit=2

alias snd-card-0 snd-hda-codec-ca0132
alias snd-card-1 snd-hda-codec-hdmi

options snd-hda-intel model=alienware,alienware
options snd-hda-intel enable_msi=1,1
options snd-hda-intel index=0,1
options snd-hda-intel id=PCH,NVidia
options snd-hda-intel bdl_pos_adj=-1,64

options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
options snd-pcsp index=-2
options snd-usb-audio index=-2
I tried changing settings, restarting alsa, debugging IRQ - nothing works.
For me there has to be explanation to this because before it worked (before alsa, kernel and some other packages upgrade).
Now it works only after suspending what is strange.
Seriously, it pisses me off. I don't understand why, why, why, why

Kind regards
 
Old 05-05-2015, 10:00 PM   #8
linuxtinker
Member
 
Registered: Dec 2013
Location: NJ / USA
Distribution: Slackware 64 -Current
Posts: 232

Rep: Reputation: 99
snd-hda-intel with ca0132 - jack sensing works correctly after sleep/suspend

take a look to see if there are any scripts that run after suspend mode.. there must be something that changes after suspending the laptop
 
Old 05-08-2015, 10:02 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Re-opened on OP's request.
 
Old 05-09-2015, 09:21 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
And both threads merged.
 
Old 05-21-2015, 04:15 AM   #11
firedrake
Member
 
Registered: May 2013
Posts: 59

Original Poster
Rep: Reputation: Disabled
Hi,

linuxtinker - I will try to find what can be invoked to enable this function. The only difference that I can see in dmesg is reinitialization of sound card driver:
Code:
ca0132 DOWNLOAD OK :-) DSP IS RUNNING.
I think that if I could reinitialize driver or codec it would work. I even tried to disable IRQ's, enable only some of them and so on but without luck.
I don't know how to reinitialize ca0132 codec because it's used by some system services.

I will try to solve it. Maybe new kernel will solve it.

Kind regards
 
  


Reply

Tags
alsa, creative, snd_hda_intel, soundblaster



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
snd-hda-intel with ca0132 - jack sensing works correctly after sleep/suspend firedrake Linux - Laptop and Netbook 3 05-08-2015 10:02 AM
No Sound snd-hda-intel mickeyboa Fedora 5 12-21-2009 04:16 PM
Slackware 12.2 +snd-hda-intel g.85 Slackware 2 08-09-2009 08:05 PM
No Sound on SuSE 10 - snd-hda-intel rizhun Linux - Hardware 13 03-10-2007 08:46 AM
snd-hda-intel - no sound Laen Slackware 3 11-12-2006 01:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration