内蔵ヘッドフォン出力の設定でHDMIモニタをつないだ時に音が出なくなる。
原因と対策を調査する。
●「raspi-config」の構成が変更されている。
● オーディオ設定の項目は「1. System Option」から「S2. Audio」を選択。
● 設定は再起動後に反映される。
pi@raspberrypi:~ $ amixer controls numid=2,iface=MIXER,name='Headphone Playback Switch' numid=1,iface=MIXER,name='Headphone Playback Volume'出力先設定はnumid=2、音量設定はnumid=1であることがわかる。
pi@raspberrypi:~ $ amixer cget numid=2 numid=2,iface=MIXER,name='Headphone Playback Switch' ; type=BOOLEAN,access=rw------,values=1 : values=on pi@raspberrypi:~ $ amixer cget numid=1 numid=1,iface=MIXER,name='Headphone Playback Volume' ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0 : values=-174 | dBscale-min=-102.39dB,step=0.01dB,mute=1
pi@raspberrypi:~ $ amixer cset numid=1 100% numid=1,iface=MIXER,name='Headphone Playback Volume' ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0 : values=400 | dBscale-min=-102.39dB,step=0.01dB,mute=1
pi@raspberrypi:~ $ alsactl store alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists pi@raspberrypi:~ $ sudo alsactl store
pi@raspberrypi:~ $ aplay -l **** ハードウェアデバイス PLAYBACK のリスト **** カード 0: Headphones [bcm2835 Headphones], デバイス 0: bcm2835 Headphones [bcm2835 Headphones] サブデバイス: 8/8 サブデバイス #0: subdevice #0 サブデバイス #1: subdevice #1 サブデバイス #2: subdevice #2 サブデバイス #3: subdevice #3 サブデバイス #4: subdevice #4 サブデバイス #5: subdevice #5 サブデバイス #6: subdevice #6 サブデバイス #7: subdevice #7 pi@raspberrypi:~ $ ls -l /proc/asound 合計 0 lrwxrwxrwx 1 root root 5 12月 8 16:00 Device -> card1 lrwxrwxrwx 1 root root 5 12月 8 16:00 Headphones -> card0 dr-xr-xr-x 3 root root 0 12月 8 16:00 card0 dr-xr-xr-x 3 root root 0 12月 8 16:00 card1 -r--r--r-- 1 root root 0 12月 8 16:00 cards -r--r--r-- 1 root root 0 12月 8 16:00 devices -r--r--r-- 1 root root 0 12月 8 16:00 hwdep -r--r--r-- 1 root root 0 12月 8 16:00 modules dr-xr-xr-x 2 root root 0 12月 8 16:00 oss -r--r--r-- 1 root root 0 12月 8 16:00 pcm dr-xr-xr-x 2 root root 0 12月 8 16:00 seq -r--r--r-- 1 root root 0 12月 8 16:00 timers -r--r--r-- 1 root root 0 12月 8 16:00 version pi@raspberrypi:~ $ cat /proc/asound/cards 0 [Headphones ]: bcm2835_headphonbcm2835 Headphones - bcm2835 Headphones bcm2835 Headphones 1 [Device ]: USB-Audio - USB PnP Sound Device C-Media Electronics Inc. USB PnP Sound Device at usb-0000:01:00.0-1.1, full spe
pi@raspberrypi:~ $ amixer controls numid=2,iface=MIXER,name='HDMI Playback Switch' numid=1,iface=MIXER,name='HDMI Playback Volume'出力先設定はnumid=2、音量設定はnumid=1 HDMIデバイスに設定されている。
pi@raspberrypi:~ $ amixer cget numid=2 ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0 : values=0 | dBscale-min=-102.39dB,step=0.01dB,mute=1 pi@raspberrypi:~ $ amixer cget numid=1 numid=1,iface=MIXER,name='Headphone Playback Volume' ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0 : values=-174 | dBscale-min=-102.39dB,step=0.01dB,mute=1
pi@raspberrypi:~ $ amixer cset numid=1 100% numid=1,iface=MIXER,name='HDMI Playback Volume' ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0 : values=400 | dBscale-min=-102.39dB,step=0.01dB,mute=1
pi@raspberrypi:~ $ sudo alsactl store
pi@raspberrypi:~ $ aplay -l **** ハードウェアデバイス PLAYBACK のリスト **** カード 0: b1 [bcm2835 HDMI 1], デバイス 0: bcm2835 HDMI 1 [bcm2835 HDMI 1] サブデバイス: 4/4 サブデバイス #0: subdevice #0 サブデバイス #1: subdevice #1 サブデバイス #2: subdevice #2 サブデバイス #3: subdevice #3 カード 1: Headphones [bcm2835 Headphones], デバイス 0: bcm2835 Headphones [bcm2835 Headphones] サブデバイス: 4/4 サブデバイス #0: subdevice #0 サブデバイス #1: subdevice #1 サブデバイス #2: subdevice #2 サブデバイス #3: subdevice #3 pi@raspberrypi:~ $ ls -l /proc/asound 合計 0 lrwxrwxrwx 1 root root 5 12月 8 16:08 Device -> card2 lrwxrwxrwx 1 root root 5 12月 8 16:08 Headphones -> card1 lrwxrwxrwx 1 root root 5 12月 8 16:08 b1 -> card0 dr-xr-xr-x 3 root root 0 12月 8 16:08 card0 dr-xr-xr-x 3 root root 0 12月 8 16:08 card1 dr-xr-xr-x 3 root root 0 12月 8 16:08 card2 -r--r--r-- 1 root root 0 12月 8 16:08 cards -r--r--r-- 1 root root 0 12月 8 16:08 devices -r--r--r-- 1 root root 0 12月 8 16:08 hwdep -r--r--r-- 1 root root 0 12月 8 16:08 modules dr-xr-xr-x 2 root root 0 12月 8 16:08 oss -r--r--r-- 1 root root 0 12月 8 16:08 pcm dr-xr-xr-x 2 root root 0 12月 8 16:08 seq -r--r--r-- 1 root root 0 12月 8 16:08 timers -r--r--r-- 1 root root 0 12月 8 16:08 version pi@raspberrypi:~ $ cat /proc/asound/cards 0 [b1 ]: bcm2835_hdmi - bcm2835 HDMI 1 bcm2835 HDMI 1 1 [Headphones ]: bcm2835_headphonbcm2835 Headphones - bcm2835 Headphones bcm2835 Headphones 2 [Device ]: USB-Audio - USB PnP Sound Device C-Media Electronics Inc. USB PnP Sound Device at usb-0000:01:00.0-1.1, full spe
pi@raspberrypi:~ $ cat /proc/asound/modules 0 snd_bcm2835 1 snd_bcm2835 2 snd_usb_audio pi@raspberrypi:~ $ cat /etc/modprobe.d/alsa-base.conf cat: /etc/modprobe.d/alsa-base.conf: そのようなファイルやディレクトリはありません pi@raspberrypi:~ $ ls -a . .cache .local .theano Desktop Public bluebacks stop.sh .. .config .mozc .viminfo Documents Templates boot.sh webiopi .Xauthority .dbus .pki .vimrc Downloads Tensorflow-YOLOv3 env wget .asoundrc .gconf .pp_backup .vnc MagPi Videos googletest.sh work .bash_history .gnupg .profile .wget-hsts Music Voice mu_code .bash_logout .gvfs .python_history .xsession-errors Pictures aispk.sh out.raw .bashrc .keras .selected_editor .xsession-errors.old Programs assistant-sdk-python raspberryai-mizutu-ec573de141fd.json