WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Having trouble with hdmi audio through alsa  (Read 4728 times)

Offline saladin

  • Jr. Member
  • **
  • Posts: 61
Having trouble with hdmi audio through alsa
« on: June 27, 2021, 08:14:41 PM »
When I run:

Code: [Select]
speaker-test -D plughw:0,3 -c2 -t wav -l1
I get audio. But not otherwise. So I created a .asoundrc file in /home/tc

Code: [Select]
pcm.!default {
      type hw
      card 0
      device 3
 }
ctl.!default {
    type hw
    card 0
#    device 3
}

If I remove the # alsamixer says:

Code: [Select]
cannot open mixer: Invalid argument
With the # in there, it will load, but there's no mention anywhere of HDMI. I've unmuted Master and turned up the volume, but still no sound.

When I follow the instructions here, the echo command gives me the error:

Code: [Select]
sh: can't create /opt/bootlocal.sh: Permission denied
Edit: fixed the alsamixer not starting error by replacing the second !default with card0. Still no help though.
« Last Edit: June 27, 2021, 08:17:48 PM by saladin »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Having trouble with hdmi audio through alsa
« Reply #1 on: June 28, 2021, 09:09:52 AM »
When getting permission errors you maybe you have to use sudo like this.

Code: (bash) [Select]
sudo sh -c 'echo alsactl restore >> /opt/bootlocal.sh'

Offline saladin

  • Jr. Member
  • **
  • Posts: 61
Re: Having trouble with hdmi audio through alsa
« Reply #2 on: June 28, 2021, 09:18:45 AM »
Oh I see. Thank you, I didn't know I could do that.

But I still must be doing something wrong, because even after completing the instructions like that, I don't have audio. Except with the speaker test command

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Having trouble with hdmi audio through alsa
« Reply #3 on: June 28, 2021, 09:53:25 AM »
but there's no mention anywhere of HDMI

On my laptop I need the graphics-KERNEL extension and then alsa-config loaded before alsa for hdmi to work.

Offline saladin

  • Jr. Member
  • **
  • Posts: 61
Re: Having trouble with hdmi audio through alsa
« Reply #4 on: June 28, 2021, 10:20:05 AM »
Ok, I've loaded them and run through my instructions again, but I'm not noticing any difference. I still hear the speaker test, but nothing else. Still don't see mention of hdmi anywhere.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Having trouble with hdmi audio through alsa
« Reply #5 on: June 28, 2021, 11:43:47 AM »
What does “aplay -l” give?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11621
Re: Having trouble with hdmi audio through alsa
« Reply #6 on: June 28, 2021, 12:48:10 PM »
Hi saladin
I think the  graphics-KERNEL  extension has to get loaded before ALSA. Edit the  /etc/sysconfig/tcedit/onboot.lst  file
and move the  graphics-KERNEL  entry towards the beginning of the file. Then save, reboot, and see if anything changed.

Offline saladin

  • Jr. Member
  • **
  • Posts: 61
Re: Having trouble with hdmi audio through alsa
« Reply #7 on: June 28, 2021, 01:02:12 PM »
Juanito:

Code: [Select]
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Rich:

I'll try that now.

Offline saladin

  • Jr. Member
  • **
  • Posts: 61
Re: Having trouble with hdmi audio through alsa
« Reply #8 on: June 28, 2021, 01:29:15 PM »
Ok, I changed the order and rebooted. Now espeak is no longer giving me an "invalid input" error when I test it, but aside from that, and with regards to everything I've mentioned in the thread so far, I'm not noticing any changes.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Having trouble with hdmi audio through alsa
« Reply #9 on: June 28, 2021, 01:47:57 PM »
Is alsa-config loaded before alsa?

Offline saladin

  • Jr. Member
  • **
  • Posts: 61
Re: Having trouble with hdmi audio through alsa
« Reply #10 on: June 28, 2021, 02:20:25 PM »
Yes it is. It has been since my original post. Though I didn't have the graphics loaded originally.

I've always had python and opera first, followed by alsa-config, then alsa. I inserted graphics-4.19.10-tinycore64.tcz before alsa-config.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11621
Re: Having trouble with hdmi audio through alsa
« Reply #11 on: June 28, 2021, 02:23:24 PM »
Hi saladin
As Juanito pointed out, alsa-config needs to be loaded before alsa. If you need to fix that, you should then reboot so
they get loaded in the correct order.
You should probably also run steps 5 through 7 again.

Offline saladin

  • Jr. Member
  • **
  • Posts: 61
Re: Having trouble with hdmi audio through alsa
« Reply #12 on: June 28, 2021, 05:50:36 PM »
Ok, this is a completely fresh install. No saves. I want to show exactly what I'm doing.

I boot tinycore64 from CD. I open Apps to find the fastest mirror, then go to the command line:

Code: [Select]
tce-load -wi graphics-4.19.10-tinycore64.tcz
This installs a few things, then the screen goes black. By this point I've turned off my keyboard to make sure I don't push anything by accident. I go and start dinner, so that just in case something is happening that I can't see, it has time to finish. A few minutes later I return and push ctrl-alt-backspace, then type:

Code: [Select]
startx
Now I'm back to a graphical desktop. I open the command line again and type:

Code: [Select]
tce-load -wi alsa-config.tcz
tce-load -wi alsa.tcz
alsactl init
speaker-test -D plughw:0,3 -c2 -t wav -l1
sudo alsactl store
sudo sh -c 'echo alsactl restore >> /opt/bootlocal.sh'
sudo sh -c 'echo usr/local/etc/alsa/asound.state >> /opt/.filetool.lst'
alsamixer
speaker-test [-Ddefault:1] -c2 -t wav -l1
sudo alsactl store
sudo sh -c 'echo alsactl restore >> /opt/bootlocal.sh'
sudo sh -c 'echo usr/local/etc/alsa/asound.state >> /opt/.filetool.lst'
alsamixer

Neither time I run alsamixer has anything changed. The first speaker-test gives me audio. The second one does not, but that's the one in the instructions, so I tried it to be sure. I don't see anything about hdmi, and I don't have options when I push F6.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Having trouble with hdmi audio through alsa
« Reply #13 on: June 29, 2021, 02:53:02 AM »

This installs a few things, then the screen goes black…

The graphics-KERNEL extension cannot be installed from within the gui, you need to exit to the console prompt.

Offline saladin

  • Jr. Member
  • **
  • Posts: 61
Re: Having trouble with hdmi audio through alsa
« Reply #14 on: June 29, 2021, 02:17:07 PM »
Oh I see. That must be the problem then. This whole time I thought it was installed when it wasn't.