Tiny Core Linux
Tiny Core Base => CorePlus => Topic started by: evertvaningen on June 13, 2017, 09:04:49 AM
-
lspci output: Audio device: VIA Tecknologies, Inc. VT8237A/VT8251 HDA Controller (rev 20)
Installed: pulseaudio.tcz, mpg123.tcz and mplayer.tcz
[I did this - from pulseaudio description]
howto:
alsa needs to be working for whatever sound device you have
exit to console
create ~/.X.d/dbus containing:
"dbus-launch --sh-syntax --exit-with-session"
startx
$ pulseaudio -vv [to test]
create ~/.X.d/pulseaudio containing:
"pulseaudio -D" [once tested]
Opened Mplayer with http://91.221.151.155:80/;?.mp3 in terminal.
It goes streaming but not sound, what do I need to do to get this working?
-
It might be a good idea to load pavucontrol and check where the sound output is routed to.
-
Or maybe loading only alsa.tcz isn't enough.
tce-load -w alsa-config.tcz
and manually add alsa-config.tcz just before alsa.tcz in your onboot list file. Then reboot.
-
It might be a good idea to load pavucontrol and check where the sound output is routed to.
Build-in Audio Analog Stereo
Port: Analog Output
Only Analog Output is selectable.
-
Or maybe loading only alsa.tcz isn't enough.
tce-load -w alsa-config.tcz
and manually add alsa-config.tcz just before alsa.tcz in your onboot list file. Then reboot.
That is the location of the onboot list file?
-
/etc/sysconfig/tcedir/onboot.lst
http://tinycorelinux.net/book.html
-
Or maybe loading only alsa.tcz isn't enough.
tce-load -w alsa-config.tcz
and manually add alsa-config.tcz just before alsa.tcz in your onboot list file. Then reboot.
It worked!
pavucontrol of not effected, I cant change the volume <- how to fix?
I am writing a project for a Internet Radio on a HP t510. When it's done can I post it here on the form for everyone to enjoy?
After reboot, audio not working again.
-
I'm not using Pulse, so can't tell much about that one.
However, to save ALSA settings, run
sudo alsactl store
... and to make this persist across reboots, run
echo "usr/local/etc/alsa/asound.state" >> /opt/.filetool.lst
... and, of course, make a backup
filetool.sh -b
-
I'm not using Pulse, so can't tell much about that one.
However, to save ALSA settings, run
sudo alsactl store
... and to make this persist across reboots, run
echo "usr/local/etc/alsa/asound.state" >> /opt/.filetool.lst
... and, of course, make a backup
filetool.sh -b
I rebooted after that and put mplayer http://91.221.151.155:80/;?.mp3 into terminal...
No sound :(
tc@box:~$ mplayer http://91.221.151.155:80/;?.mp3
MPlayer 1.1-4.9.1 (C) 2000-2012 MPlayer Team
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled
SSE2 supported but disabled
Playing http://91.221.151.155:80/.
Connecting to server 91.221.151.155[91.221.151.155]: 80...
Name : Arrow Classic Rock
Genre : Rock
Website: http://www.arrow.nl
Public : no
Bitrate: 128kbit/s
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes)
Audio only file format detected.
=========================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 54.23.100 (internal)
AUDIO: 44100 Hz, 2 ch, floatle, 128.0 kbit/4.54% (ratio: 16000->352800)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
=========================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Video: no video
Starting playback...
/bin/sh: ?.mp3: not foundnknown) 3.9% 18%
-
/bin/sh: ?.mp3: not foundnknown) 3.9% 18%
Use quotes for URLs
mplayer "http://91.221.151.155:80/;?.mp3"
-
/bin/sh: ?.mp3: not foundnknown) 3.9% 18%
This is what you get after you pressed Ctrl + Z, it does work without the "..."
-
I am writing me the things I need to do to get things working.
I'll reinstall and begin a new.
When I'm at this point again I'll report back ;)
-
What I did:
1: Installing BCM4328 driver:
http://forum.tinycorelinux.net/index.php/topic,21138.0.html
Install WL modules first then nano in order to edit the config file to make the WL modules work.
nano /etc/sysconfig/tcedir/boot/extlinux/extlinux.conf and add "blacklist=b43,ssb,bcma" to boot conf file.
2: Write Script to make device auto connect to Wifi SSID with WPA2 protection:
Source: http://forum.tinycorelinux.net/index.php?topic=12441.0
After click wifi icon to connect to WLAN, go to /etc to find a file called wpa_supplicant.conf, copy it to /opt so it becomes persistent, this file contains credentials of your WLAN, it's generated every time you click the icon to connect.
Source: http://distro.ibiblio.org/tinycorelinux/dCore/armv7/GK802/README-wifi.txt
Once wifi is operational, then to automate connection at boot perform the following:
Edit the onboot list to add the following two items:
$ nano /etc/sysconfig/tcedir/onboot.lst
wifi.tcz
Edit the bootlocal file to attempt connection at boot time (optional)
$ nano /opt/bootlocal.sh
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log
Finally be sure to backup before poweroff or reboot.
$ backup
$ sudo poweroff
3: Get Sound working
Install alsa.tcz
Install alsa-config.tcz
and manually add alsa-config.tcz just before alsa.tcz in your onboot list file (/etc/sysconfig/tcedir/onboot.lst)
to save ALSA settings, run
sudo alsactl store
... and to make this persist across reboots, run
echo "usr/local/etc/alsa/asound.state" >> /opt/.filetool.lst
... and, of course, make a backup
filetool.sh -b
Then reboot.
Installed mplayer and mpg123
After that
run
mplayer http://91.221.151.155:80/;?.mp3
Still no audio... :(
-
You need to load alsa-config before alsa
It might be easier to use the following to test if sound works: $ speaker-test -Ddefault:0 -c2 -t wav -l1
[change default to suit multiple cards]
Also, if the following shows that you have an HDMI audio device, you might need to load the graphics-KERNEL and Xorg-7.7 extensions before alsa-config and alsa: $ aplay -l
-
You need to load alsa-config before alsa
It might be easier to use the following to test if sound works: $ speaker-test -Ddefault:0 -c2 -t wav -l1
[change default to suit multiple cards]
Also, if the following shows that you have an HDMI audio device, you might need to load the graphics-KERNEL and Xorg-7.7 extensions before alsa-config and alsa: $ aplay -l
In the onboot.lst
alsa-config.tcz is listed above alsa.tcz
Trying
$ speaker-test -Ddefault:0 -c2 -t wav -l1
... no sound.
-
Check your mixer settings.
-
After click wifi icon to connect to WLAN, go to /etc to find a file called wpa_supplicant.conf, copy it to /opt so it becomes persistent, this file contains credentials of your WLAN, it's generated every time you click the icon to connect.
I don't understand why this should be necessary.
WiFi credentials are stored in ~/wifi.db and the first entry is used for auto-connecting via wifi.sh -a .
Since you mentioned you would make a new start, is pulseaudio installed again?
You don't need Pulseaudio for MPlayer if you're not doing anything special.
-
Trying
$ speaker-test -Ddefault:0 -c2 -t wav -l1
... no sound.
Did you get an error message?, did you try -Ddefault:1, what did "aplay -l" give?
-
After click wifi icon to connect to WLAN, go to /etc to find a file called wpa_supplicant.conf, copy it to /opt so it becomes persistent, this file contains credentials of your WLAN, it's generated every time you click the icon to connect.
I don't understand why this should be necessary.
WiFi credentials are stored in ~/wifi.db and the first entry is used for auto-connecting via wifi.sh -a .
Since you mentioned you would make a new start, is pulseaudio installed again?
You don't need Pulseaudio for MPlayer if you're not doing anything special.
How would you do that part?
I don't know what i'm doing and no Pulseaudio is not installed.
-
Trying
$ speaker-test -Ddefault:0 -c2 -t wav -l1
... no sound.
Did you get an error message?, did you try -Ddefault:1, what did "aplay -l" give?
tc@box:~$ speaker-test -D default:0 -c 2 -t wav -l1
speaker-test 1.1.3
Playback device is default:0
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 8192
Period size range from 1024 to 1024
Using max buffer size 8192
Periods = 4
was set period_size = 1024
was set buffer_size = 8192
0 - Front Left
1 - Front Right
Time per period = 2.855988
tc@box:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=VT82xx
HDA VIA VT82xx, VT1708S Analog
Default Audio Device
sysdefault:CARD=VT82xx
HDA VIA VT82xx, VT1708S Analog
Default Audio Device
front:CARD=VT82xx,DEV=0
HDA VIA VT82xx, VT1708S Analog
Front speakers
surround21:CARD=VT82xx,DEV=0
HDA VIA VT82xx, VT1708S Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=VT82xx,DEV=0
HDA VIA VT82xx, VT1708S Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=VT82xx,DEV=0
HDA VIA VT82xx, VT1708S Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=VT82xx,DEV=0
HDA VIA VT82xx, VT1708S Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=VT82xx,DEV=0
HDA VIA VT82xx, VT1708S Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=VT82xx,DEV=0
HDA VIA VT82xx, VT1708S Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
-
Here there talking about a bug for my hardware...
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299
Is this alarming?
-
How would you do that part?
When a connection to a WIFI network is successfully established via wifi.sh , an entry is created in ~/wifi.db , containing SSID and key. The first entry is used for auto-connect.
-
How can I get this Hardware to generate sound waves? :'(
It did work but after reboot it's gone...
I really appreciate your attention to this matter ❤️
-
I'll reinstall and try PulseAudio this time.
Installing PulseAudio and pavucontrol worked for me but I needed first to do what was mentioned in the description of PulseAudio.
-
This is so weird:
After reboot I click on Pavucontrol... unmute Analog Output... set's audio volume to 100%
Why do I need to do this?
Can this be automated on boot?
-
I used Alsamixer and try to disable the Auto-mute but the option isn't there to store with...
sudo alsactl store 0
Even when everything is unmuted and volume at 100% I can get sound with the speaker-test.
When reboot it is auto-muted again, please help.
-
Hello
Assuming you made a backup of the asound.state which failed to restore the master on reboot, then you might need to set the desired volume as I did since I've not had any luck using alsactl command since I bought new hardware..
Also assuming only the master volume requires unmuting, otherwise we may need to add more unmute commands
echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute
add ~/.X.d/alsaunmute to backup unless home is also on persistent storage
80% is my desired volume on reboot
good luck
-
AlsaMixer is unable keep settings :s I did get to save the unmute.
I tried editing the config file for the settings but still on reboot it resets.
-
yes but did you execute the command as explained..?
AlsaMixer is unable keep settings
With this method we don't really care,
because here we're not asking alsamixer to save any settings.. alsamixer will unmute and set the master volume on reboot
amixer set "Master" 80 unmute is instructing alsamixer to set the volume and unmute after boot. It's a different approach to saving the settings before you reboot
PS, this method may require you to remove the asound.state from your backup
-
Also assuming only the master volume requires unmuting, otherwise we may need to add more unmute commands
echo "amixer set "Master" 80 unmute" > ~/.X.d/alsaunmute
add ~/.X.d/alsaunmute to backup unless home is also on persistent storage
80% is my desired volume on reboot
I'll try that in the morning, Thank you :P
With this method we don't really care
Well excuse me, princess
-
You want continued help?
-
^ true, anyways, in order to save ALSA settings, the commend
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.
-
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
-
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
[ -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.
-
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
-
"~" 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 ~"
-
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...
-
$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.
-
$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?
-
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.
-
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
-
Add a percent sign
amixer set "Master" 80% unmute
-
Add a percent sign
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 :)
-
Hi evertvaningen
It sounds like maybe you still had one of the previous restore mechanisms in place possibly creating a race condition.
-
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
{ 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)
-
And/Or remove usr/local/etc/alsa/asound.state from /opt/.filetool.lst if you prefer the ~/.X.d way.
-
/bin/sh: speaker-test: not found
...wat?!
-
/bin/sh: speaker-test: not found
Relax please...
speaker-test is not found because it's not installed, plain and simple.
Better to show you how to resolve this situation quickly, as it will help later.
First open APPS > go to Provides > and enter speaker-test
Note: the provides function is listed in the Search drop-down menu
"Provides" indicates in which extension you can find the desired application.
I think these details are explained in the CoreBook, yes?
-
/bin/sh: speaker-test: not found
Relax please...
speaker-test is not found because it's not installed, plain and simple.
Rather than just tell you why, it's better to show you how to resolve this situation quickly.
First open APPS > go to Provides > and enter speaker-test
Note: the provides function is listed in the Search drop-down menu
"Provides" indicates in which extension you can find the desired application.
So Alsa-config IS needed for the test :P I didn't know that.
Thank you good sir <3
-
You're welcome..
Provides is the one of the most useful functions, you'll use it a lot.
-
Hello evertvaningen
Note also that if you need Alsa-config then be sure to load it before alsa extension.
Sorry I should have explained better the command is " amixer set "Master" 80 unmute " but I think others helped out there..
To recap:
If you can boot from a clean system (without any backup alsa config files) whether that entails booting with alsa or "alsa-config + alsa". Then able to hear sound by use of alsamixer to unmute and set desired volume then it's simply a question of which controls?? and then finding the names for these controls because the names shown in alsamixer are not necessarily a usable command name. Confusing huh..?
eg: To unmute an SPDIF device as indicated in alsamixer, we would use the IEC standards document name:
amixer -c 0 cset name='IEC958 Playback Switch' on
After that it should be easy to setup alsamixer commands to control your card.
AIUI the volume index comes from the card, I don't think it's an alsa issue. My hardware volume reports 0 to 100 so I don't have that problem and can't advise,