Hacker News new | ask | show | jobs
by sprash 1960 days ago
Right now I have multiple capture devices (front mic, rear mic, capture) which can be selected in alsamixer via "Input source". It would be great to have another "virtual" capture device that uses e.g. front mic but routed through rnnoise so that rnnoise can be easily turned on/off by selecting the input source.

Unrelated to this I want to be able easily switch between my Headphones and HDMI output whereas HDMI out needs to be routed through dmix->alsaequal->softvol->HDMI. I gave up after spending two hours tinkering.

1 comments

I'm pretty sure the switch you're talking about is hardware level. If you want to turn rnnoise on/off you could create a new pcm rather than overriding the default, and then having the software select it. The README example of asoundrcs is for the most part the same, you'd just remove this secion:

  pcm.!default {
      type asym
      playback.pcm "cards.pcm.default"
      capture.pcm "rnnoise"
  }
As for the second thing, you could do what I do and use pcm_jack, like this:

  pcm.!default {
   type asym
   playback.pcm "plug:jack"
   capture.pcm "plug:rnnjack"
  }
  
  pcm.rnnjack {
   type rnnoise
   slave.pcm plug:jack
  }
Keep in mind this will need more setup, specifically to set JACK up, and is definitely overkill, but may be fun. Also, this config is how my setup works exactly.