私たちはLinuxベースの組み込みボードを開発し、もちろんalsaを使用して評価ボードデザインからプロセッサとオーディオチップをコピーしました。評価ボードでは、オーディオの再生と録音が正しく機能します。私たちのマザーボードでは再生機能のみが機能します。 「arecord」は動作しますが、実際に音は受信されません。私たちはドライバのソースコードを修正していません。デバイスツリーは評価ボードと同じように構成されます。
オーディオコントローラに必要なイネーブルビットが設定されていないため、alsaが録音したときにデバイスを設定していないようです。ビットを手動で設定すると、サンプリング周波数が間違っているにもかかわらず録音が機能します。
alsamixerの設定を何度も確認しましたが、すべての値が合理的なようです。したがって、alsaがこのように振る舞うようにするいくつかの設定があるかもしれません。わかりません。
alsamixer設定に入力ミュートスイッチがありません。ソースコードで定義されていますが、alsamixerには表示されません。ミキサーの入力がミュートされていることを確認するために「alsactl store」を実行し、結果ファイルを調べました。ミュートされていません。
私が何を試すことができるか知っていますか?または、ソースコードのどの部分でコントローラを有効にする必要がありますか?
プロセッサはAtmel SAMA5D4で、オーディオチップはWM8904です。 Linuxバージョン5.15.32オーディオドライバ:
sound/soc/atmel/atmel_wm8904.c sound/soc/codecs/wm8904.c
ミキサー:
Simple mixer control 'Headphone',0
Capabilities: volume pswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 63
Front Left: 45 [71%] [-12.00dB] Playback [on]
Front Right: 45 [71%] [-12.00dB] Playback [on]
Simple mixer control 'Headphone ZC',0
Capabilities: pswitch
Playback channels: Front Left - Front Right
Mono:
Front Left: Playback [on]
Front Right: Playback [on]
Simple mixer control 'Line Output',0
Capabilities: volume pswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 63
Front Left: 57 [90%] [0.00dB] Playback [on]
Front Right: 57 [90%] [0.00dB] Playback [on]
Simple mixer control 'Line Output ZC',0
Capabilities: pswitch
Playback channels: Front Left - Front Right
Mono:
Front Left: Playback [on]
Front Right: Playback [on]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 31
Front Left: Capture 5 [16%] [on]
Front Right: Capture 5 [16%] [on]
Simple mixer control 'ADC 128x OSR',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'AIFOUTL Mux',0
Capabilities: enum
Items: 'Left' 'Right'
Item0: 'Left'
Simple mixer control 'AIFOUTR Mux',0
Capabilities: enum
Items: 'Left' 'Right'
Item0: 'Right'
Simple mixer control 'DAC Deemphasis',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'DAC OSRx2',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'DACL Mux',0
Capabilities: enum
Items: 'Left' 'Right'
Item0: 'Left'
Simple mixer control 'DACR Mux',0
Capabilities: enum
Items: 'Left' 'Right'
Item0: 'Right'
Simple mixer control 'DRC',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'DRC Path',0
Capabilities: enum
Items: 'ADC' 'DAC'
Item0: 'ADC'
Simple mixer control 'Digital',0
Capabilities: pvolume cvolume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 96 Capture 0 - 119
Front Left: Playback 96 [100%] [0.00dB] Capture 96 [81%] [0.00dB]
Front Right: Playback 96 [100%] [0.00dB] Capture 96 [81%] [0.00dB]
Simple mixer control 'Digital Playback Boost',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 3
Mono: 0 [0%] [0.00dB]
Simple mixer control 'Digital Sidetone',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 15
Front Left: 0 [0%] [-36.00dB]
Front Right: 0 [0%] [-36.00dB]
Simple mixer control 'EQ',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'EQ1',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 24
Mono: 12 [50%] [0.00dB]
Simple mixer control 'EQ2',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 24
Mono: 12 [50%] [0.00dB]
Simple mixer control 'EQ3',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 24
Mono: 12 [50%] [0.00dB]
Simple mixer control 'EQ4',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 24
Mono: 12 [50%] [0.00dB]
Simple mixer control 'EQ5',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 24
Mono: 12 [50%] [0.00dB]
Simple mixer control 'HPL Mux',0
Capabilities: enum
Items: 'DAC' 'Bypass'
Item0: 'DAC'
Simple mixer control 'HPR Mux',0
Capabilities: enum
Items: 'DAC' 'Bypass'
Item0: 'DAC'
Simple mixer control 'High Pass Filter',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'High Pass Filter Mode',0
Capabilities: enum
Items: 'Hi-fi' 'Voice 1' 'Voice 2' 'Voice 3'
Item0: 'Hi-fi'
Simple mixer control 'LINEL Mux',0
Capabilities: enum
Items: 'DAC' 'Bypass'
Item0: 'DAC'
Simple mixer control 'LINER Mux',0
Capabilities: enum
Items: 'DAC' 'Bypass'
Item0: 'DAC'
Simple mixer control 'Left Capture Inverting Mux',0
Capabilities: enum
Items: 'IN1L' 'IN2L' 'IN3L'
Item0: 'IN1L'
Simple mixer control 'Left Capture Mode',0
Capabilities: enum
Items: 'Single-Ended' 'Differential Line' 'Differential Mic'
Item0: 'Single-Ended'
Simple mixer control 'Left Capture Mux',0
Capabilities: enum
Items: 'IN1L' 'IN2L' 'IN3L'
Item0: 'IN2L'
Simple mixer control 'Left Sidetone',0
Capabilities: enum
Items: 'None' 'Left' 'Right'
Item0: 'None'
Simple mixer control 'Right Capture Inverting Mux',0
Capabilities: enum
Items: 'IN1R' 'IN2R' 'IN3R'
Item0: 'IN1R'
Simple mixer control 'Right Capture Mode',0
Capabilities: enum
Items: 'Single-Ended' 'Differential Line' 'Differential Mic'
Item0: 'Single-Ended'
Simple mixer control 'Right Capture Mux',0
Capabilities: enum
Items: 'IN1R' 'IN2R' 'IN3R'
Item0: 'IN2R'
Simple mixer control 'Right Sidetone',0
Capabilities: enum
Items: 'None' 'Left' 'Right'
Item0: 'None'
/var/lib/alsa/asound.state:
state.SAMA5D4GGARD {
control.1 {
iface MIXER
name 'EQ1 Volume'
value 12
comment {
access 'read write'
type INTEGER
count 1
range '0 - 24'
dbmin -1200
dbmax 1200
dbvalue.0 0
}
}
control.2 {
iface MIXER
name 'EQ2 Volume'
value 12
comment {
access 'read write'
type INTEGER
count 1
range '0 - 24'
dbmin -1200
dbmax 1200
dbvalue.0 0
}
}
control.3 {
iface MIXER
name 'EQ3 Volume'
value 12
comment {
access 'read write'
type INTEGER
count 1
range '0 - 24'
dbmin -1200
dbmax 1200
dbvalue.0 0
}
}
control.4 {
iface MIXER
name 'EQ4 Volume'
value 12
comment {
access 'read write'
type INTEGER
count 1
range '0 - 24'
dbmin -1200
dbmax 1200
dbvalue.0 0
}
}
control.5 {
iface MIXER
name 'EQ5 Volume'
value 12
comment {
access 'read write'
type INTEGER
count 1
range '0 - 24'
dbmin -1200
dbmax 1200
dbvalue.0 0
}
}
control.6 {
iface MIXER
name 'Digital Capture Volume'
value.0 96
value.1 96
comment {
access 'read write'
type INTEGER
count 2
range '0 - 119'
dbmin -9999999
dbmax 1725
dbvalue.0 0
dbvalue.1 0
}
}
control.7 {
iface MIXER
name 'Capture Volume'
value.0 5
value.1 5
comment {
access 'read write'
type INTEGER
count 2
range '0 - 31'
}
}
control.8 {
iface MIXER
name 'Capture Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.9 {
iface MIXER
name 'High Pass Filter Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.10 {
iface MIXER
name 'High Pass Filter Mode'
value Hi-fi
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Hi-fi
item.1 'Voice 1'
item.2 'Voice 2'
item.3 'Voice 3'
}
}
control.11 {
iface MIXER
name 'ADC 128x OSR Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.12 {
iface MIXER
name 'Digital Playback Boost Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 3'
dbmin 0
dbmax 1800
dbvalue.0 0
}
}
control.13 {
iface MIXER
name 'Digital Playback Volume'
value.0 96
value.1 96
comment {
access 'read write'
type INTEGER
count 2
range '0 - 96'
dbmin -9999999
dbmax 0
dbvalue.0 0
dbvalue.1 0
}
}
control.14 {
iface MIXER
name 'Headphone Volume'
value.0 45
value.1 45
comment {
access 'read write'
type INTEGER
count 2
range '0 - 63'
dbmin -5700
dbmax 600
dbvalue.0 -1200
dbvalue.1 -1200
}
}
control.15 {
iface MIXER
name 'Headphone Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.16 {
iface MIXER
name 'Headphone ZC Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.17 {
iface MIXER
name 'Line Output Volume'
value.0 57
value.1 57
comment {
access 'read write'
type INTEGER
count 2
range '0 - 63'
dbmin -5700
dbmax 600
dbvalue.0 0
dbvalue.1 0
}
}
control.18 {
iface MIXER
name 'Line Output Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.19 {
iface MIXER
name 'Line Output ZC Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.20 {
iface MIXER
name 'EQ Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.21 {
iface MIXER
name 'DRC Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.22 {
iface MIXER
name 'DRC Path'
value ADC
comment {
access 'read write'
type ENUMERATED
count 1
item.0 ADC
item.1 DAC
}
}
control.23 {
iface MIXER
name 'DAC OSRx2 Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.24 {
iface MIXER
name 'DAC Deemphasis Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.25 {
iface MIXER
name 'Digital Sidetone Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 15'
dbmin -3600
dbmax 900
dbvalue.0 -3600
dbvalue.1 -3600
}
}
control.26 {
iface MIXER
name 'Left Capture Mux'
value IN2L
comment {
access 'read write'
type ENUMERATED
count 1
item.0 IN1L
item.1 IN2L
item.2 IN3L
}
}
control.27 {
iface MIXER
name 'Left Capture Inverting Mux'
value IN1L
comment {
access 'read write'
type ENUMERATED
count 1
item.0 IN1L
item.1 IN2L
item.2 IN3L
}
}
control.28 {
iface MIXER
name 'Left Capture Mode'
value Single-Ended
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Single-Ended
item.1 'Differential Line'
item.2 'Differential Mic'
}
}
control.29 {
iface MIXER
name 'Right Capture Mux'
value IN2R
comment {
access 'read write'
type ENUMERATED
count 1
item.0 IN1R
item.1 IN2R
item.2 IN3R
}
}
control.30 {
iface MIXER
name 'Right Capture Inverting Mux'
value IN1R
comment {
access 'read write'
type ENUMERATED
count 1
item.0 IN1R
item.1 IN2R
item.2 IN3R
}
}
control.31 {
iface MIXER
name 'Right Capture Mode'
value Single-Ended
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Single-Ended
item.1 'Differential Line'
item.2 'Differential Mic'
}
}
control.32 {
iface MIXER
name 'AIFOUTL Mux'
value Left
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Left
item.1 Right
}
}
control.33 {
iface MIXER
name 'AIFOUTR Mux'
value Right
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Left
item.1 Right
}
}
control.34 {
iface MIXER
name 'DACL Mux'
value Left
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Left
item.1 Right
}
}
control.35 {
iface MIXER
name 'DACR Mux'
value Right
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Left
item.1 Right
}
}
control.36 {
iface MIXER
name 'Left Sidetone'
value None
comment {
access 'read write'
type ENUMERATED
count 1
item.0 None
item.1 Left
item.2 Right
}
}
control.37 {
iface MIXER
name 'Right Sidetone'
value None
comment {
access 'read write'
type ENUMERATED
count 1
item.0 None
item.1 Left
item.2 Right
}
}
control.38 {
iface MIXER
name 'HPL Mux'
value DAC
comment {
access 'read write'
type ENUMERATED
count 1
item.0 DAC
item.1 Bypass
}
}
control.39 {
iface MIXER
name 'HPR Mux'
value DAC
comment {
access 'read write'
type ENUMERATED
count 1
item.0 DAC
item.1 Bypass
}
}
control.40 {
iface MIXER
name 'LINEL Mux'
value DAC
comment {
access 'read write'
type ENUMERATED
count 1
item.0 DAC
item.1 Bypass
}
}
control.41 {
iface MIXER
name 'LINER Mux'
value DAC
comment {
access 'read write'
type ENUMERATED
count 1
item.0 DAC
item.1 Bypass
}
}
}