私はこのチュートリアルに従いました(https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/raspberry-pi-usage) MAX98357 I2SアンプをRaspberry Piに追加します。うまく動作しますが、最高と最低を調整できるソフトウェアイコライザーが必要です。/etc/asound.conf
ASLAのパッケージプラグインを使用してこれを達成するために必要な設定を理解できないようです。libasound2-plugin-equal
どんな提案がありますか?
私が持っているものと私が試したことについてのコメントは次のとおりです。
pcm.speakerbonnet {
type hw card 0
}
pcm.dmixer {
type dmix
ipc_key 1024
ipc_perm 0666
slave {
pcm "speakerbonnet"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
channels 2
}
}
ctl.dmixer {
type hw card 0
}
pcm.softvol {
type softvol
slave.pcm "dmixer"
control.name "PCM"
control.card 0
}
ctl.softvol {
type hw card 0
}
pcm.!default {
type plug
# this works (ie not using eq)
#slave.pcm "softvol"
# tried setting this to plugin, but this fails to produce sound
slave.pcm plugequal
}
# attempt to get libasound2-plugin-equal working
ctl.equal {
type equal
}
pcm.plugequal {
type equal
slave.pcm "dmixer"
}
pcm.equal {
type plug
slave.pcm plugequal
}
上記の構成では、次のような結果が得られます。
pi@pi:~ $ speaker-test -c2 --test=wav -w /usr/share/sounds/alsa/Front_Center.wav
speaker-test 1.1.8
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib pcm_params.c:2226:(snd1_pcm_hw_refine_slave) Slave PCM not usable
Broken configuration for playback: no configurations available: No such file or directory
Setting of hwparams failed: No such file or directory
pi@pi:~ $
pi@pi:~ $ mpg123 /tmp/test_song.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.25.10; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
[src/libout123/modules/alsa.c:204] error: get_formats_alsa(): no configuration available
Directory: /tmp/
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: test_song.mp3 ...
[src/libout123/modules/alsa.c:80] error: initialize_device(): no configuration available
main: [src/mpg123.c:309] error: out123 error 7: failed to open device
pi@pi:~ $
答え1
解決策は設定することです。slave.pmc "plug:dmix"
pcm.speakerbonnet {
type hw card 0
}
pcm.dmixer {
type dmix
ipc_key 1024
ipc_perm 0666
slave {
pcm "speakerbonnet"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
channels 2
}
}
ctl.dmixer {
type hw card 0
}
pcm.softvol {
type softvol
slave.pcm "dmixer"
control.name "PCM"
control.card 0
}
ctl.softvol {
type hw card 0
}
pcm.!default {
type plug
#slave.pcm "softvol"
slave.pcm plugequal
}
# attempt to get libasound2-plugin-equal working
ctl.equal {
type equal
}
pcm.plugequal {
type equal
slave.pcm "plug:dmix"
}
pcm.equal {
type plug
slave.pcm plugequal
}