Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sound not playing, Ryzen system after fresh install [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Mon May 24, 2021 2:50 am    Post subject: Sound not playing, Ryzen system after fresh install [Solved] Reply with quote

I cannot get sound out of the only "real" output on my system, the KDE audio settings show the card but the menu only has "off" as an option. Here is a picture of it: https://imgur.com/a/Q8HbFuc

My use flags include "alsa" but not "pulseaudio". I am not using systemd and the docs that is required for it to work correctly.

The card I want sound from is #2 here:
Code:
$ cat /proc/asound/cards
 0 [pcsp           ]: PC-Speaker - pcsp
                      Internal PC-Speaker at port 0x61
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfce60000 irq 45
 2 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfcd00000 irq 46
 3 [CODEC          ]: USB-Audio - USB Audio CODEC
                      Burr-Brown from TI USB Audio CODEC at usb-0000:07:00.3-3, full speed


When I check aplay it looks similar:
Code:
$ aplay --list-devices
**** List of PLAYBACK Hardware Devices ****
card 1: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 0: ALCS1200A Analog [ALCS1200A Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


It also shows up in lspci:
Code:
$ lspci | grep -i audio
0a:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]
0c:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller


I think this means my kernel is detecting the card fine, but somehow KDE isn't able to pick up the settings. I haven't done any special configuring of alsa but I did have pulseaudio before, but I removed it by removing the use flag and re-emerging @world with --changed-use.

Any ideas on what I should do or what I can check to fix this?


Last edited by Sqeaky on Sun May 30, 2021 2:03 am; edited 1 time in total
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Mon May 24, 2021 10:52 am    Post subject: Reply with quote

I have been experimenting.

Before I started my USB mic worked. I just selected the item from audacity and it worked with no set up. In audacity is showed as "USB Audio Codec: - (hw:3,0)". I could record and it looked like a sound wave, but I could not hear it when played back.

I tried clearing out all the pulseaudio with "emerge --depclean" and rebooting. This removed the audio entry from the KDE settings. Audacity, kmix, alsamixer didn't seem to be any use. Output does not work, but the USB mic works in audacity. This also changed the input and output list of devices in audacity to:
    "HDA ATI HDMI: Generic Digital (hw:1,3)"
    "HD-Audio Generic: ALCS1200A Alt Analog (hw: 2,2)"
    "USB Audio Codec: - (hw:3,0)"
    "default"


I tried adding "pulseaudio" and "jack" to my USE flags, rebuilding, then depcleaning again. After a reboot came back and both the input and output devices look like:
    "HDA ATI HDMI: Generic Digital (hw:1,3)"
    "HD-Audio Generic: ALCS1200A Alt Analog (hw: 2,2)"
    "USB Audio Codec: - (hw:3,0)"
    "sysdefault"
    "pulse"
    "default"


It worked just long enough for another test recording then audacity hung and I killed it. When I restarted it the both the list of input and output devices changed as follows:

Inputs (USB Mic and Matisse are gone):
    "HDA ATI HDMI: Generic Digital (hw:1,3)"
    "sysdefault"
    "pulse"
    "default"


Outputs (Mic shows up needlessly, Matisse vanished, and whatever "sysdefault" is vanished.):
    "HDA ATI HDMI: Generic Digital (hw:1,3)"
    "USB Audio Codec: - (hw:3,0)"
    "pulse"
    "default"


In both configurations Pavucontrol-qt shows all my ports as unplugged: https://imgur.com/a/YDNPINp

Also, in both configs my rear speaker port on the Starship Mattise/"HD-Audio Generic: ALCS1200A Alt Analog (hw: 2,2)" was plugged in an the speakers did not make sound except for a pop as the system booted. In both configs a set of headphones in my front audio emitted static all the time.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Mon May 24, 2021 11:18 am    Post subject: Reply with quote

Sqeaky,

Lets start at the bottom of the sound stack.

What do you have in /proc/asound/devices?
Put that in a post.

If that's wrong, we need to fix your kernel. Put your kernel .config file onto a pastebin site.
In general, images should be avoided. They don't last long and can't be quoted.

If that's OK we need to look at
Code:
ls -l /dev/snd
so you may as well post that too.

At this point, if all is well,
Code:
alsamixer -c2
should show lots of controls.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Mon May 24, 2021 12:18 pm    Post subject: Reply with quote

NeddySeagoon, thanks for helping.

Here are the pieces of information you asked for:

Code:
# cat /proc/asound/devices
  1:        : sequencer
  2: [ 0]   : control
  3: [ 1- 3]: digital audio playback
  4: [ 1- 0]: hardware dependent
  5: [ 1]   : control
  6: [ 2- 0]: digital audio playback
  7: [ 2- 0]: digital audio capture
  8: [ 2- 2]: digital audio capture
  9: [ 2- 0]: hardware dependent
 10: [ 2]   : control
 11: [ 3- 0]: digital audio playback
 12: [ 3- 0]: digital audio capture
 13: [ 3]   : control
 33:        : timer


I don't know if that is right or not, but I suspect it is correct. Because all the things I am using seem to see all the hardware.

Either way here is the kernel config: https://gist.github.com/Sqeaky/5c754cebd0925362f73ca59d7a4377e8

Code:
# ls -l /dev/snd
total 0
drwxr-xr-x  2 root root       60 May 24 05:28 by-id
drwxr-xr-x  2 root root      120 May 24 05:28 by-path
crw-rw----+ 1 root audio 116,  2 May 24 05:28 controlC0
crw-rw----+ 1 root audio 116,  5 May 24 05:28 controlC1
crw-rw----+ 1 root audio 116, 10 May 24 05:28 controlC2
crw-rw----+ 1 root audio 116, 13 May 24 05:28 controlC3
crw-rw----+ 1 root audio 116,  4 May 24 05:28 hwC1D0
crw-rw----+ 1 root audio 116,  9 May 24 05:28 hwC2D0
crw-rw----+ 1 root audio 116,  3 May 24 05:46 pcmC1D3p
crw-rw----+ 1 root audio 116,  7 May 24 06:00 pcmC2D0c
crw-rw----+ 1 root audio 116,  6 May 24 05:34 pcmC2D0p
crw-rw----+ 1 root audio 116,  8 May 24 05:46 pcmC2D2c
crw-rw----+ 1 root audio 116, 12 May 24 05:34 pcmC3D0c
crw-rw----+ 1 root audio 116, 11 May 24 05:34 pcmC3D0p
crw-rw----+ 1 root audio 116,  1 May 24 05:28 seq
crw-rw----+ 1 root audio 116, 33 May 24 05:28 timer


I have checked Alsamixer everything relevant appears to be unmuted and raised to max.

Code:

┌─────────────────────────────────────────────────────────────────────────────────────── AlsaMixer v1.2.3 ────────────────────────────────────────────────────────────────────────────────────────┐
│ Card: HD-Audio Generic                                                                                                                                                  F1:  Help               │
│ Chip: Realtek ALCS1200A                                                                                                                                                 F2:  System information │
│ View: F3:[Playback] F4: Capture  F5: All                                                                                                                                F6:  Select sound card  │
│ Item: Front Mic [dB gain: 12.00, 12.00]                                                                                                                                 Esc: Exit               │
│                                                                                                                                                                                                 │
│                                                                                                                                                                                                 │
│                                                                                                                                                                                                 │
│                                                                                                                                                                                                 │
│                                                                                                                                                                                                 │
│    ┌──┐        ┌──┐        ┌──┐        ┌──┐        ┌──┐        ┌──┐        ┌──┐        ┌──┐        ┌──┐        ┌──┐        ┌──┐                                            ┌──┐        ┌──┐     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│        │▒▒│                                            │▒▒│        │▒▒│     │
│    ├──┤        ├──┤        └──┘        ├──┤        ├──┤        └──┘        ├──┤        ├──┤        ├──┤        ├──┤        └──┘      Disabled       2ch      Disabled      ├──┤        └──┘     │
│    │OO│        │OO│                    │OO│        │MM│                    │OO│        │OO│        │OO│        │OO│                                                        │MM│                 │
│    └──┘        └──┘                    └──┘        └──┘                    └──┘        └──┘        └──┘        └──┘                                                        └──┘                 │
│    100       100<>100    100<>100    100<>100    100<>100    100<>100    100<>100      100         100       100<>100    100<>100                                        100<>100    100<>100   │
│   Master     Headphone      PCM        Front   < Front Mic >Front Mic B  Surround     Center        LFE        Line     Line Boost  Auto-Mute M Channel Mod Loopback Mi  Rear Mic   Rear Mic Bo │
│                                                                                                                                                                                                 │
│                                                                                                                                                                                                 │
│                                                                                                                                                                                                 │
│                                                                                                                                                                                                 │
│                                                                                                                                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘


Before this last expirment with removing and readding Pulseaudio, both KMix and alsamixer match, but now KMix only has "Starship/Matisse HD Audio Controller", presumably it thinks it is the master. Let me me know if you see any issue.

EDIT - I even unmuted front mic and tried the speaker test and youtube audio again. In pavuctl I can see the bar under starship matisse animating, but still no output.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Mon May 24, 2021 1:11 pm    Post subject: Reply with quote

Sqeaky,

That all looks good. So we need to tell alsa that card 2 device 0 is the default.

As root, create /etc/asound.conf containing
Code:
defaults.pcm.card 2
defaults.pcm.device 0
defaults.ctl.card 2

That tells Alsa to use card2

Remove pulseaudio. Its a wrapper around alsa, so until alsa works, pulseaudio cannot.

Test with your favourite media player.

That Realtek ALCS1200A is newish. Alsa may want a hand to set it up correctly.
You have
Code:
CONFIG_SND_HDA=y
and everything built in.
That's OK but if alsa won't work and we need to try module parameters, its easier if its a loadable module.

Youtube audio in some browsers is pulseaudio only, so its not a good test source.

Alsa comes free with speaker-test. Try that. You might want to set the sliders lower to start with, say no more than 70%
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Mon May 24, 2021 6:19 pm    Post subject: Reply with quote

OK, Sounds good, It seems I didn't understand that config file from the docs, for some reason I thought it was optional.

I will remove pulseaudio and let you know what happens.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Mon May 24, 2021 6:24 pm    Post subject: Reply with quote

Sqeaky,

/etc/asound.conf is not required if you only haze a single sound card as its card 0
Its also not required if your sound cards are detected with card 0 as the noe you want to use.

Some apps can be directed as to which sound card and device to use at run time but not all.

Once alsa works, you can put back pulseaudio and set it up, if that,s what you want but it gets in the wayof getting alsa working.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Mon May 24, 2021 7:18 pm    Post subject: Reply with quote

I am not particularly attached to pulseaudio. I am actually doing some audio work and it adds some latency to using audacity (I think the placebo/nocebo effect can be quite strong and audacity quite slow). So if it gets to working with a simpler setup I am happy.

Just adding the config and removing pulseaudio (rebuilding changed-use, depclean, and reboot) didn't appear to work firefox, falkon, vlc, and audacity didn't work on any of the 5 outputs. None of those outputs were "HD-Audio Generic: ALCS1200A Alt Analog (hw2,0)". So audacity is not seeing this sound card at all. That is concerning to me. Audacity saw this as an output earlier with and without pulseaudio and it just couldn't use it.

I am going to reread to ALSA wiki page since I clearly missed something.

EDIT - I am still reading and I have tried this config:

Code:
defaults.pcm.!card Generic
defaults.pcm.!device 0
defaults.ctl.!card Generic


What is the deal with the bangs"!", why does the wiki page have them?

Using the way to look up alsa names from the /sys filesystem. All the correct device names show up in audacity But then it gave me an error about not being able to read the device. Then I closed and re-opened audacity and the device was missing.

I dmesg I see this:
Code:
[  284.814939] snd_hda_intel 0000:0a:00.1: IRQ timing workaround is activated for card #1. Suggest a bigger bdl_pos_adj.


Is this pointing to bad hardware?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Mon May 24, 2021 8:03 pm    Post subject: Reply with quote

Sqeaky,

lspci:
0a:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]
0c:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller


dmesg:
[  284.814939] snd_hda_intel 0000:0a:00.1: IRQ timing workaround is activated for card #1. Suggest a bigger bdl_pos_adj.

Together tell that 0000:0a:00.1 is your Video card digital outputs.

bdl_pos_adj is a parameter you pass to snd-hda-intel at module load time. Its not a problem right now.
See the end of
Code:
modinfo snd-hda-intel


I've never used card names in /etc/asound.conf.

Copy and paste any errors.
Notice in
Code:
ls -l /dev/snd
that sound devices are only available to members of the audio group. Is your normal user a member?
groups will tell you. If you need to change that, your normal user will need to log out and back in again to pick up the new group membership.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Wed May 26, 2021 10:05 pm    Post subject: Reply with quote

I have been working the past few days, thank you for your patience.

Here is the output from modinfo
Code:
# modinfo snd-hda-intel
name:           snd_hda_intel
filename:       (builtin)
description:    Intel HDA driver
license:        GPL
file:           sound/pci/hda/snd-hda-intel
parm:           index:Index value for Intel HD audio interface. (array of int)
parm:           id:ID string for Intel HD audio interface. (array of charp)
parm:           enable:Enable Intel HD audio interface. (array of bool)
parm:           model:Use the given board model. (array of charp)
parm:           position_fix:DMA pointer read method.(-1 = system default, 0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO, 4 = COMBO, 5 = SKL+, 6 = FIFO). (array of int)
parm:           bdl_pos_adj:BDL position adjustment offset. (array of int)
parm:           probe_mask:Bitmask to probe codecs (default = -1). (array of int)
parm:           probe_only:Only probing and no codec initialization. (array of int)
parm:           jackpoll_ms:Ms between polling for jack events (default = 0, using unsol events only) (array of int)
parm:           single_cmd:Use single command to communicate with codecs (for debugging only). (bint)
parm:           enable_msi:Enable Message Signaled Interrupt (MSI) (bint)
parm:           patch:Patch file for Intel HD audio interface. (array of charp)
parm:           dmic_detect:Allow DSP driver selection (bypass this driver) (0=off, 1=on) (default=1); deprecated, use snd-intel-dspcfg.dsp_driver option instead (bool)
parm:           power_save:Automatic power-saving timeout (in second, 0 = disable). (xint)
parm:           pm_blacklist:Enable power-management denylist (bool)
parm:           power_save_controller:Reset controller in power save mode. (bool)
parm:           align_buffer_size:Force buffer and period sizes to be multiple of 128 bytes. (bint)
parm:           snoop:Enable/disable snooping (bint)


My normal users is in the "audio" group.

I don't have any errors I haven't already shared. The big thing is no audio output. No output with or without pulseaudio. Audacity doesn't even recognize the Starship/Matisse sound card as an output. but it can record,

EDIT - Just to absolutely verify my hardware. I tried every output in audacity with every combination of 3.5mm output on my system. Partway through sound stopped playing through the inadequate speakers that the HDMI output is connected to. Not sound every came out of my speakers and I tested the before and after this with an external audio source and they worked. Now I have reconnected my 3.5mm cable to the green jack on the mainboard which is the one that made sound previously.

I am going to try with an ubuntu boot disk. To see if my hardware is bad.


Last edited by Sqeaky on Thu May 27, 2021 6:47 am; edited 1 time in total
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Thu May 27, 2021 6:46 am    Post subject: Reply with quote

I couldn't get my sound output working with an Ubuntu boot disk.

This is the same machine that I had a video card die in. Could my sound card be dead too? I is a single chip on my mainboard?!

before I resign myself to hardware failure, I am going to try a fresh kernel with the drivers I am not using now removed.
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 499

PostPosted: Thu May 27, 2021 11:18 am    Post subject: Reply with quote

Sqeaky wrote:
Could my sound card be dead too? I is a single chip on my mainboard?!
It's a bit early to say that. Do some basic testing in a low level environment first.
First find yourself a stereo* .wav file, either in your filesystem** or search online for one to download. Then log in to a clean console with no desktop running***, make sure there are no residual pulseaudio, jack or other audio processes taking control of cards in the background (ps -u [your username] should show anything spurious).
Select your desired playback pcm from aplay****
Code:
aplay --list-pcms
~~snip~~
hdmi:CARD=HDMI,DEV=4
    HDA ATI HDMI, HDMI 4
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=5
    HDA ATI HDMI, HDMI 5
    HDMI Audio Output
usbstream:CARD=HDMI
    HDA ATI HDMI
    USB Stream Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALC1220 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    Front output / input
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    4.0 Surround ~~snip~~
I've posted my aplay output so you can see how I select the pcm I want, in this case "front:CARD=Generic,DEV=0", basic stereo from the onboard ALC1220 chip.
Now send some audio to it directly using your .wav file
Code:
aplay -D front:CARD=Generic,DEV=0 /usr/share/klettres/id/syllab/wu.wav && echo "it played"
If you get "it played" echoed to the shell afterwards, aplay exited without error and it's time to mess with alsamixer and where things are plugged in to find out if it's actually generating sound somewhere. You can loop your .wav with
Code:
while aplay -D front:CARD=Generic,DEV=0 /usr/share/klettres/id/syllab/wu.wav;do sleep 1;done
switch to another console, check your alsamixer volumes, check your cabling and amp etc. all while the wav is being looped in the background.

If you get actual sound out of it, you can move on to taming pulseaudio (maybe just setting the default sink, or gutting the config entirely and just allowing it to connect to the card(s) you want it to), or whatever other API you want to present to desktop programs, etc. If not we'll have to look closer at the drivers.

*We are telling aplay to connect to hardware directly, bypassing any channel upmix/downmix, we need the number of channels in the .wav to be 2 to avoid "number of channels not available" errors
**If you have mlocate installed file $(locate "*.wav")|grep "stereo" should produce a list, picking something with 16 or 32 bits @44100Hz should be fine, just make sure the file is big enough to have actual data in it
***Desktop software likes to autostart sound daemons, rather than disabling this behaviour at this stage, just avoid it entirely and don't start a desktop environment.
****As with *, we want to try and match playback channels to wav channels to avoid errors, so "front" is just 2 channels, left and right.
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Sat May 29, 2021 4:43 am    Post subject: Reply with quote

@RalphRed,

I have tried some of what you suggested. Before I started I first checked my speakers with an external sound source. My phone played podcasts over the same going cable going to my PC both before and after all tests listed here:

Here is my complete list of sound devices:
Code:
$aplay --list-pcms
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, Generic Digital
    HDMI Audio Output
default:CARD=Generic
    HD-Audio Generic, ALCS1200A Analog
    Default Audio Device
sysdefault:CARD=Generic
    HD-Audio Generic, ALCS1200A Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    Front output / input
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers


Here is the series of commands I tried from freshly booted system:
Code:
  103  alsamixer
  104  aplay --list-pcms
  105  ps -u sqeaky
  106  aplay -D default:CARD=Generic ~/Projects/DysevidentiaPod/0008/3_IntermediaryWavs/0008.wav && echo "it played"
  107  aplay -D hdmi ~/Projects/DysevidentiaPod/0008/3_IntermediaryWavs/0008.wav && echo "it played"
  108  aplay -D h ~/Projects/DysevidentiaPod/0008/3_IntermediaryWavs/0008.wav && echo "it played"
  109  aplay -D sysdefault:CARD=Generic ~/Projects/DysevidentiaPod/0008/3_IntermediaryWavs/0008.wav && echo "it played"
  110  aplay -D front:CARD=Generic,DEV=0 ~/Projects/DysevidentiaPod/0008/3_IntermediaryWavs/0008.wav && echo "it played"
  111  history


I podcast so I picked one of the intermediary files from a recent episode it is stereo and I have confirmed it has data in it.

I ran "alsamixer" from a tty3 and the rest from tty2 and sddm was on tty7 unused and waiting at a login. Sound never came from my 3.5mm jacks. While each command was playing the stereo wav file (it is 1:08:06 long so never looped or completed), I test all three of the 3.5 mm jacks on the back of my system and the two on front. To rephrase for each aplay command that played audio I tried all 5 ports.

During command 107 sounds did come from HDMI output to play through my monitor speakers as expected, (but they are are so bad I would disable it in the Radeon driver if it were an option like the AMDGPU driver). Even on this one, I tested all 5 of my 3.5mm jacks, just to be thorough.

The only processes running per ps, command 105, were bash and ps, so I am pretty sure nothing was interfering.

In alsamixer I checked the levels and verified nothing was muted I also tried adjusting "Auto-Mute Mode", "Channel Mode", and "Loopback Mix" for the "HD-Audio Generic" card, the other was the "HDA ATI HDMI" which I ignored. The first two modes had no apparent effect, but enabling or disabling "Loopback mix" causes my speakers to pop.

A silly anecdote; as I tried these 25 configurations, I had the volume on everything quite high in case audio played unexpectedly faint. I had a buddy at the other end of the house watching a stream on his computer with headphones and he heard the intermittent buzzing and popping as I tried different connections. At first he mistook some buzzing for a failed fan in his PC, he just replaced one recently. But he didn't hear the noise from his PC, and he kept checking around the house, checking another PC, and a TV. He checked the Dishwasher, which was running and I heard it stop and restart, He even checked outside, considering the chances of a neighbor mowing at 10 at night, then finally can into my office to find me laying on the floor under my desk trying the last connection. We both had a good laugh.
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 499

PostPosted: Sat May 29, 2021 8:33 am    Post subject: Reply with quote

Well, combining that with your "ubuntu test" leads me to two conclusions; either the kernel support for that particular chip is wanting, or the chip itself isn't any good. The popping from the "loopback mix" toggle is a good sign, but what to do with it. Personally I'd be firing up pulseaudio with a severely limited config*, and mapping 6 channels as front-left,front-right,front-left,front-right,front-left,front-right just to see if all the default outputs are "broken" or just the stereo one.

Where did you get the board from, it's the same one that had the dodgy vega20 card no?

*I realise this isn't very helpful, and PA docs are atrocious. Set "autospawn = no" in /etc/pulse/client.conf, and copy the following as ~/.config/pulse/default.pa
Code:
#!/usr/bin/pulseaudio -nF
.fail
#mandatory for some reason...
load-module module-augment-properties
load-module module-switch-on-port-available
#sound card connections
load-module module-alsa-sink device=hw:2,0 channels=6 channel_map=front-left,front-right,front-left,front-right,front-left,front-right sink_name=Speakers sink_properties=device.description=Speakers
#nice stuff
load-module module-rescue-streams
load-module module-always-sink
load-module module-suspend-on-idle
#client connection, don't forget this...
load-module module-native-protocol-unix
Then put
Code:
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}
in ~/.asoundrc. Start pulseaudio manually from a terminal with pulseaudio --fail -v , and any sounds that were destined for the front-left are destined for the center and rear-left outputs too, likewise with front-right to rear-right and lfe/sub. Because of the .asoundrc override, you can use aplay without the -D directive, and your stereo input .wav will be duplicated over all 6 speaker outputs.

If there is still no dice, then hdajackretask from the media-sound/alsa-tools package should allow you to do similar, re: allow your line in and mic inputs at the rear of the pc to act as "line out, front"
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Sun May 30, 2021 12:03 am    Post subject: Reply with quote

I gave that same kubuntu boot disk to another person with the same motherboard, same firmware revision, and similar hardware. It just worked vlc and webbrowse. This chip has great support, from both AMD and Intel, and appears to work by default for most people in most web searches in most linux distros.

I am completely convinced that this is an issue specific to this hardware. I reset the EFI/BIOS to default and got no apparent change in behavior. I am replacing the mainboard in case anything else is busted. For now I will use a USB sound card which I have already setup, I literally plugged it in, select my speakers as output in audacity and it worked.

That is 3 out of the past 4 threads I have made that have ended with hardware failure. :(

EDIT - This the same board my Radeon VII (That dodgy Vega 20) died in. I am currently presuming both died at the same time when I have a power interruption. I have had it since I built this computer when the Ryzen 3000 came out. Every worked before that moment.

I was playing valheim on max settings at round 80~100 fps. I was preparing to start a raid on a goblin village (The are called Fulings in the game) and I was just charging in as a the power cut out and no other computer in the house turned off. None of the others had maxed CPUs and GPU, I had some other worked going in the background. So if the voltage or amperage dropped for just a moment ohms law says the other goes in proportion according the resistance... which was apparently my maxed out GPU and sound card. Which have not worked since.

EDIT 2 - I re-added pulseaudio to my use flags then ran "emerge --ask --update --newuse --deep --with-bdeps=y @world" and the KDE settings picked it up without even logging in an out. Trivially easy setup.
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 499

PostPosted: Sun May 30, 2021 2:29 am    Post subject: Reply with quote

Sqeaky wrote:
Which have not worked since.

Back EMF is a hell of a thing, even with short cables when you consider the amount of current flowing at 12v to power a ~250w gfx card.
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Mon May 31, 2021 4:18 am    Post subject: Reply with quote

Surprisingly, my PCIE gen 4 riser cable is undamaged. I suspected it strongly before finally determining it was the acceleration component of the GPU.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Mon May 31, 2021 10:09 am    Post subject: Reply with quote

Sqeaky,

Quote:
So if the voltage or amperage dropped for just a moment ohms law says the other goes in proportion according the resistance..
True for linear systems.
In general not true for PCs or any switched mode power supply.

Consider the following system. You have computer powered by a switched mode power supply. Its drawing some power P, at the PSU output which we will assume is a constant for now.
The PSU is delivering power P, with some input voltage V at some input current A.

When V falls, P stays constant. Its a constant power system as the PSU holds the output voltages fixed. This means that A must increase as P=VA and V has reduced.
So a switched mode power supply is in effect a negative resistor.
PCs have lots of them too. The PSU in the can, the Vcore regulator on the motherboard, another on the GPU, to list just three.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Tue Jun 15, 2021 5:24 am    Post subject: Reply with quote

I am totally oversimplifying.

Clearly I would need probe leads on a dozen different parts to know exactly what happened. Clearly I had two parts die in a power disruption through two surge suppressors that damage nothing else in the house. A few computers didn't even turn off. The Only outlying factor was that my machine was drawing a huge amount of at that moments and nothing else was. I am inferring a lot from that, perhaps too much.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum