Tiny Core Linux
General TC => Tiny Core Netbooks => Topic started by: julcar on November 20, 2018, 10:56:55 PM
-
I was playing with sound extensions in my netbook, but there was no success getting at least sound for playing mp3 files
If I run this command
lspci -nn | grep Audio
I get this
00:01.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:15b3]
00:09.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Device [1022:157a]
with
aplay -l
I get
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC3227 Analog [ALC3227 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
I am a n00b on this, never before tried to get audio working on linux.
Extensions I have installed: alsa.tcz, alsa-plugins.tcz, alsa-config.tcz, alsa-modules-4.14.10-tinycore.tcz & alsa-modules-4.14.10-tinycore64.tcz
Thanks in advance for your help guys!
-
Hi julcar
See if this step by step works for you:
http://forum.tinycorelinux.net/index.php/topic,22145.msg138620.html#msg138620
-
I have the same problem - that hdmi comes up as the default - which makes no sense on a laptop.
You can test if sound is actually working with: speaker-test -Ddefault:1 -c2 -t wav -l1
..this will use the ALC3227 Analog device rather than hdmi.
Note also that on my laptop I need to load graphics-KERNEL before alsa-config for sound to work...
-
Still no success, my laptop don't have sound controls on his front panel, instead the sound is controlled with Fn keys (F7 for volume down and F8 for volume up, and, F6 for muting, which also has a led indicator when the speakers are muted).
The weird fact is that after loading alsa.tcz, it turns on the led indicator at F6 key, and there is no way to turn it off, so in my understanding, the laptop is permanently "muted", that is why running the commands on the terminal don't do anything.
-
with
aplay -l
I get
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC3227 Analog [ALC3227 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
You need to change your default audio device to your speaker.
To do that, you have to create a new file /etc/asound.conf
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
Since the card number may change after reboot,
I'd use device name instead.
In your case, it's "Generic".
card 1: Generic [HD-Audio Generic], device 0: ALC3227 Analog [ALC3227 Analog]
Thus, your /etc/asound.conf should look like this:
pcm.!default {
type hw
card Generic
}
ctl.!default {
type hw
card Generic
}
To save your changes, append "etc/asound.conf" to your /opt/.filetool.lst
Note that for files listed in /opt/.filetool.lst, there're no leading slashes (/)
-
The weird fact is that after loading alsa.tcz, it turns on the led indicator at F6 key, and there is no way to turn it off, so in my understanding, the laptop is permanently "muted", that is why running the commands on the terminal don't do anything.
If the "speaker-test" did not give an error, then perhaps your sound is muted - did you try to un-mute it with alsamixer?
-
Finally I got sound working, at least the speaker test :D
I edited onboot.lst like this:
graphics-4.14.10-tinycore.tcz
alsa-config.tcz
alsa-plugins.tcz
alsamixergui.tcz
in that order seems that the alsa.tcz extension is loaded properly, but then, I must run the speaker-test to unmute the speakers, else the speakers stays muted for all the time, note that when I boot the system, the mute led indicator on F6 key turns on, but after running the speaker test the led turns off.
Now, I tried to listen audio from firefox (youtube, livestream, etc) but there's no audio on speakers :-\
-
Good job getting Alsa to work, now you just need to configure Alsa to restore settings on each reboot. There are various ways to accomplish this, but I prefer
" amixer set "Master" 80 unmute " which is best runs as X starts on each reboot
this will create a file in .X.d to run the unmute command on reboot
echo "amixer set "Master" 80 unmute" >> ~/.X.d/alsa
Note you'll need a persistent Home or save to your backup
As for Firefox, you'll need to install pulseaudio extension but I'd recommend "pavucontrol.tcz' extension which will easily help you to configure pulseaudio and provide a nice volume control too..
Note: Be sure to follow the instruction in pulseaudio info file
www.tinycorelinux.net/9.x/x86/tcz/pulseaudio.tcz.info (http://www.tinycorelinux.net/9.x/x86/tcz/pulseaudio.tcz.info)
Basically the pulseaudio info file says to create a couple more files in .X.d directory to start dbus and pulseaudio
echo "sudo dbus-launch --sh-syntax --exit-with-session" >> ~/.X.d/dbus
echo "start-pulseaudio-x11" >> ~/.X.d/pulseaudio
-
I've folllowed all the instructions, but something seems to be wrong, I've attached a screenshot when I try to run pavucontrol
-
I've folllowed all the instructions, but something seems to be wrong, I've attached a screenshot when I try to run pavucontrol
Looks like pulse audio hasn’t been started
Is pulse audio loaded? If so then start it as per pulse audio info file
How did you install pavucontrol?
wget ?
APPS ?
tce-ab ?
tce-load ?
Is pavucontrol.tcz installed to onboot.lst ?
from the info file
check dbus is running
$ /usr/local/etc/init.d/dbus status
check if pulseaudio is running
pulseaudio -vv
[to test]
Did you create this file to start pulseaudio?
echo "start-pulseaudio-x11" > ~/.X.d/pulseaudio
-
Finally I got sound working, at least the speaker test
...
but then, I must run the speaker-test to unmute the speakers, else the speakers stays muted for all the time, note that when I boot the system, the mute led indicator on F6 key turns on, but after running the speaker test the led turns off.
The speaker-test command instructed alsa to play sound through device 1 and not the default device 0 (hdmi)
If you want to play sound using other apps that support alsa, you will need to use the apps audio setup menu to instruct it to use device 1 rather than the default.
-
I've folllowed all the instructions, but something seems to be wrong, I've attached a screenshot when I try to run pavucontrol
Looks like pulse audio hasn’t been started
Is pulse audio loaded? If so then start it as per pulse audio info file
How did you install pavucontrol?
wget ?
APPS ?
tce-ab ?
tce-load ?
Is pavucontrol.tcz installed to onboot.lst ?
from the info file
check dbus is running
$ /usr/local/etc/init.d/dbus status
check if pulseaudio is running
pulseaudio -vv
[to test]
Did you create this file to start pulseaudio?
echo "start-pulseaudio-x11" > ~/.X.d/pulseaudio
seems that dbus is not started on system boot, I must run /usr/local/etc/init.d/dbus start
I've installed the extensions through APPS
pulseaudio.tcz is in onboot.lst
and, the three files are in ~/.x.d/ alsa, dbus and pulseaudio.
-
For testing purposes it is perhaps better to not have graphics-KERNEL, alsa-config, alsa or pulseaudio in onboot.lst and not to have anything in ~/.X.d.
Then, boot to a console prompt or exit X to the console prompt and: $ tce-load -i graphics-KERNEL
$ tce-load -i alsa-conf
$ tce-load -i alsa
$ tce-load -i pavucontrol adwaita-icon-theme
$ sudo /usr/local/etc/init.d/dbus start
$ startx
..and then double-click on the pavucontrol icon and it should auto-start pulseaudio and display the pulseaudio controls.
If this doesn't work, open a terminal window, run pavucontrol and report the errors you get.
-
Hi, yesterday I had some time to test this again, here are some hints:
graphics-4.14.10-tinycore.tcz is not needed to get the speaker test work
loading gcc_libs.tcz leads to the audio being muted (which is bad because gcc_libs has libatomic.so.1 required by firefox)
other tests are going on
at least the speaker test works by the moment
-
Well, after a looooong time testing, I got audio on firefox seeing a youtube video :D
Things I did:
1) create the asound.conf file
sudo vi /etc/asound.conf
2) write this and save
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
3) add persistence
echo "etc/asound.conf" >> /opt/.filetool.lst
filetool.sh -b
(at this time I had to remove the norestore bootcode at /mtn/sda1/menu.lst)
4) start dbus at boot time
sudo echo "/usr/local/etc/init.d/dbus start" >> /opt/bootlocal.sh
5) my onboot.lst looks like this
pci-utils.tcz
alsa-config.tcz
alsa-plugins.tcz
alsamixergui.tcz
pulseaudio.tcz
Now, the only problem to solve is that the laptop starts muted, I have to use alsamixergui to unmute all of the channels to get the audio working.
-
Doesn't firefox use pulseaudio for sound?
If so, then there's no need to change any alsa settings, just use pavucontrol or cli pulseaudio commands.
-
Update
last problem also solved:
echo "amixer set "Master" 80 unmute" >> ~/.X.d/alsa
echo "amixer set "Mic" 10 unmute" >> ~/.X.d/alsa
This fixed the muted state at start.
-
Doesn't firefox use pulseaudio for sound?
If so, then there's no need to change any alsa settings, just use pavucontrol or cli pulseaudio commands.
I decided to uninstall pavucontrol to make more lighter the boot, pulseaudio just works fine alone.
-
Hi julcar
... Now, the only problem to solve is that the laptop starts muted, I have to use alsamixergui to unmute all of the channels to get the audio working.
Based on what I did here:
http://forum.tinycorelinux.net/index.php/topic,22145.msg138620.html#msg138620
I think you left out the following steps (after setting your volume levels):
sudo alsactl store
echo alsactl restore >> /opt/bootlocal.sh
echo usr/local/etc/alsa/asound.state >> /opt/.filetool.lst.
filetool.sh -b
-
Hi julcar
... Now, the only problem to solve is that the laptop starts muted, I have to use alsamixergui to unmute all of the channels to get the audio working.
Based on what I did here:
http://forum.tinycorelinux.net/index.php/topic,22145.msg138620.html#msg138620
I think you left out the following steps (after setting your volume levels):
sudo alsactl store
echo alsactl restore >> /opt/bootlocal.sh
echo usr/local/etc/alsa/asound.state >> /opt/.filetool.lst.
filetool.sh -b
the alsactl store could be on shutdown.sh?
-
Hi julcar
the alsactl store could be on shutdown.sh?
You could if you want to and you change volume levels a lot. If you have volume levels you are comfortable with then just
running alsactl store once is sufficient.
-
Hi julcar
the alsactl store could be on shutdown.sh?
You could if you want to and you change volume levels a lot. If you have volume levels you are comfortable with then just
running alsactl store once is sufficient.
You were right, now I have full sound with my notebook ;D