Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alsa configuration on new AMD system [SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Mon Dec 28, 2020 9:35 pm    Post subject: Alsa configuration on new AMD system [SOLVED] Reply with quote

Seems like every Linux install I've ever done in my life...alsa always seems to be the big pain...and every time feels line starting over again. That aside I'm not getting any sound with speaker-test and I have no idea what's wrong or where to look. This is on a brand new AMD machine I just built. Here's a bunch of pertinent info:

This has a built in sound device on the ASRock X570 PHANTOM GAMING 4 motherboard itself, and I have a Radeon RX 5500 XT graphics card with HDMI:
Code:
lspci | grep -i audio
09:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio
0b:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
I think I have everything necessary set in the kernel including all the firmware required for AMDGPU etc...and my video seems to be working perfectly. Here's the sound stuff enabled in the kernel:
Code:
grep SND /usr/src/linux/.config | grep -v '^#'
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_JACK=y
CONFIG_SND_JACK_INPUT_DEV=y
CONFIG_SND_PCM_TIMER=y
CONFIG_SND_HRTIMER=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_MAX_CARDS=32
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_PROC_FS=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_PCI=y
CONFIG_SND_HDA=y
CONFIG_SND_HDA_INTEL=y
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
CONFIG_SND_HDA_CORE=y
CONFIG_SND_HDA_COMPONENT=y
CONFIG_SND_HDA_PREALLOC_SIZE=2048
CONFIG_SND_INTEL_NHLT=y
I have everything compiled into the kernel (no modules).

Here are the outputs about the cards etc from aplay:
Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALCS1200A Analog [ALCS1200A Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=Generic,DEV=0
    HD-Audio Generic, HDMI 0
    HDMI Audio Output
hdmi:CARD=Generic,DEV=1
    HD-Audio Generic, HDMI 1
    HDMI Audio Output
hdmi:CARD=Generic,DEV=2
    HD-Audio Generic, HDMI 2
    HDMI Audio Output
hdmi:CARD=Generic,DEV=3
    HD-Audio Generic, HDMI 3
    HDMI Audio Output
hdmi:CARD=Generic,DEV=4
    HD-Audio Generic, HDMI 4
    HDMI Audio Output
default:CARD=Generic_1
    HD-Audio Generic, ALCS1200A Analog
    Default Audio Device
sysdefault:CARD=Generic_1
    HD-Audio Generic, ALCS1200A Analog
    Default Audio Device
front:CARD=Generic_1,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    Front output / input
surround21:CARD=Generic_1,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic_1,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic_1,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic_1,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic_1,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic_1,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
At this point I'd be glad to hear anything from either device, though I'll likely be using the HDMI using speakers (and the headphone jack) on my monitor. Based on the working configuration on my MythTV frontend (also using HDMI) I've tries this for card 0 (the HDMI):
Code:
defaults.pcm.card 0
defaults.pcm.device 10
defaults.ctl.card 0
I'm unclear as to that device 10, though I tried with 3, 7, 8, 9 as well with no success.

Here's the setup I tries with the other (onboard) card:
Code:
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
With speaker-test, both act as though they're working but I get silence:
Code:
speaker-test -t wav -c 2

speaker-test 1.2.3

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
Time per period = 2.676029
 0 - Front Left
 1 - Front Right
...etc...
When I run alsamixer, both cards certainly appear to be un-muted and have the volume up. No clue what to check at this point. Thanks in advance for any suggestions!

Tom


Last edited by tld on Wed Jan 13, 2021 3:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6428
Location: /usr/lib64/lv2

PostPosted: Mon Dec 28, 2020 10:52 pm    Post subject: Reply with quote

Recompile your kernel with genkernel all. If your sound then works, you know you missed something in your manual config. You can check for the difference in loaded modules. (Or just switch to using genkernel.)
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Mon Dec 28, 2020 11:58 pm    Post subject: Reply with quote

audiodef wrote:
Recompile your kernel with genkernel all. If your sound then works, you know you missed something in your manual config. You can check for the difference in loaded modules. (Or just switch to using genkernel.)
Thanks for the suggestion but wow...I'll save that as a last resort for sure. I've never used, and have no desire to use genkernel. I'd almost rather live without the sound.

I have to think there's someone (if not many) here with very similar hardware. I think this is pretty common AMD stuff.

Tom
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 589

PostPosted: Tue Dec 29, 2020 2:08 am    Post subject: Reply with quote

Prime X570-Pro with an ALC1220 on it

Everything works just find coming through the onboard chip... I only recently got a monitor with speakers built in and I haven't gotten the NVIDIA HDMI sound to work through it yet (alsamixer only shows S/PDIF controls, no volume controls, and I get no sound through that - not sure if it's an issue with the NVIDIA driver, the kernel HDMI driver, or ALSA in general - every time I have to mess with ALSA, it makes me miss the simplicity of the old OSS drivers). As a side note, sound seems better loaded through modules since many of them need tweaks (the HDA driver in particular).

Hopefully, this gets you sound at least through the built in sound chip for now.

lspci -k
Code:

09:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
   Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 High Definition Audio Controller
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
0b:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
   Subsystem: ASUSTeK Computer Inc. Starship/Matisse HD Audio Controller
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel


from .config
Code:

CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=m
CONFIG_SND_SEQ_DEVICE=y
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
CONFIG_SND_JACK_INPUT_DEV=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_PCM_TIMER=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_MAX_CARDS=32
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_PROC_FS=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_SEQ_MIDI_EVENT=y
CONFIG_SND_SEQ_MIDI=m
CONFIG_SND_AC97_CODEC=m
CONFIG_SND_DRIVERS=y
CONFIG_SND_ALOOP=m
CONFIG_SND_PCI=y
CONFIG_SND_INTEL8X0=m
CONFIG_SND_INTEL8X0M=m
CONFIG_SND_HDA=m
CONFIG_SND_HDA_GENERIC_LEDS=y
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_ANALOG=m
CONFIG_SND_HDA_CODEC_HDMI=m
CONFIG_SND_HDA_GENERIC=m
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM=y
CONFIG_SND_HDA_CORE=m
CONFIG_SND_HDA_PREALLOC_SIZE=0
CONFIG_SND_INTEL_NHLT=y
CONFIG_SND_INTEL_DSP_CONFIG=m
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y
CONFIG_SND_X86=y


.asoundrc
Code:

pcm.hda-intel {
          type hw
          card Generic
}
       
ctl.hda-intel {
          type hw
          card Generic
}

pcm.dmixed {
    type dmix
    ipc_key 1024
    ipc_key_add_uid 0
        hint {
                show on
                description "Dmix"
        }
    slave {
        pcm "hw:1,0"
        period_time 0
        buffer_size 4096
     }
}

pcm.dsnooped {
    type dsnoop
    ipc_key 1025
    slave.pcm "hw:1,0"
}

# asym cant be !default, hence this below.
pcm.duplex {
    type asym
    playback.pcm "dmixed"
    capture.pcm "dsnooped"
}

# Instruct ALSA to use pcm.duplex as the default device
pcm.!default {
    type plug
    slave.pcm "duplex"
}

ctl.!default {
    type hw
    card Generic
}

_________________
Ryzen 3700X, Asus Prime X570-Pro, 32 GB DDR4 3200, GeForce GTX 1660 Super
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, gcc-9.3.0
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Tue Dec 29, 2020 2:55 am    Post subject: Reply with quote

Thanks saellaven! That should help a lot. On my mythtv system I have the HDMI audio on my nVidia card working compiled into the kernel (no modules). That also shows 4 S/PDIF controls (which are unmuted) but to the left of that it does have a volume control.

One thing I just noticed is that CONFIG_SND_AC97_CODEC which I don't have (and actually do have on my MythTV frontend) so that may be a likely suspect. With the modules, how exactly are they getting loaded, and are you setting any parameters for those? I actually haven't used modules in so long I don't remember much about that.

Thanks again!
Tom
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4470
Location: Illinois, USA

PostPosted: Tue Dec 29, 2020 3:55 am    Post subject: Reply with quote

"rc-update add modules boot"
Code:
$ cat /etc/modprobe.d/alsa.conf
# Alsa kernel modules' configuration file.

# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore

##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
##  ALSA portion
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel
alias snd-card-2 cx18-alsa
## alias snd-card-1 snd-ens1371
##  OSS/Free portion
## alias sound-slot-0 snd-hda-intel
## alias sound-slot-1 snd-card-1
##

# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
##  OSS/Free portion - card #2
## alias sound-service-1-0 snd-mixer-oss
## alias sound-service-1-3 snd-pcm-oss
## alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.
options snd cards_limit=3
options snd-hda-intel enable_msi=1 bdl_pos_adj=1,48

This example is from a system using a Turtle Beach PCI card so probably not exactly what you need.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Tue Dec 29, 2020 9:45 am    Post subject: Reply with quote

Thanks Tony0945!

saellaven (or anyone else): For the life of me I CANNOT find the SND_AC97_CODEC setting in make menuconfig. Where is that in the menu and what is it titled.

This actually brings up a very confusing aspect of make menuconfig: I know how to search using "/" and all that, but some things like this don't show any location or prompt...just what it's selected by. I suppose that may be the answer there...that it just gets selected by any of the others listed(?). I probably haven't selected whatever that might be yet....confusing.

EDIT: Never mind...it got selected by the Intel drivers.

Tom
Back to top
View user's profile Send private message
soundrolf
n00b
n00b


Joined: 08 Sep 2016
Posts: 60
Location: Cologne / Germany

PostPosted: Tue Dec 29, 2020 11:49 am    Post subject: Reply with quote

Code:
grep SND /usr/src/linux/.config | grep -v '^#'


Code:

CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_SEQ_DEVICE=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
CONFIG_SND_JACK_INPUT_DEV=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_PCM_TIMER=y
CONFIG_SND_HRTIMER=m
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_MAX_CARDS=32
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_PROC_FS=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_SEQUENCER_OSS=m
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_SEQ_MIDI_EVENT=m
CONFIG_SND_SEQ_MIDI=m
CONFIG_SND_SEQ_VIRMIDI=m
CONFIG_SND_MPU401_UART=m
CONFIG_SND_DRIVERS=y
CONFIG_SND_PCSP=m
CONFIG_SND_DUMMY=m
CONFIG_SND_ALOOP=m
CONFIG_SND_VIRMIDI=m
CONFIG_SND_MTPAV=m
CONFIG_SND_MPU401=m
CONFIG_SND_PCI=y
CONFIG_SND_HDA=m
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_ANALOG=m
CONFIG_SND_HDA_CODEC_SIGMATEL=m
CONFIG_SND_HDA_CODEC_VIA=m
CONFIG_SND_HDA_CODEC_HDMI=m
CONFIG_SND_HDA_CODEC_CMEDIA=m
CONFIG_SND_HDA_CODEC_SI3054=m
CONFIG_SND_HDA_GENERIC=m
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
CONFIG_SND_HDA_CORE=m
CONFIG_SND_HDA_COMPONENT=y
CONFIG_SND_HDA_PREALLOC_SIZE=512
CONFIG_SND_INTEL_NHLT=m
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y
CONFIG_SND_USB_UA101=m
CONFIG_SND_USB_USX2Y=m
CONFIG_SND_USB_CAIAQ=m
CONFIG_SND_USB_CAIAQ_INPUT=y
CONFIG_SND_USB_US122L=m
CONFIG_SND_USB_6FIRE=m
CONFIG_SND_BCD2000=m
CONFIG_SND_FIREWIRE=y


Set CONFIG_SND=m

Regards
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1203
Location: EU or US

PostPosted: Tue Dec 29, 2020 5:28 pm    Post subject: Reply with quote

From your initial post it looks like you have ALSA working and kernel driver is loaded for your analog device. Your trouble seems to be finding correct output. You can use any player to test outputs, VLC even has nice GUI which lets you choose. As an example, with mpv from command line:
Code:
mpv --audio-device=alsa/hdmi:CARD=PCH,DEV=1 movie.mkv

(This will use the speakers in my main monitor with my setup, this is not default output as I have much better quality audio system connected to another output.)
So I suggest instead of setting random devices as default only to discover there is nothing connected why not try them all before setting default output? Also, there is this command line utility 'amixer', it can give you full information about the state of your devices in human readable form.
Regarding volume control for digital outputs there is supposed to be none. Digitizing sound is lossy process, adjusting volume means it will be re-digitized, resulting in further loss of quality. Digital sound is great for storing in computer compatible format and transferring from one side of the planet to another, but you need real high sample rate to minimize the damage. 41.1 or 48 kHz is not high enough, this is why digital sound is supposed to pass thru unchanged and only after DAC when it is analog all adjustments are supposed to happen. Of course, there are methods to apply volume control to digital sound, I think PulseAudio does it and there may be ALSA plugin for it, too, not sure. This is when the theoretical loss of quality is not important for you, most people probably do not have high requirements for sound quality and may even not notice the difference.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16461

PostPosted: Tue Dec 29, 2020 6:00 pm    Post subject: Reply with quote

tld wrote:
I suppose that may be the answer there...that it just gets selected by any of the others listed(?). I probably haven't selected whatever that might be yet....confusing.
Correct. Some symbols are directly configurable, and some are only configured indirectly. Regardless of whether you can configure it, you should be shown an expression, which may or may not be easy to read, that tells you the prerequisites (if any) and the symbols that would forcibly enable this one (if any). In some particularly unfortunate cases, you may have a symbol that is only configured indirectly, and for which the prerequisites are not presently configurable due to unmet requirements.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Tue Dec 29, 2020 6:06 pm    Post subject: Reply with quote

Buffoon wrote:
From your initial post it looks like you have ALSA working and kernel driver is loaded for your analog device.
Thanks for reply! Interesting. Are you saying that based on the aplay -l and/or aplay -L output above? Also, when you specifically say the "analog device", what's different about that output that leads you to say that, as apposed to the HDMI device?

Some things I read gave the impression that if the right kernel drivers aren't there you wouldn't get that output, which is why I wondered about the idea that compiling as modules would make a difference...though I'm not sure how that applies to things like codecs. On my MythTV frontend I have the HDMI output of it's nVidia card working without using any modules at all.

One interesting thing I found about that "Navi 10 HDMI Audio" from the graphics card is this:

http://linux-hardware.org/index.php?id=pci:1002-ab38-1002-ab38

That says that it does in fact use the SND_HDA_INTEL driver. Interestingly however, it also has a note that it's supported in "5.5 and newer" though I can't find that specifically in that link they provide, so I'm not sure that's valid. I'm running 5.4.80 currently.

I'll try some tests as you suggested. I've actually always wanted to try the mpv player anyway, so I may install that. Thanks!

Tom
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1203
Location: EU or US

PostPosted: Tue Dec 29, 2020 6:18 pm    Post subject: Reply with quote

tld,

aplay does not interact directly with hardware, it works with ALSA in kernel. Thus, if kernel cannot handle your sound hardware then aplay (and other utilities) will not "see" it.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Tue Dec 29, 2020 6:41 pm    Post subject: Reply with quote

Wow...unreal...success!...at least with the HDMI which is exactly what I was most interested in. I have a feeling that I simply made some mistake in previous tests because I was sure I tried all this:

Just as you were saying, I needed to find the correct output. Testing with commands like this:
Code:
speaker-test -t wav -Dplughw:0,10
Just now I tried that with 0,3 and it worked! So with this ~/.asoundrc I get my HDMI audio:
Code:
cat .asoundrc
defaults.pcm.card 0
defaults.pcm.device 3
defaults.ctl.card 0


This is with the exact same kernel settings as above still using the 5.4.80 kernel...so that "5.5 or greater" is clearly wrong. By the way, when I run alsamixer against that HDMI card I have the 5 S/PDIF controls, but also have a "PCM" slider that's set all the way up.

So it appears I was very close all along. Thanks everyone for the help! I may try to get the other card working later.

Tom
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Tue Dec 29, 2020 7:16 pm    Post subject: Reply with quote

Wow. When I test the analog card using:
Code:
speaker-test -t wav -c 2 -Dplughw:1,0
...That's actually working, though it appears to mono. That is the left/right tests in that playback are all centered (both sides the same). Not sure what that's about, but it's very close.

Tom
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Fri Jan 01, 2021 6:15 pm    Post subject: Reply with quote

Starting to get back to this one. Again, my HDMI is working perfectly. The onboard analog card, as noted above, outputs sound but in mono. It's hard to be sure, but I think it may be outputting just the left side to both sides.

saellaven: I appear to have the exact same info in lspci -k including the driver in use:
Code:
0b:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
   Subsystem: ASRock Incorporation Starship/Matisse HD Audio Controller
   Kernel driver in use: snd_hda_intel
When you get a chance, I'd like to see what your system shows for this:
Code:
dmesg| grep snd
[    1.584468] snd_hda_intel 0000:0b:00.4: enabling device (0000 -> 0002)
[    1.588559] snd_hda_intel 0000:09:00.1: bound 0000:09:00.0 (ops 0xffffffffaf2d2b40)
[    1.597737] snd_hda_codec_realtek hdaudioC1D0: ALCS1200A: SKU not ready 0x00000000
[    1.599136] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALCS1200A: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[    1.600248] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    1.601770] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    1.603236] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    1.604758] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    1.611008] snd_hda_codec_realtek hdaudioC1D0:      Front Mic=0x19
[    1.614392] snd_hda_codec_realtek hdaudioC1D0:      Rear Mic=0x18
[    1.616107] snd_hda_codec_realtek hdaudioC1D0:      Line=0x1a
[ 9277.543010] snd_hda_intel 0000:09:00.1: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.
As far as I can tell, the fact that it's using that realtek codec is correct. Some of what's there looks questionable, for example the "speaker_outs=0"(?).

I think this is very close though. Thanks!
Tom
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1203
Location: EU or US

PostPosted: Fri Jan 01, 2021 6:28 pm    Post subject: Reply with quote

tld,

to make sure you are not chasing ghosts I'd try with some good liveCD, some buntu or alike. If the outputs behave like expected there then you know it is your Gentoo configuration you have to work on. In addition, you can use those little alsa CLI tools to spy on how buntu set up your sound.
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 589

PostPosted: Fri Jan 01, 2021 8:29 pm    Post subject: Reply with quote

Code:

[    4.479501] snd_hda_intel 0000:09:00.1: enabling device (0000 -> 0002)
[    4.479565] snd_hda_intel 0000:09:00.1: Disabling MSI
[    4.479624] snd_hda_intel 0000:0b:00.4: enabling device (0000 -> 0002)
[    4.491401] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC1220: line_outs=3 (0x14/0x15/0x16/0x0/0x0) type:line
[    4.491404] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    4.491405] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    4.491406] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    4.491407] snd_hda_codec_realtek hdaudioC1D0:    dig-out=0x1e/0x0
[    4.491407] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    4.491409] snd_hda_codec_realtek hdaudioC1D0:      Front Mic=0x19
[    4.491410] snd_hda_codec_realtek hdaudioC1D0:      Rear Mic=0x18
[    4.491411] snd_hda_codec_realtek hdaudioC1D0:      Line=0x1a
[    4.825752] usbcore: registered new interface driver snd-usb-audio


It should be noted that 9:00.1 is my nvidia card and b:00.4 my ALC1220 (seems to be the same assignments for your devices).

I also get the bdl_pos_adj for my video card... I've poked at it a little this week and I wonder if there isn't something wrong with my displayport cable that's causing it not to give me audio, even though all my debugging says it should be working software-wise...

Code:

speaker-test -D plughw:0,3 -c02

speaker-test 1.2.3

Playback device is plughw:0,3
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 8544000
Period size range from 32 to 4272000
Using max buffer size 8544000
Periods = 4
Unable to set hw params for playback: Cannot allocate memory
Setting of hwparams failed: Cannot allocate memory


and then I get the same IRQ timing workaround that you do in my dmesg
_________________
Ryzen 3700X, Asus Prime X570-Pro, 32 GB DDR4 3200, GeForce GTX 1660 Super
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, gcc-9.3.0
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Sat Jan 02, 2021 7:49 am    Post subject: Reply with quote

In case it tells you anything, here's what I get on my MythTV frontend that uses an nVidia card where the HDMI is working:
Code:
dmesg | grep snd
[    2.533738] snd_intel8x0 0000:00:1e.2: intel8x0_measure_ac97_clock: measured 51450 usecs (2479 samples)
[    2.538822] snd_intel8x0 0000:00:1e.2: clocking to 48000
[    2.539691] snd_hda_intel 0000:01:00.1: Disabling MSI
[   49.156340] snd_hda_intel 0000:01:00.1: IRQ timing workaround is activated for card #1. Suggest a bigger bdl_pos_adj.
Tom
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Sat Jan 02, 2021 7:54 am    Post subject: Reply with quote

Buffoon wrote:
tld,

to make sure you are not chasing ghosts I'd try with some good liveCD, some buntu or alike. If the outputs behave like expected there then you know it is your Gentoo configuration you have to work on. In addition, you can use those little alsa CLI tools to spy on how buntu set up your sound.
I was thinking about trying that. The especially strange part is that saellaven's working onboard card doesn't appear to be setup any differently than mine...also that fact that mine actually IS producing audio...just without proper channels/stereo. I'll probably just be using he HDMI anyway, but I'd like to know that the other card works.

Tom
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4470
Location: Illinois, USA

PostPosted: Sat Jan 02, 2021 3:03 pm    Post subject: Reply with quote

tld, are you plugged into the right audio jack? I had that problem on one computer where all the jacks were red or black instead of the standard color codes. I bought a Turtle Beach card in frustration. Then I still had to come here and NeddySeagoon helped me set up .asound.

My stereo jack is Green. MSI lost a sale to Asus from me because the new mobo with the features I want had the same black/red jacks and only black and red USB ports. Hated the all black mobo too. My bad eyes can't see the connectors either. What's with this black craze? I had a 1963 Chevrolet that was black. Very very few cars were black in those days. Now almost all cars are black like 1930. I have an old Biostar Athlom64 mobo with a green board and white connecors. I can see all the parts very well. it's a machine, not a work of Art!
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Sun Jan 03, 2021 9:52 pm    Post subject: Reply with quote

Tony0945 wrote:
tld, are you plugged into the right audio jack?
Yea...I'm actually using the headphone jack on the front panel. Again, I'm getting audio but it appears to be either mono, or just one side on both channels. Really strange one.

Tom
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Sun Jan 03, 2021 10:31 pm    Post subject: Reply with quote

tld wrote:
Tony0945 wrote:
tld, are you plugged into the right audio jack?
Yea...I'm actually using the headphone jack on the front panel. Again, I'm getting audio but it appears to be either mono, or just one side on both channels. Really strange one.

Tom
Wow...unbelievable. I just actually tested the onboard audio with a pair of speakers connected to the green output on the MB instead of using the headphone jack and it works perfectly. It's ONLY the headphone jack that's in mono for some reason. I guess the good news is that the card itself does appear to be working correctly. No clue what to make of the headophone issue. I just tried with different headphones and get the same results.

Tom
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4470
Location: Illinois, USA

PostPosted: Mon Jan 04, 2021 3:00 am    Post subject: Reply with quote

Ah! We've narrowed it to the headphones. I have a set. I'll try to duplicate your results tomorrow.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1600

PostPosted: Mon Jan 04, 2021 7:12 pm    Post subject: Reply with quote

Tony0945 wrote:
Ah! We've narrowed it to the headphones. I have a set. I'll try to duplicate your results tomorrow.
Don't bother. Things get much more elusive than that...UNbelievable...check it out:

I was testing with a pair of V-moda headphones with a TRS plug, which gave me the mono output (actually it sounds as though it's just the left side across both sides) in the front panel headphone jack. Those same headphones work in stereo everywhere else I tried, which of course lead me to believe that the front panel jack was outputting only mono.

HOWEVER...I just dug up a pair of earbuds (with a wired TRS plug just like the V-moda headphones) and they DO get stereo from that jack!!? Insane. I can only assume that there's something physical about that jack and maybe the exact length of the headphone plug(??) that causes them to work incorrectly...ONLY in that jack. Tell me that's not the nuttiest shit you've ever heard.

So apparently I've been good all along. No words. Thanks for offering the help!

Tom
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4470
Location: Illinois, USA

PostPosted: Mon Jan 04, 2021 7:43 pm    Post subject: Reply with quote

tld wrote:
Tell me that's not the nuttiest shit you've ever heard.

It may not be, but I can't think of one at the moment!
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
Goto page 1, 2  Next
Page 1 of 2

 
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