Page 1 of 1

[SOLVED] S/PDIF mute on boot by default

PostPosted: May 24th, '13, 12:37
by turgon
I have HDMI from computer to TV.
I have two channels in alsamixer: "S/PDIF" and "S/PDIF D"
When i boot computer, "S/PDIF" always on mute ("MM") and "S/PDIF" always on.

How can i get both channels on by default??

I am on Mageia 3, KDE, x32. Using PulseAudio.

Re: S/PDIF mute on boot by default

PostPosted: May 24th, '13, 13:27
by wintpe
this also used to be the case with the soundblaster cards in mga1

you can use alsactl with a save option to save the settings.

then in /etc/rc.local on boot you run alsactl to apply those saved settings.

use alsamixer to set the settings initialy.

im just skimming this from memory, so you will have to learn about alsamixer and alsactl to find the method im talking about.

regards peter

Re: S/PDIF mute on boot by default

PostPosted: May 24th, '13, 20:45
by turgon
I getting lost :(
I saved wanted alsa settings with "alsactl store".
Then i created file "spdif" in created folder "/etc/rc.d/rc.local":
Code: Select all
#!/bin/bash
alsactl restore


chmod +x path_to_file
reboot

NOTHING.. :(

Re: S/PDIF mute on boot by default

PostPosted: May 25th, '13, 11:06
by turgon
Someone?

Re: S/PDIF mute on boot by default

PostPosted: May 26th, '13, 21:28
by turgon
So that's how i did it:
1. Configure alsa settings and then:
Code: Select all
alsactl store

2. Create file: /etc/systemd/system/rc-local.service:
Code: Select all
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

[Unit]
Description=/etc/rc.d/rc.local Compatibility
ConditionPathExists=/etc/rc.d/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.d/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target


3.
Code: Select all
chmod +x /etc/systemd/system/rc-local.service

4. Create file: nano /etc/rc.d/rc.local:
Code: Select all
#!/bin/bash
sleep 60
alsactl restore


5.
Code: Select all
chmod +x nano /etc/rc.d/rc.local

6.
Code: Select all
systemctl enable rc-local.service

7.
Code: Select all
systemctl start rc-local.service


Thank you!