Ubuntu Server 20.04를 실행하는 Raspberry Pi를 하드 재부팅해야 했고(전원 공급 장치 분리) 그 이후로 mocp
더 이상 콘솔 음악 플레이어를 실행할 수 없습니다. 프로그램이 OSS 및 ALSA 드라이버 초기화를 실행한 후 메시지와 함께 실패합니다.FATAL_ERROR: No valid sound driver!
(을 통해) 패키지를 지우고 다시 설치해 보았 apt-get purge mocp
으나 오류 메시지가 지속됩니다. 이 질문을 인터넷 검색하면 아주 오래된 스레드가 나옵니다(여기그리고여기) MOC 자체 토론 게시판에서는 이것이 ALSA 문제이거나 사운드 카드 문제라고 제안되었지만 실행하면 alsamixer
볼륨 변경과 같은 작업을 수행할 수 있기 때문에 확실하지 않습니다. 또한 오디오를 사용하는 다른 프로그램(예: mpg123)을 실행하면 오디오는 문제가 없습니다.
추출된 자세한 오류 로그는 mocp -F
아래와 같습니다. 내용이 조금 길어 죄송합니다. 이 문제의 원인이 무엇인지 아는 사람이 있습니까?
매우 감사합니다!
Aug 31 15:34:23.139072: main.c:1191 main(): This is Music On Console (version 2.6-alpha3)
Aug 31 15:34:23.139216: main.c:1195 main(): Configured: '--build=arm-linux-gnueabihf' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/arm-linux-gnueabihf' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' 'build_alias=arm-linux-gnueabihf' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/moc-NiZ4Xl/moc-2.6.0~svn-r2994=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fdebug-prefix-map=/build/moc-NiZ4Xl/moc-2.6.0~svn-r2994=. -fstack-protector-strong -Wformat -Werror=format-security'
Aug 31 15:34:23.139240: main.c:1205 main(): Running on: Linux 5.4.0-1015-raspi armv7l
Aug 31 15:34:23.140180: main.c:1157 log_command_line(): mocp -F
Aug 31 15:34:23.140265: main.c:1171 log_popt_command_line(): mocp --foreground
Aug 31 15:34:23.159074: decoder.c:700 load_plugins(): Loaded 11 decoders: aac flac modplug mp3 musepack opus sidplay2 sndfile speex vorbis wavpack
Aug 31 15:34:23.159160: server.c:360 server_init(): Starting MOC Server
Aug 31 15:34:23.159210: log.c:233 log_init_stream(): Writing log to: stdout
Aug 31 15:34:23.159384: server.c:300 log_process_stack_size(): Process's stack size: 8388608
Aug 31 15:34:23.159402: server.c:317 log_pthread_stack_size(): PThread's stack size: 8388608
Trying JACK...
Aug 31 15:34:23.160789: jack.c:121 error_cb(): ERROR: JACK: Cannot connect to server socket err = No such file or directory
Aug 31 15:34:23.160809: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.160847: jack.c:121 error_cb(): ERROR: JACK: Cannot connect to server request channel
Aug 31 15:34:23.160861: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.163010: jack.c:121 error_cb(): ERROR: JACK: jack server is not running or cannot be started
Aug 31 15:34:23.163028: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.163298: jack.c:121 error_cb(): ERROR: JACK: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Aug 31 15:34:23.163317: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.163332: jack.c:121 error_cb(): ERROR: JACK: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Aug 31 15:34:23.163344: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.163369: jack.c:148 moc_jack_init(): ERROR: jack_client_open() failed, status = 0x11
Aug 31 15:34:23.163381: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.163393: jack.c:150 moc_jack_init(): ERROR: Unable to connect to JACK server
Aug 31 15:34:23.163404: server.c:672 add_event_all(): No events have been added because there are no clients
Trying ALSA...
Aug 31 15:34:23.163423: alsa.c:477 alsa_init(): Initialising ALSA device: default
Aug 31 15:34:23.165678: alsa.c:365 alsa_init_mixer_channel(): ERROR: Can't find mixer PCM
Aug 31 15:34:23.165710: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.165733: alsa.c:365 alsa_init_mixer_channel(): ERROR: Can't find mixer Master
Aug 31 15:34:23.165751: server.c:672 add_event_all(): No events have been added because there are no clients
Trying OSS...
Aug 31 15:34:23.165829: oss.c:206 oss_init(): ERROR: Can't open mixer device /dev/mixer: No such file or directory
Aug 31 15:34:23.165851: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.165899: oss.c:71 open_dev(): ERROR: Can't open /dev/dsp: No such file or directory
Aug 31 15:34:23.165918: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.165939: oss.c:87 set_capabilities(): ERROR: Can't open the device.
Aug 31 15:34:23.165956: server.c:672 add_event_all(): No events have been added because there are no clients
Aug 31 15:34:23.166034: audio.c:926 find_working_driver(): FATAL ERROR: No valid sound driver!
답변1
mocp
또한 RPi에서 실행하는 데 문제가 있습니다 .
몇 가지 질문이 있습니다:
- 내 사용자는
audio
해당 그룹에 없으므로 sudo를 사용하여amixer
. 내 사용자를 그룹에 추가하면 문제가 해결되었습니다. - 내 구성(
~/.moc/config
의 복사본/usr/share/doc/moc/examples/config.example
)에서 ALSA는PCM
및 으로 설정되어 있습니다Master
. sudo
내 사용자 폴더에 있는 이 설정 파일은 실행 시 무시됩니다.-C
또는 구성 파일--config
이 sudo로 실행 중이고 구성 파일이 루트가 아닌 내 사용자에게 속하기 때문에 사용하기에 "안전하지 않습니다".- 내가 실행하면
amixer
표시됩니다.Simple mixer control 'Headphone',0
- moc 구성에서 ALSA 설정을
Headphone
대신 사용Master
하거나PCM
작동하기 시작하면