Ceci est une ancienne révision du document !
Table des matières
Activer sortie son sur HDMI
https://doc.ubuntu-fr.org/son_via_le_port_hdmi
sudo gedit /etc/default/grub changer "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"" en "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.audio=1"" sudo update-grub redémarrer
Doc en vrac
http://askubuntu.com/questions/216370/vlc-media-player-sound-problems-in-12-10/221922#221922
https://itsfoss.com/fix-sound-ubuntu-1304-quick-tip/
http://askubuntu.com/questions/112512/ubuntu-refuses-to-output-audio-via-hdmi
http://askubuntu.com/questions/112512/ubuntu-refuses-to-output-audio-via-hdmi
Outils installés
sudo apt-get install libasound2-plugins "pulseaudio-*" paman pavucontrol paprefs pavumeter gnome-alsamixer gstreamer-properties gnome-alsamixer gnome-volume-control sudo apt-get install pavucontrol pavucontrol
Si la sortie refuse de fonctionner après mise en veille par exemple, il faut réinitialiser pulse: http://askubuntu.com/questions/230888/is-there-another-way-to-restart-the-sound-system-if-pulseaudio-alsa-dont-work
pulseaudio -k && sudo /sbin/alsa force-reload
Pour autoriser alsa sans taper le mot de passe sudo sudo
sudo visudo bvandepo ALL=(ALL:ALL) NOPASSWD:/sbin/alsa force-reload
Allumer/Eteindre la TV
allumer via WIFI
activer le Wake On Lan sur la tv
MAC_ADDR=74:DF:BF:09:3D:CF wakeonlan $MAC_ADDR
éteindre via WIFI
Pour déterminer quel trafic permet d'éteindre, installation de “philips Telecommande” sur android et installation de “packet capture” sur android: https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture&hl=fr
dans l'appli “philips Telecommande” , régler l'ip de la tv, puis appuyer sur le bouton off. le traffic capturé par “packet capture” est le suivant:
C'est une demande post HTTP sur le port 1925 qui permet donc d'éteindre la TV. Avec cette info, je trouve l'API: http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API.html
Pour générer les requettes post, j'ai essayé avec python et wget mais la tv réponds “Service Unavailable”. Finalement, ça fonctionne avec curl: http://stackoverflow.com/questions/4797534/how-do-i-manually-fire-http-post-requests-with-firefox-or-chrome
Pour éteindre: http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API-Method-input-key-POST.html
curl -i -X POST -H 'Content-Type: application/json' -d '{"key": "Standby"}' http://192.168.1.31:1925/1/input/key
Pour selectionner entrée HDMI 3: http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API-Method-sources-current-POST.html
curl -i -X POST -H 'Content-Type: application/json' -d '{"id": "hdmi3"}' http://192.168.1.31:1925/1/sources/current
CEC
tentative infructueuse car nécessite matériel que je n'ai pas…
http://blog.endpoint.com/2012/11/using-cec-client-to-control-hdmi-devices.html
sudo apt-get install cec-utils cec-client --list-devices libCEC version: 3.0.1, compiled on Linux-3.13.0-77-generic ... , features: P8_USB, P8_detect, randr Found devices: NONE
il faut un adaptateur pour ajouter les signaux CEC au HDMI, car il n'est pas généré par la carte video: https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter
Why don't I already have it? Almost all graphics cards do not support CEC in any form, and others only in a limited form. This device allows Kodi and libCEC to access the CEC communications link and send and receive control messages.