View previous topic :: View next topic |
Author |
Message |
penetrode Apprentice
Joined: 29 Dec 2003 Posts: 285 Location: Calgary, Alberta
|
Posted: Wed Jun 18, 2008 11:55 pm Post subject: Intel HD audio - no hardware mixing? [SOLVED] |
|
|
I have an Intel DQ35J0 with the onboard Intel HD audio. This board has the Realtek ALC268 codec in it.
I'm getting mixed information about whether this board supports hardware mixing. It seems amazing to me that it wouldn't, given all the multi-channel features it has. I've seen posts from people claiming that hardware mixing works on their ALC268 devices.
My problem: multiple sound applications cannot make sound at the same time
Example:
If I am playing music in Audacious, then run mplayer at the same time, mplayer complains:
Code: |
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz (Family: 6, Model: 15, Stepping: 11)
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled
SSE2 supported but disabled
CPUflags: MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions:
Playing PSA05_small.mpg.
MPEG-PS file format detected.
VIDEO: MPEG1 352x240 (aspect 12) 29.970 fps 256.0 kbps (32.0 kbyte/s)
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 352 x 240 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy
ao_nas: init(): Can't open nas audio server -> nosound
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
[AO SDL] Unable to open audio: No available audio device
DVB card number must be between 1 and 4
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 352 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.30:1 - prescaling to correct movie aspect.
VO: [xv] 352x240 => 352x270 Planar YV12
A: 7.6 V: 7.6 A-V: 0.009 ct: -0.080 213/213 0% 0% 0.4% 0 0
MPlayer interrupted by signal 2 in module: sleep_timer
A: 7.7 V: 7.7 A-V: 0.008 ct: -0.080 214/214 0% 0% 0.4% 0 0
Exiting... (Quit)
|
It complains that it cannot open the device and then sends the sound to the null device. If I close Audacious and then try again, the sound works.
Generally sound works and the kernel seems to detect the adapter:
Code: |
$ /usr/sbin/lspci | grep Audio
00:1b.0 Audio device: Intel Corporation HD Audio Controller (rev 02)
|
Code: |
$ dmesg | grep -B5 HD
Advanced Linux Sound Architecture Driver Version 1.0.15 (Tue Nov 20 19:16:42 2007 UTC).
ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 22 (level, low) -> IRQ 23
PCI: Setting latency timer of device 0000:00:1b.0 to 64
hda_codec: Unknown model for ALC268, trying auto-probe from BIOS...
ALSA device list:
#0: HDA Intel at 0x90420000 irq 23
|
It seems to be detected properly but that message about the "Unknown model for ALC268" makes me wonder.
All the ALSA components are compiled into the kernel, rather than as modules, as per the recommended configuration.
I do have a Soundblaster Live card that I was using before, and I never had this problem. Still, it's really hard to believe that this Intel controller can't do hardware mixing. I've used other AC97 controllers and they all worked fine (OOTB).
Help!
Last edited by penetrode on Thu Jun 19, 2008 4:54 pm; edited 1 time in total |
|
Back to top |
|
|
Akkara Bodhisattva
Joined: 28 Mar 2006 Posts: 6702 Location: &akkara
|
Posted: Thu Jun 19, 2008 12:09 am Post subject: |
|
|
I believe you need to use "dmix" to do what you want.
I (used to [*]) have this in my /etc/asound.conf: Code: | defaults.pcm.rate_converter "samplerate_best"
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 16384
format "S32_LE"
#rate 96000
#rate 88200
#rate 48000
rate 44100
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 0
} |
Uncomment out the 'rate' line that corresponds to the sampling rate of the source you listen to the most.
---
Additional commentary:
Regarding hardware mixing or lack thereof: I had found many cards implemented it poorly, so given a choice between good audio and using dmix, or crappy audio without dmix, I'll choose the former. Dmix, being open source, can always be improved. Whereas if the hardware's mixer is crappy, you're stuck with it.
[*] Used to: When I'm listening to something, that's usually the *only* thing I want to hear. I got annoyed with web-pages that would blast out sound uninvited, or apps with their various boops and dings, and rather than figure out how to turn each off individually, I went back to single-sourced sound. |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Thu Jun 19, 2008 9:07 am Post subject: |
|
|
I found that messing with .asoundrc or /etc/asound.conf usually makes things worse. Dmix is enabled by default on hda-intel sound cards, there should be no need for any additional configuration.
@penetrode: Is Audacious maybe configured to OSS instead of ALSA? Do other apps also make problems or is it only Audacious? Also, hda-intel does not support hardware mixing, neither does AC97. That's why ALSA is by default configured for dmix on these cards.
Hmm, I also see mplayer first tries to use OSS, maybe this screws up things. Try adding -ao alsa to the mplayer command. |
|
Back to top |
|
|
penetrode Apprentice
Joined: 29 Dec 2003 Posts: 285 Location: Calgary, Alberta
|
Posted: Thu Jun 19, 2008 4:53 pm Post subject: |
|
|
Okay, I figured out a few things.
One -- hardware mixing. If the card supports hardware mixing, then
Code: |
cat /proc/asound/card0/pcm0p/info | grep subdevices_count
|
will give a result greater than 1.
Sadly, this Intel hardware does not (so, if you have Intel HD audio and it uses Realtek ALC268, I can say definitively, no hardware mixing. Any impression people might have that this controller does hardware mixing is probably a false one created by ALSA, or Windows )
On the subject of ALSA mixing -- for apps that use ALSA, software mixing is working on this machine.
The reason Audacious wasn't working: I had ALSA output turned on, but had the "hw:0,0" audio device selected. You need to select "default" as your audio device. If you select the hardware directly, it bypasses ALSA and blocks the device.
That said, I think I will probably go back to my SB Live! card, which did hardware mixing and worked beautifully -- but I can say that I've got this Intel sound working as it should.
Thanks for your help! |
|
Back to top |
|
|
Slow_cyclist n00b
Joined: 11 Apr 2009 Posts: 6
|
Posted: Wed Nov 07, 2012 8:27 pm Post subject: |
|
|
I had a similar problem with mplayer after updating my system a few days back. Running mplayer with '-ao alsa' did the trick. (And then I re-emerged with -oss). |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|