From: Christian Heller Date: Wed, 24 Feb 2021 01:33:14 +0000 (+0100) Subject: Move Raspbian dotfiles into own directory. X-Git-Url: https://plomlompom.com/repos/add_task?a=commitdiff_plain;h=146c20a9eb231e77138869dcc186d0e132554192;p=config Move Raspbian dotfiles into own directory. --- diff --git a/.asoundrc b/.asoundrc deleted file mode 100644 index 46eb301..0000000 --- a/.asoundrc +++ /dev/null @@ -1,73 +0,0 @@ -# using hdmi0 for TV stereo, hdmi1 for a 5.1 speaker set-up -# unfortunately, a non-square speaker number creates some noise -# therefore for hdmi1 we declare 8 speakers, but re-map them to 6 speakers -pcm.hdmi0 { - type hw - card 0 -} -pcm.hdmi1 { - type route - slave { - pcm "hw:1,0" - channels 8 - } - ttable { - 0.0 = 1 - 1.1 = 1 - 2.2 = 1 - 3.3 = 1 - 4.4 = 1 - 5.5 = 1 - 6.0 = 0.5 - 6.2 = 0.5 - 7.1 = 0.5 - 7.3 = 0.5 - } -} - -# upmix stereo to 5.1 – so we can watch stereo YouTube on all speakers -# with this: $ chromium-browser --alsa-output-device=stereo51 -# (numbers taken from ) -pcm.stereo51 { - type route - slave { - pcm "hw:1,0" - channels 8 - } - ttable { - 0.0 = 1 - 0.2 = -0.6 - 0.3 = -0.39 - 0.4 = 0.5 - 0.5 = 0.5 - 1.1 = 1 - 1.2 = -0.6 - 1.3 = -0.39 - 1.4 = 0.5 - 1.5 = 0.5 - } -} - -# default to hdmi0, overwrite with AUDIO_HDMI=1 env prefix -pcm.!default { - type plug - slave.pcm { - @func concat - strings [ - "hdmi" - { - @func getenv - vars [ AUDIO_HDMI ] - default "0" - } - ] - } -} -ctl.!default { - type hw - card { - @func getenv - vars [ AUDIO_HDMI ] - default 0 - } -} diff --git a/.bash_aliases b/.bash_aliases deleted file mode 100644 index 0429868..0000000 --- a/.bash_aliases +++ /dev/null @@ -1,10 +0,0 @@ -# for whatever reason, emulationstation gets some strange screen flicker issues -# if the second display is activated, so ensure it is only started with that off -alias emulationstation="xrandr --output HDMI-2 --off && emulationstation" - -# since the second HDMI only outputs sound with video, we have to ensure it's -# activated with xrandr if we want to use it for surround sound setup -alias mpv51="xrandr --output HDMI-2 --auto && AUDIO_HDMI=1 mpv --alsa-ignore-chmap '--audio-channels=5.1(alsa)'" -alias chromium-upmix="xrandr --output HDMI-2 --auto && chromium-browser --alsa-output-device=stereo51" -alias alsamixer51="AUDIO_HDMI=1 alsamixer" - diff --git a/raspbian/.asoundrc b/raspbian/.asoundrc new file mode 100644 index 0000000..46eb301 --- /dev/null +++ b/raspbian/.asoundrc @@ -0,0 +1,73 @@ +# using hdmi0 for TV stereo, hdmi1 for a 5.1 speaker set-up +# unfortunately, a non-square speaker number creates some noise +# therefore for hdmi1 we declare 8 speakers, but re-map them to 6 speakers +pcm.hdmi0 { + type hw + card 0 +} +pcm.hdmi1 { + type route + slave { + pcm "hw:1,0" + channels 8 + } + ttable { + 0.0 = 1 + 1.1 = 1 + 2.2 = 1 + 3.3 = 1 + 4.4 = 1 + 5.5 = 1 + 6.0 = 0.5 + 6.2 = 0.5 + 7.1 = 0.5 + 7.3 = 0.5 + } +} + +# upmix stereo to 5.1 – so we can watch stereo YouTube on all speakers +# with this: $ chromium-browser --alsa-output-device=stereo51 +# (numbers taken from ) +pcm.stereo51 { + type route + slave { + pcm "hw:1,0" + channels 8 + } + ttable { + 0.0 = 1 + 0.2 = -0.6 + 0.3 = -0.39 + 0.4 = 0.5 + 0.5 = 0.5 + 1.1 = 1 + 1.2 = -0.6 + 1.3 = -0.39 + 1.4 = 0.5 + 1.5 = 0.5 + } +} + +# default to hdmi0, overwrite with AUDIO_HDMI=1 env prefix +pcm.!default { + type plug + slave.pcm { + @func concat + strings [ + "hdmi" + { + @func getenv + vars [ AUDIO_HDMI ] + default "0" + } + ] + } +} +ctl.!default { + type hw + card { + @func getenv + vars [ AUDIO_HDMI ] + default 0 + } +} diff --git a/raspbian/.bash_aliases b/raspbian/.bash_aliases new file mode 100644 index 0000000..0429868 --- /dev/null +++ b/raspbian/.bash_aliases @@ -0,0 +1,10 @@ +# for whatever reason, emulationstation gets some strange screen flicker issues +# if the second display is activated, so ensure it is only started with that off +alias emulationstation="xrandr --output HDMI-2 --off && emulationstation" + +# since the second HDMI only outputs sound with video, we have to ensure it's +# activated with xrandr if we want to use it for surround sound setup +alias mpv51="xrandr --output HDMI-2 --auto && AUDIO_HDMI=1 mpv --alsa-ignore-chmap '--audio-channels=5.1(alsa)'" +alias chromium-upmix="xrandr --output HDMI-2 --auto && chromium-browser --alsa-output-device=stereo51" +alias alsamixer51="AUDIO_HDMI=1 alsamixer" +