You are not logged in.
Hi there,
I have a speaker set with quite heavy bass which is why I turn down the lower frequencies with alsaequal. This works quite well with the asoundrc-configuration in the wiki. Now I bought an usb-headset and I want to change between these two soundcards.
The problem is that I don't know how to tell alsa to use dmix _and_ my onboard soundcard _and_ alsaequal. Whenever I specify my soundcard it deactivates dmix. When I specify dmix it uses the default soundcard (with index 0) and not the one I want...
.asoundrc:
ctl.equal {
  type equal;
}
pcm.plugequal {
  type equal;
  #slave.pcm "Generic/Headset"; <- when I use that, dmix stops working
  slave.pcm "plug:dmix"; <- when I use that, I can't specify my soundcard
}
pcm.!default {
  type plug;
  slave.pcm plugequal;
}I'm at wits end, however I suspect that the asoundrc-documentation is not really newbie-friendly.
Grateful for any help!
Last edited by enyaw_ecurb (2010-05-28 15:56:28)
Offline
Well, got that solved (not for the flood of replies here in the forum ;-) )
The trick was to create an own dmix-device (obvious), specify the card there, use it in alsaequal _and_ set a working buffer size (not obvious). Apparently my card and/or dmix need a working buffer-size. I found a hint in the alsa-wiki, though. http://alsa.opensrc.org/index.php/Dmix# … E1712_chip
.asoundrc for my speakers
pcm.dmixer {
    type dmix
    ipc_key 1024 # must be unique!
   slave {
        pcm {
        type hw
        card SB # name of the card, see aplay -L
        device 0
    } 
    buffer_size 4096 # needs to be set!
    }
}
ctl.equal {
  type equal;
}
pcm.plugequal {
  type equal
  slave.pcm "plug:dmixer" 
  #needs "plug:" cause of floating point transition
}
ctl.!default {
    type hw
    card SB
}
pcm.!default {
  type plug
  slave.pcm plugequal
}.asoundrc for my headset. Don't need equalizer here, the bass is not so heavy ;-)
ctl.!default {
    type hw
    card Headset
}
pcm.dmixer {
    type dmix
    ipc_key 1024 # must be unique!
   slave {
        pcm {
        type hw
        card Headset
        device 0
    } 
    }
}
pcm.!default {
    type plug
    slave.pcm dmixer
}I have two asoundrcs in my homefolder and copy them over to .asoundrc per some alias when I want to switch. Not the most comfortable solution but at least I only need one command and _it works_.
Offline

Well done.
buffer_size 4096 # needs to be set!
Do you get a particular error message if this line is excluded? I'm interested in getting dmix fixed.
Offline

I didn't know about alsaequal until now.
It can be used as a bridge for any ladspa plugin, this is great!
D'you know how to change equalizer settings runtime?
thanks 
Last edited by kokoko3k (2010-05-28 18:49:19)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
@brebs: alsaplayer output without the line. The error message is not really helpful, I found the solution by trial-and-error.
Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: NONE
PERIOD_TIME: (125333 125334)
PERIOD_SIZE: NONE
PERIOD_BYTES: (22108 22112)
PERIODS: (1 2)
BUFFER_TIME: (250657 250658)
BUFFER_SIZE: 11054
BUFFER_BYTES: 44216
TICK_TIME: 0
Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: NONE
PERIOD_TIME: (125333 125334)
PERIOD_SIZE: NONE
PERIOD_BYTES: (22108 22112)
PERIODS: (1 2)
BUFFER_TIME: (250657 250658)
BUFFER_SIZE: 11054
BUFFER_BYTES: 44216
TICK_TIME: 0
failed to configure output device...trying OSS
error opening /dev/dsp
Failed to initialize plugin!
Failed to register plugin: /usr/lib/alsaplayer/output/liboss_out.so
failed to load output plugin (alsa). exitting...@kokoko3k: alsaequal was actually developed to provide runtime changes to the equalizer-settings, which is afaik not a trivial task using ladspa directly. See the ctl.equal part from my asoundrc? It creates a control device from type equal(izer). You can use this plugin with alsamixer per "alsamixer -D equal" and change your settings on-the-fly.
Offline

alsaplayer is not helpful here, it seems 
alsaplayer output without the line. The error message is not really helpful
Please check to see if a meaningful error message is returned by:
speaker-test -D default -c 2 -t wavOffline
brebs wrote:
Please check to see if a meaningful error message is returned by:
speaker-test -D default -c 2 -t wav
Well, that one got me startled.
speaker-test _and_ aplay run perfectly fine and throw no errors at all. I do not need to set the buffer size.
alsaplayer and apparently all other alsa programs I tried do not work without it. They throw (meaningless) errors and shut down. 
I used the same .wav-files with all programs.
Unfortunately I do not have the time or nerve (or the need) to find the exact cause of the problem. However, if you have suggestions, I would be glad to try them.
Offline