Re: Broken ALSA surround sound with OpenALSoft 1.12 and newer
Chris Robinson <[email protected]> Mon, 27 Feb 2012 03:27:15 -0800
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <3303007.0sQXGDBiJR@kittycat> |
On Monday, February 27, 2012 11:00:20 AM Martin Egge wrote: > What has changed beetween 1.11 and 1.12 and might have broken the 5.1 output > here? The only related thing that changed is that, instead of setting the number of periods and the period size in sample frames (or the nearest possible; the buffer size is then inferred from period_size * periods), it sets the buffer size and period size in microseconds (or the nearest possible; periods is then inferred from buffer_size / period_size) so that it better scales if the sample rate was changed. I don't see any reason for the changes to cause a failure, though. The functions snd_pcm_hw_params_set_buffer_time_near and snd_pcm_hw_params_set_period_time_near are supposed to set values closest to what the device is capable of. > > You can try modifying the 'periods' setting in alsoft.conf. The default is > > 4, but you can try setting it to 2 or 3 to reduce the buffer size. > > That didn't change anything. What about setting 'mmap' to 'false' under the [alsa] section? Do you have a ~/.alsoftrc (and if so, what's in it)? > > Out of curiousity, what audio hardware do you have? > > Output of lspci -vv > > 07:00.0 Multimedia audio controller: Creative Labs CA0106 Soundblaster > Subsystem: Creative Labs SB0410 SBLive! 24-bit Okay, so you have a real sound card. Pretty sure that does hardware mixing, so you don't need dmix. > Yes, please send me an example. I've attached an /etc/asound.conf I use to define a 'dmix6' device. It plays back at 48khz and has an 18ms period size and 90ms buffer size, and accepts CARD, DEV, and SUBDEV arguments similar the the default dmix. _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal
asound.conf
(text/plain, 1 KB)
pcm.dmix6 {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func refer
name defaults.pcm.dmix.card
}
}
@args.DEV {
type integer
default {
@func refer
name defaults.pcm.dmix.device
}
}
@args.SUBDEV {
type integer
default 0
}
type dmix
ipc_key 1024
ipc_key_add_uid false # let multiple users share
ipc_perm 0660 # IPC permissions (octal, default 0600)
slave {
pcm {
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
rate 48000
channels 6
period_time 18000
buffer_time 90000
}
hint {
show on
description "Direct sample mixing device (5.1 Surround)"
device $DEV
}
}
ctl.dmix6 {
@args [ CARD ]
@args.CARD {
type string
default {
@func refer
name defaults.pcm.dmix.card
}
}
type hw
card $CARD
}