WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: VT8237A/VT8251 No Sound  (Read 16314 times)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: VT8237A/VT8251 No Sound
« Reply #30 on: June 13, 2017, 08:18:37 PM »
You want continued help?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: VT8237A/VT8251 No Sound
« Reply #31 on: June 13, 2017, 09:40:00 PM »
^ true, anyways, in order to save ALSA settings, the commend
Code: [Select]
sudo alsactl store
is always required to be ran before backup + reboot/shutdown, for the config file to be updated so the settings can be restored after reboot.
« Last Edit: June 13, 2017, 09:42:00 PM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: VT8237A/VT8251 No Sound
« Reply #32 on: June 13, 2017, 11:32:36 PM »
Quote
sudo alsactl store is always required to be ran before backup + reboot/shutdown, for the config file to be updated so the settings can be restored after reboot.

Sure you can take that route if it works for you..  My argument is that saving the alsa settings hasn't been the most successful plan (for me anyhow), so I don't take that route anymore.  In fact I haven't made a backup of asound.state in a long time despite various complex hardware configurations and TC versions.    After some research I found you can command a change to any alsamixer control via the command line, Including unmuting any control eg: master control, SPDIF additionally set the volume to specific levels, etc. etc.   Typically I find that after allowing Alsa to configure itself on bootup there remains only unmuting a few specific volume controls, SPDIF channels and volume levels to get sound.  All of this can all be accomplished reliably with a few commands run from ~/.X.d/alsa  which is by far more reliable than hoping alsa will restore every custom setting, which appears to be somewhat temperamental in that department..

I'm not sure yet what other alsamixer controls the OP changed to get sound.   However, this and a few similar commands for other controls resolves my dilemma and will probably resolve his issue too.
echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute

Obviously ~/.X.d/alsaunmute will be needing some persistence over reboot
« Last Edit: June 13, 2017, 11:40:42 PM by coreplayer2 »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: VT8237A/VT8251 No Sound
« Reply #33 on: June 14, 2017, 04:07:44 AM »
I didn't know ALSA is unreliable when it comes to restoring its settings. Maybe because I'm not a Linux kid for too long, yet.
A few TC versions back, this was needed for me in bootlocal.sh
Code: [Select]
[ -e /usr/local/sbin/alsactl ] && /usr/local/sbin/alsactl restore >/dev/null 2>&1
which is now done by an udev rule.
Other than this udev rule not working in the past I had no trouble with the settings being restored.
Download a copy and keep it handy: Core book ;)

Offline evertvaningen

  • Jr. Member
  • **
  • Posts: 60
Re: VT8237A/VT8251 No Sound
« Reply #34 on: June 14, 2017, 06:04:32 AM »
Where to add ~/.X.d/alsaunmute ?

I did echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute
and checked Alsamixer afterwards but the volume is still on 39 (unmuted) :s
« Last Edit: June 14, 2017, 06:06:16 AM by evertvaningen »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: VT8237A/VT8251 No Sound
« Reply #35 on: June 14, 2017, 06:16:01 AM »
"~" means /home/$USER

..so by default, ~/.X.d/alsaunmute = /home/tc/.X.d/alsaunmute

Note that the leading dot in .X.d makes it hidden, so to see it you need, for example, "ls -a ~"

Offline evertvaningen

  • Jr. Member
  • **
  • Posts: 60
Re: VT8237A/VT8251 No Sound
« Reply #36 on: June 14, 2017, 06:26:29 AM »
Quote
sudo alsactl store is always required to be ran before backup + reboot/shutdown, for the config file to be updated so the settings can be restored after reboot.

Sure you can take that route if it works for you..  My argument is that saving the alsa settings hasn't been the most successful plan (for me anyhow), so I don't take that route anymore.  In fact I haven't made a backup of asound.state in a long time despite various complex hardware configurations and TC versions.    After some research I found you can command a change to any alsamixer control via the command line, Including unmuting any control eg: master control, SPDIF additionally set the volume to specific levels, etc. etc.   Typically I find that after allowing Alsa to configure itself on bootup there remains only unmuting a few specific volume controls, SPDIF channels and volume levels to get sound.  All of this can all be accomplished reliably with a few commands run from ~/.X.d/alsa  which is by far more reliable than hoping alsa will restore every custom setting, which appears to be somewhat temperamental in that department..

I'm not sure yet what other alsamixer controls the OP changed to get sound.   However, this and a few similar commands for other controls resolves my dilemma and will probably resolve his issue too.
echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute

Obviously ~/.X.d/alsaunmute will be needing some persistence over reboot

It's so difficult for me to understand all this this even with the corebook. This is all new for me and so far im enjoying the OS and trying to find solutions.

You guys are awesome for helping me.

So the next step is to issue -> echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute
In the terminal and then nano somewhere and add ~/.X.d/alsaunmute somewhere in /opt/.filetool.lst or somewhere else?

I dont know...

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: VT8237A/VT8251 No Sound
« Reply #37 on: June 14, 2017, 06:47:30 AM »
Code: [Select]
$echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute ..will create a file named ~/.X.d/alsaunmute containing "amixer set "Master" 80 unmute"

By default, everything contained in /home/tc and its subdirectories will be backed up.

There is a dry run mode to filetool.sh that will list everything that would be inlcuded in your backup.

Offline evertvaningen

  • Jr. Member
  • **
  • Posts: 60
Re: VT8237A/VT8251 No Sound
« Reply #38 on: June 14, 2017, 07:01:14 AM »
Code: [Select]
$echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute ..will create a file named ~/.X.d/alsaunmute containing "amixer set "Master" 80 unmute"

By default, everything contained in /home/tc and its subdirectories will be backed up.

There is a dry run mode to filetool.sh that will list everything that would be included in your backup.

cd /home/tc/.X.d | ls tells me the file is there so all good. But why does it still reset after reboot?
« Last Edit: June 14, 2017, 07:23:37 AM by evertvaningen »

Offline evertvaningen

  • Jr. Member
  • **
  • Posts: 60
Re: VT8237A/VT8251 No Sound
« Reply #39 on: June 14, 2017, 07:45:33 AM »
Amixer set "Master" 39

Works and when I check AlsaMixer master is set to 83...

echo "amixer set "Master" 39 unmute" > ~/.X.d/alsaunmute

Did the trick, glad that part is over.


I want to thank everyone that helped me in this matter. All my topics solutions are used in a tutorial for a HP T510 Thin Client Internet Radio.
« Last Edit: June 14, 2017, 08:03:48 AM by evertvaningen »

Offline evertvaningen

  • Jr. Member
  • **
  • Posts: 60
Re: VT8237A/VT8251 No Sound
« Reply #40 on: June 14, 2017, 08:30:39 AM »
Nope, after a few reboots the problem is back again...

When I do echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute

And reboot, my volume is at 100% I want 80
« Last Edit: June 14, 2017, 08:35:17 AM by evertvaningen »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: VT8237A/VT8251 No Sound
« Reply #41 on: June 14, 2017, 08:56:13 AM »
Add a percent sign
Code: [Select]
amixer set "Master" 80% unmute
Download a copy and keep it handy: Core book ;)

Offline evertvaningen

  • Jr. Member
  • **
  • Posts: 60
Re: VT8237A/VT8251 No Sound
« Reply #42 on: June 14, 2017, 09:02:28 AM »
Add a percent sign
Code: [Select]
amixer set "Master" 80% unmute

After reboot volume at 39  :-\

Manual input amixer set "Master" 39 unmute sets the volume to correct 83

Tried: echo "amixer set "Master" 39 unmute" > ~/.X.d/alsaunmute
Volume is ok after reboot...

So wierd.

Rebooted againt to be extra sure... back to volume 39 again...

WTF...

*reboot volume 39
*reboot volume 83
*reboot volume 83
*reboot volume 83
*reboot volume 39
*reboot volume 39
*reboot volume 83

What is this? *sight

I'll reinstall and report back.

Now the volume is sticking to what I set it to after reboot :)
« Last Edit: June 14, 2017, 09:32:42 AM by evertvaningen »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11625
Re: VT8237A/VT8251 No Sound
« Reply #43 on: June 14, 2017, 09:41:34 AM »
Hi evertvaningen
It sounds like maybe you still had one of the previous restore mechanisms in place possibly creating a race condition.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: VT8237A/VT8251 No Sound
« Reply #44 on: June 14, 2017, 09:44:14 AM »
ALSA sets the volume in a spectrum of 32 levels (0=0% - 31=100%). So 80% should actually be 25.

Anyway, you might have a timing inconsistency at boot (ALSA udev rule vs. X.d auto start script).
Try adding a sleep command to the X.d script
Code: [Select]
{ sleep 2 ; amixer set "Master" 80% unmute ; } &
(the curly brackets and the ampersand make those two commands run in background so this script won't pause the execution of subsequent scripts)
Download a copy and keep it handy: Core book ;)