WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Alsa not working on HP 245 netbook  (Read 15005 times)

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
Alsa not working on HP 245 netbook
« 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

Code: [Select]
lspci -nn | grep Audio

I get this

Code: [Select]
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

Code: [Select]
aplay -l

I get

Code: [Select]
**** 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!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Alsa not working on HP 245 netbook
« Reply #1 on: November 20, 2018, 11:05:13 PM »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Alsa not working on HP 245 netbook
« Reply #2 on: November 21, 2018, 12:31:31 AM »
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:
Code: [Select]
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...

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
Re: Alsa not working on HP 245 netbook
« Reply #3 on: November 21, 2018, 06:02:15 PM »
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.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: Alsa not working on HP 245 netbook
« Reply #4 on: November 21, 2018, 06:22:47 PM »
with

Code: [Select]
aplay -l

I get

Code: [Select]
**** 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
Code: [Select]
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".
Quote
card 1: Generic [HD-Audio Generic], device 0: ALC3227 Analog [ALC3227 Analog]

Thus, your /etc/asound.conf should look like this:
Code: [Select]
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 (/)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Alsa not working on HP 245 netbook
« Reply #5 on: November 21, 2018, 10:01:29 PM »
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?

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
Re: Alsa not working on HP 245 netbook
« Reply #6 on: November 22, 2018, 12:07:32 PM »
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  :-\
« Last Edit: November 22, 2018, 12:16:20 PM by julcar »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Alsa not working on HP 245 netbook
« Reply #7 on: November 22, 2018, 02:37:15 PM »
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
Code: [Select]
echo "amixer set "Master" 80 unmute" >> ~/.X.d/alsaNote 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

Basically the pulseaudio info file says to create a couple more files in .X.d directory to start dbus and pulseaudio
Code: [Select]
echo "sudo dbus-launch --sh-syntax --exit-with-session" >> ~/.X.d/dbus
echo "start-pulseaudio-x11" >> ~/.X.d/pulseaudio


« Last Edit: November 22, 2018, 02:53:25 PM by coreplayer2 »

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
Re: Alsa not working on HP 245 netbook
« Reply #8 on: November 22, 2018, 04:22:49 PM »
I've folllowed all the instructions, but something seems to be wrong, I've attached a screenshot when I try to run pavucontrol

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Alsa not working on HP 245 netbook
« Reply #9 on: November 22, 2018, 06:34:31 PM »
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
Code: [Select]
$ /usr/local/etc/init.d/dbus status
check if pulseaudio is running
Code: [Select]
pulseaudio -vv [to test]

Did you create this file to start pulseaudio?
Code: [Select]
echo "start-pulseaudio-x11" > ~/.X.d/pulseaudio



« Last Edit: November 22, 2018, 06:51:24 PM by coreplayer2 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Alsa not working on HP 245 netbook
« Reply #10 on: November 22, 2018, 09:35:54 PM »
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.

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
Re: Alsa not working on HP 245 netbook
« Reply #11 on: November 22, 2018, 10:26:23 PM »
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
Code: [Select]
$ /usr/local/etc/init.d/dbus status
check if pulseaudio is running
Code: [Select]
pulseaudio -vv [to test]

Did you create this file to start pulseaudio?
Code: [Select]
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.
« Last Edit: November 22, 2018, 10:29:04 PM by julcar »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Alsa not working on HP 245 netbook
« Reply #12 on: November 22, 2018, 10:56:58 PM »
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:
Code: [Select]
$ 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.

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
Re: Alsa not working on HP 245 netbook
« Reply #13 on: January 17, 2019, 04:16:05 PM »
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

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
Re: Alsa not working on HP 245 netbook
« Reply #14 on: January 18, 2019, 12:15:32 AM »
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

Code: [Select]
sudo vi /etc/asound.conf

2) write this and save

Code: [Select]
pcm.!default {
  type hw
  card 1
}

ctl.!default {
  type hw
  card 1
}

3) add persistence

Code: [Select]
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

Code: [Select]
sudo echo "/usr/local/etc/init.d/dbus start" >> /opt/bootlocal.sh

5) my onboot.lst looks like this

Code: [Select]
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.