Configuring ALSA makes one feel that going to Hell and taking over Sisyphus’ job is an extremely appealing option.

To get Mumble barnard working with the Adafruit I2S MEMS Microphone Breakout on the Raspberry Pi.

My working ~/.asoundrc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This section makes a reference to your I2S hardware, adjust the card name
# to what is shown in arecord -l after card x: before the name in []
# You may have to adjust channel count also but stick with default first
pcm.dmic_hw {
  type hw
  card sndrpisimplecar
  channels 2
  format S32_LE
  rate 48000
}

# This is the software volume control, it links to the hardware above and after
# saving the .asoundrc file you can type alsamixer, press F6 to select
# your I2S mic then F4 to set the recording volume and arrow up and down to adjust the volume
# After adjusting the volume - go for 50 percent at first, you can do something like
# arecord -D dmic_sv -c2 -r 48000 -f S32_LE -t wav -V mono -v myfile.wav
pcm.dmic_sv {
  type softvol
  slave.pcm dmic_hw
  control {
    name "Boost Capture Volume"
    card sndrpisimplecar
  }
  min_dB -3.0
  max_dB 30.0
}

# This plugin converts the mono input to stereo.
pcm.mono2stereo {
  type route
  slave.pcm dmic_sv
  slave.channels 2
  # ttable.input_channel.output_channel volume_gain
  ttable.0.0 1
  ttable.0.1 1
}

# The "plug" plugin converts channels, rate and format on request.
# In our case it converts the 32 format to whatever the application request.
pcm.convert {
  type plug
  slave {
    pcm mono2stereo
  }
}

# Default capture and playback devices
pcm.!default {
  type asym
  capture.pcm convert
  playback.pcm "hw:0,0" # Note: the default output may also need a plug.
}