やりたいことは次の通り。
- Raspberry Pi 2のHDMI端子で映像を出力する
- HiFiBerry Digi+ Standardで音声を出力する
- VNCでHDMIでの映像出力上で操作する
LAN内からしかアクセスできないようにするのでVNC接続のパスワードは設定しない。
x11vncのインストール。
$ sudo apt-get install x11vnc/lib/systemd/system/x11vnc.service の作成。
[Unit]サービスの有効化。
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target
$ sudo systemctl daemon-reloadConfiguring Linux 4.x or higher – HiFiBerryを参考にして/boot/config.txtを編集してHiFiBerry Digi+を有効にする。
$ sudo systemctl enable x11vnc.service
$ sudo diff -u /boot/config.txt.orig /boot/config.txtあとALSAのために/etc/asound.confを作成する。
--- /boot/config.txt.orig 2017-03-29 15:49:10.000000000 +0900
+++ /boot/config.txt 2017-03-29 18:11:32.000000000 +0900
@@ -53,7 +53,9 @@
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
-dtparam=audio=on
+#dtparam=audio=on
+dtoverlay=hifiberry-digi
+
# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
pcm.!default {"$ aplay -l"でデバイスが有効になっているのか確認する。
type hw card 0
}
ctl.!default {
type hw card 0
}
0 件のコメント:
コメントを投稿