I banged my head on this some more and solved most of my problem.
The issues were:
- My sound card (Echo Audio Mia) needs device and
subdevice specification (ex, hw:0,0,0)
- The first device seems to always be consumed by some unknown
app. (BTW, how can I see what is attached to hw:0,0,0, so I can
kill the program that is grabbing it?) So, I have to use
hw:0,0,2, which is hardware-mixed into the same outputs as
hw:0,0,0.
- Finally, I needed to call dmix as a "plug" to enable automatic
rate conversion.
FWIW, here is my final .asoundrc file. If you have any suggestions
on improving it, please let me know. It's a whopper! ;)
# Set default sound card
# Useful so that all settings can be changed to a different card
here.
pcm.mia_out {
type hw
card 0
device 0
subdevice 0
#rate 96000
#format S32_LE
#channels 2
}
pcm.mia_in {
type hw
card 0
device 0
subdevice 0
#rate 96000
#format S32_LE
#channels 2
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
pcm mia_out
period_time 0
period_size 1024
buffer_size 8192
rate 96000
format S32_LE
channels 2
}
bindings {
0 0
1 1
}
}
# Allow reading from the default device.
# Also known as record or capture.
pcm.dsnooper {
type dsnoop
ipc_key 2048
#slave.pcm mia_in
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
pcm mia_in
period_time 0
period_size 1024
buffer_size 8192
rate 96000
format S32_LE
channels 2
}
bindings {
0 0
1 1
}
}
# This is what we want as our default device
# a fully duplex (read/write) audio device.
pcm.duplex {
type asym
playback.pcm "dmixer"
capture.pcm "dsnooper"
}
###################
# CONVERSION PLUG #
###################
# Setting the default pcm device allows the conversion
# rate to be selected on the fly.
# duplex mode allows any alsa enabled app to read/write
# to the dmix plug (Fixes a problem with wine).
pcm.!default {
type plug
slave.pcm "duplex"
}
########
# AOSS #
########
# OSS dsp0 device (OSS needs only output support, duplex will
break some stuff)
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
# OSS control for dsp0 (needed?...this might not be useful)
ctl.dsp0 {
type plug
slave.pcm "mia_out"
}
# OSS control for dsp0 (default old OSS is mixer0)
ctl.mixer0 {
type plug
slave.pcm "mia_out"
Hope this helps someone else.
Thanks!
Trevor
On 03/20/2011 01:42 PM, m27315 wrote:
Hello,
I have a simple, functional .asoundrc file, which directs all out
output directly to "dmix". This good .asoundrc file contains:
pcm.!default {
type plug
slave.pcm "dmix"
}
pcm.dsp0 {
type plug
slave.pcm "dmix"
}
ctl.mixer0 {
type hw
card 0
}
Using this, I can "aplay" sounds very easily. If I try to make a
simple alias of dmix, call it dmixer, I get the following errors
in aplay:
ALSA lib
pcm_direct.c:980:(snd1_pcm_direct_initialize_slave) unable to
install hw params
ALSA lib pcm_dmix.c:1030:(snd_pcm_dmix_open) unable to
initialize slave
aplay: main:660: audio open error: Resource temporarily
unavailable
This second .asoundrc file looks like:
pcm.dmixed {
type dmix
ipc_key 313
slave.pcm "hw:0"
}
pcm.!default {
type plug
slave.pcm "dmixed"
}
pcm.dsp0 {
type plug
slave.pcm "dmixed"
}
ctl.mixer0 {
type hw
card 0
}
What is the functional difference between these two .asoundrc
files? Why does the first one work and the second one does not?
Many thanks!
Trevor
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user
|
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user