2015-09-10 15 views
19

Ich habe einen funktionierenden PCM-Ausgang mit gut klingender Audio auf einem Raspberry Pi Compute-Modul (Linux) mit dem RPI-DAc. Die ‚aplay -l‘ Befehlsausgabe zeigt folgendes:ALSA Konfiguration Wie man MMAP Emulation und Ladspa Plugin in asound.conf kombiniert

>> aplay -l 
**** List of PLAYBACK Hardware Devices **** 
card 0: sndrpirpidac [snd_rpi_rpi_dac], device 0: RPi-DAC HiFi pcm1794a-hifi-0 [] 
Subdevices: 1/1 
Subdevice #0: subdevice #0 
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] 
Subdevices: 8/8 
Subdevice #0: subdevice #0 
Subdevice #1: subdevice #1 
Subdevice #2: subdevice #2 
Subdevice #3: subdevice #3 
Subdevice #4: subdevice #4 
Subdevice #5: subdevice #5 
Subdevice #6: subdevice #6 
Subdevice #7: subdevice #7 
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] 
Subdevices: 1/1 
Subdevice #0: subdevice #0 

die Audio Um überhaupt zu arbeiten, hatte ich meine /etc/asound.conf Datei zu ändern wie folgt aussehen:

pcm.mmap0 { 
    type mmap_emul 
    slave { 
    pcm "hw:0,0" 
    } 
} 

pcm.!default { 
    type plug 
    slave { 
    pcm mmap0 
    } 
} 

Der Ausgang klingt großartig, wenn ich .wav-Dateien spiele, aber es ist ein bisschen leise und alsamixer erlaubt keine Lautstärkeregelung mit diesem Treiber.

Ich möchte ein wenig mehr Volumen bekommen und so recherchierte ich das Plugin Plugin Software Plugin Software. Der folgende Beispielcode steigert das Volumen auf dem 3,5-mm-Klinke auf normalen Pi:

pcm.radio { 
    type plug 
    slave.pcm "ladspa" 
    hint { 
     show on 
     description "in -> equal -> declip -> compressor -> limiter -> dmix -> out" 
    } 
} 

# LADSPA plugins: 
# "listplugins" to see the list of installed plugins 
# "analyseplugin <filename>" to see plugin controls 
# Use "ardour2" to experiment with plugin settings 
pcm.ladspa { 
    type ladspa 
    slave.pcm "plughw:0,0" 
    path "/usr/lib/ladspa" 
    plugins { 
     0 { 
     # Limiter 
      label amp 
      input { 
       controls [ 10 ] 
      } 
      } 
    } 
} 

Ich habe hier die Dokumentation gelesen: http://alsa.opensrc.org/Asoundrc, aber ich bin zu kämpfen mit dem Verständnis, wie die 2 kombinieren - ich will MMAP-Emulation sowie die Verstärkung. Wie kann ich das erreichen? Vielen Dank.

+0

haben Sie versucht, den Soft Volume ALSA-Plugin? scheint sich ebenfalls zu verstärken (siehe http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html für einige Details) –

Antwort

2

Versuchen nächste Einstellung bitte, kann es unter meinem x86 Linux arbeiten:

pcm.mmap0 { 
    type mmap_emul 
    slave { 
     pcm "hw:0,0" 
     # pcm ladspa 
    } 
} 

pcm.ladspa { 
type ladspa 
#slave.pcm "plughw:0,0" 
slave.pcm mmap0 
path "/usr/lib/ladspa" 
plugins { 
    0 { 
    # Limiter 
     label amp 
     input { 
      controls [ 100 ] 
     } 
     } 
} 
} 

pcm.!default{ 
type plug 
slave { 
    pcm mmap0 
    #pcm ladspa 
    } 
}