Alsa 녹음이 활성화되지 않았습니다

Alsa 녹음이 활성화되지 않았습니다

우리는 리눅스 기반의 임베디드 보드를 개발했고, 물론 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
                }
        }
}

관련 정보