No or bad sound on ASRock Z68 mobo (ALC892)

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

No or bad sound on ASRock Z68 mobo (ALC892)

Postby oss117 » Wed Sep 05, 2012 5:58 pm

Greetings,

I have been a happy user of OSS v4 for the past years, but today, after upgrading my main system with an ASRock Z68 Extreme4 Gen 3 (with a Core i5 processor), OSS stopped working. Recompiling it from scratch, uninstalling and reinstalling OSS doesn't change a thing, or, more exactly, after reinstalling OSS in a clean session (i.e. just rebooted and with ALSA modules loaded), I can get OSS to work for the duration of the session, but on reboot (either warm or cold reboots), I get no sound, or static, or utterly distorted sounds.

I tried all sound related settings in the BIOS (HD Audio on Auto, then on Enabled, then with integrated IGP HDMI audio disabled), to no avail.

Please, help !

Here is my ossinfo and a log of what I get with osstest after a reboot (no sound emitted during the test, excepted during the spdout0 test when the front speakers spit out the same distorted, repeating few first notes of the test music).

Version info: OSS 4.2 (b 2006/201209060135) (0x00040100) GPL
Platform: Linux/i686 3.4.10 #1 SMP Thu Sep 6 03:21:11 CEST 2012 (localhost.localdomain)

Number of audio devices: 8
Number of audio engines: 12
Number of MIDI devices: 0
Number of mixer devices: 1


Device objects
0: osscore0 OSS core services
1: oss_hdaudio0 Intel HD Audio interrupts=3006 (3006)
HD Audio controller Intel HD Audio
Vendor ID 0x80861c20
Subvendor ID 0x18498892
Codec 0: ALC892 (0x10ec0892/0x18498892)
2: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)

Mixer devices
0: High Definition Audio ALC892 (Mixer 0 of device object 1)
Device file /dev/oss/oss_hdaudio0/mix0, Legacy device /dev/mixer0
Priority: 10
Caps:

Audio devices
HD Audio play front /dev/oss/oss_hdaudio0/pcm0 (device index 0)
Legacy device /dev/dsp0
Caps: DUPLEX TRIGGER MMAP
Modes: IN/OUT
Out engine 1: Available for use
Engine 2: Available for use
Engine 3: Available for use
Engine 4: Available for use
Engine 5: Available for use
HD Audio play rear /dev/oss/oss_hdaudio0/pcm1 (device index 1)
Legacy device /dev/dsp1
Caps: TRIGGER MMAP
Modes: OUTPUT
Out engine 1: Available for use
HD Audio play center/LFE /dev/oss/oss_hdaudio0/pcm2 (device index 2)
Legacy device /dev/dsp2
Caps: TRIGGER MMAP
Modes: OUTPUT
Out engine 1: Available for use
HD Audio play side /dev/oss/oss_hdaudio0/pcm3 (device index 3)
Legacy device /dev/dsp3
Caps: TRIGGER MMAP
Modes: OUTPUT
Out engine 1: Available for use
HD Audio play pcm4 /dev/oss/oss_hdaudio0/pcm4 (device index 4)
Legacy device /dev/dsp4
Caps: TRIGGER MMAP
Modes: OUTPUT
Out engine 1: Available for use
HD Audio play spdif-out /dev/oss/oss_hdaudio0/spdout0 (device index 5)
Legacy device /dev/dsp5
Caps: TRIGGER MMAP
Modes: OUTPUT
Out engine 1: Available for use
HD Audio rec mix /dev/oss/oss_hdaudio0/pcmin0 (device index 6)
Legacy device /dev/dsp6
Caps: DUPLEX TRIGGER MMAP
Modes: IN/OUT
In engine 1: Available for use
Engine 2: Available for use
Engine 3: Available for use
Engine 4: Available for use
Engine 5: Available for use
HD Audio rec mix /dev/oss/oss_hdaudio0/pcmin1 (device index 7)
Legacy device /dev/dsp7
Caps: TRIGGER MMAP
Modes: INPUT
In engine 1: Available for use

Nodes
/dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
/dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0


Sound subsystem and version: OSS 4.2 (b 2006/201209060135) (0x00040100)
Platform: Linux/i686 3.4.10 #1 SMP Thu Sep 6 03:21:11 CEST 2012

*** Scanning sound adapter #-1 ***
/dev/oss/oss_hdaudio0/pcm0 (audio engine 0): HD Audio play front
- Performing audio playback test...
<left> Device returned error: Input/output error
/dev/oss/oss_hdaudio0/pcm1 (audio engine 1): HD Audio play rear
- Performing audio playback test...
<left> OK <right> OK <stereo> OK <measured srate 47993.00 Hz (-0.01%)>
/dev/oss/oss_hdaudio0/pcm2 (audio engine 2): HD Audio play center/LFE
- Performing audio playback test...
<left> OK <right> OK <stereo> OK <measured srate 47993.00 Hz (-0.01%)>
/dev/oss/oss_hdaudio0/pcm3 (audio engine 3): HD Audio play side
- Performing audio playback test...
<left> OK <right> OK <stereo> OK <measured srate 47993.00 Hz (-0.01%)>
/dev/oss/oss_hdaudio0/pcm4 (audio engine 4): HD Audio play pcm4
- Performing audio playback test...
<left> OK <right> OK <stereo> OK <measured srate 47995.00 Hz (-0.01%)>
/dev/oss/oss_hdaudio0/spdout0 (audio engine 5): HD Audio play spdif-out
- Performing audio playback test...
<left> OK <right> OK <stereo> OK <measured srate 47993.00 Hz (-0.01%)>
/dev/oss/oss_hdaudio0/pcmin0 (audio engine 6): HD Audio rec mix
- Skipping input only device
/dev/oss/oss_hdaudio0/pcmin1 (audio engine 7): HD Audio rec mix
- Skipping input only device

*** Some errors were detected during the tests ***

lsmod:
nvidia 10178325 32
oss_usb 101041 1
oss_hdaudio 139628 3
osscore 522605 2 oss_usb,oss_hdaudio
vboxnetadp 6259 0
vboxnetflt 16658 0
vboxdrv 170333 2 vboxnetadp,vboxnetflt
crc32c_intel 1348 0
coretemp 3568 0
Last edited by oss117 on Wed Sep 05, 2012 9:13 pm, edited 1 time in total.
oss117
Member
 
Posts: 11
Joined: Tue Jan 15, 2008 4:39 pm

Re: No or bad sound on ASRock Z68 mobo (ALC892)

Postby cesium » Wed Sep 05, 2012 7:02 pm

more exactly, after reinstalling OSS in a clean session (i.e. just rebooted and with ALSA modules loaded), I can get OSS to work for the duration of the session, but on reboot (either warm or cold reboots), I get no sound, or static, or utterly distorted sounds.
Hmm.. let's rephrase that: loading OSS after ALSA is loaded (and unloaded) works fine, but loading OSS on its own fails. Is this accurate? If so, this suggests OSS isn't initialising the card correctly...

Now, I recall there was an similar issue relating to some intel devices and hdaudio. IIRC, OSS needed the code below (your intel device is defined as the CPT one). Can you check if the code below is in your version of the source (at kernel/drv/oss_hdaudio/oss_hdaudio.c)?

Code: Select all
case INTEL_DEVICE_CPT:
    case INTEL_DEVICE_PBG:
    case INTEL_DEVICE_PPT:
    case INTEL_DEVICE_SCH:
          pci_read_config_word (osdev, 0x78, &devctl);
          DDB (cmn_err (CE_CONT, " DEVC register content  0x%04x\n", devctl);)
          pci_write_config_word (osdev, 0x78, (devctl & (~0x0800)) );
          DDB (pci_read_config_word (osdev, 0x78, &devctl);)
          DDB (cmn_err (CE_CONT, " DEVC register content (after clearing DEVC.NSNPEN)  0x%04x\n", devctl);)
          /* continue is intentional */
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: No or bad sound on ASRock Z68 mobo (ALC892)

Postby oss117 » Wed Sep 05, 2012 9:12 pm

Nope, the code reads:

Code: Select all
  switch (device)
    {
    case INTEL_DEVICE_SCH:
       pci_read_config_word (osdev, 0x78, &devctl);
     DDB (cmn_err (CE_CONT, " DEVC register content  0x%04x\n", devctl);)
       pci_write_config_word (osdev, 0x78, (devctl & (~0x0800)) );
       DDB (pci_read_config_word (osdev, 0x78, &devctl);)
     DDB (cmn_err (CE_CONT, " DEVC register content (after clearing DEVC.NSNPEN)  0x%04x\n", devctl);)
     /* continue is intentional */
    case INTEL_DEVICE_ICH6:
    case INTEL_DEVICE_ICH7:
    case INTEL_DEVICE_ESB2:
    case INTEL_DEVICE_ICH8:
    case INTEL_DEVICE_ICH9:
    case INTEL_DEVICE_P35:
    case INTEL_DEVICE_ICH10:
    case INTEL_DEVICE_ICH10_B:
    case INTEL_DEVICE_PCH:
    case INTEL_DEVICE_PCH2:
    case INTEL_DEVICE_CPT:
      devc->chip_name = "Intel HD Audio";
      break;


It's OSS v4.2.2006 since 2007 sources are not available (I asked for them in the announcement forum a while ago, but got no reply)...

EDIT: I got the latest mercurial devel sources and compiled OSS from them (though they are still advertizing being 2006...) since it got the code the way you describe: the resulting hdaudio module works fine on my computer now, so the issue is solved (thanks for the head up !). Still, had 2007 sources been available, I won't have been hit by this issue in the first place... ;-P Any chance to get 2007 sources posted soon, please ?... Another thing I would *love* to see, is OSS reintegrated back in the Linux kernel... It's soooooo much better than ALSA and allows to get rid of all the stupid "sound daemons" thanks to its transparent mixer.
Last edited by oss117 on Wed Sep 05, 2012 9:54 pm, edited 1 time in total.
oss117
Member
 
Posts: 11
Joined: Tue Jan 15, 2008 4:39 pm

Re: No or bad sound on ASRock Z68 mobo (ALC892)

Postby cesium » Wed Sep 05, 2012 9:53 pm

[Edit: erase superfluous post. I didn't see your new edit while I was writing the above. Anyhow, I don't work at 4front, so I can't answer for them...]

[Edit2: I guess this happened again. Heh. I should quit while I'm only 2-0 behind :-)]
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: No or bad sound on ASRock Z68 mobo (ALC892)

Postby oss117 » Wed Sep 05, 2012 9:55 pm

Hehe... you posted while I was editing my last post... See the EDIT above. Thanks again !
oss117
Member
 
Posts: 11
Joined: Tue Jan 15, 2008 4:39 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest