[SOLVED]: alsa and hda-nvidia guidance

Forum Forums Official Releases antiX-21/22 “Grup Yorum” [SOLVED]: alsa and hda-nvidia guidance

  • This topic has 17 replies, 4 voices, and was last updated Sep 12-9:10 pm by techore.
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #88176
    Member
    techore

      I am seeking guidance on how to use alsa without pulseaudio on a computer using a discrete NVidia GPU.

      Details:

      1. Disabled the system board audio in BIOS
      2. nVidia GPU installed using ddm-mx -i nvidia
      3. alsa-set-sound-card reports only one card detected, “NVidia: HDA-Intel – HDA NVidia
      4. alsamixer displays the HDA NVidia device and five(?) spdif (MM); depressing “m” results with (00)
      5. EDIT: testing applications including aplay, qutebrowser, and firefox-esr result with no sound
      6. Audio works after installing pulseaudio, pulseaudio-utils, and pavucontrol with no further changes

      Both antix-core and antix-base exhibit the same symptoms on the computer.

      My feeling is I have failed to configure alsa correctly, but that is a guess.

      • This topic was modified 8 months ago by techore.
      • This topic was modified 7 months, 3 weeks ago by Brian Masinick.
      #88211
      Member
      techore
        Helpful
        Up
        0
        ::

        Additional details:

        cat /proc/asound/cards
         0 [NVidia         ]: HDA-Intel - HDA NVidia
                              HDA NVidia at 0xf7080000 irq 17
        lspci |grep -i nvidia
        01:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1650 SUPER] (rev a1)
        01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
        01:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1)
        01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU116 USB Type-C UCSI Controller (rev a1)
        sudo lsmod |grep snd_hda_codec_hdmi
        snd_hda_codec_hdmi     69632  1
        snd_hda_codec         143360  2 snd_hda_codec_hdmi,snd_hda_intel
        snd_hda_core           90112  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
        snd_pcm               126976  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
        snd                    94208  6 snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
        ls /proc/asound/card0
        codec#0  eld#0.1   eld#0.11  eld#0.3  eld#0.5  eld#0.7  eld#0.9  pcm10p/  pcm3p/  pcm8p/
        eld#0.0  eld#0.10  eld#0.2   eld#0.4  eld#0.6  eld#0.8  id       pcm11p/  pcm7p/  pcm9p/qq
        cat /proc/asound/card0/eld#0.4
        monitor_present		1
        eld_valid		1
        monitor_name		DENON-AVR
           
        connection_type		DisplayPort
        eld_version		[0x2] CEA-861D or below
        edid_version		[0x3] CEA-861-B, C or D
        manufacture_id		0xee11
        product_id		0x45
        port_id			0x400
        support_hdcp		0
        support_ai		0
        audio_sync_delay	256
        speakers		[0x5f] FL/FR LFE FC RL/RR RC RLC/RRC
        sad_count		7
        sad0_coding_type	[0x1] LPCM
        sad0_channels		8
        sad0_rates		[0x1ee0] 32000 44100 48000 88200 96000 176400 192000
        sad0_bits		[0xe0000] 16 20 24
        sad1_coding_type	[0x7] DTS
        sad1_channels		6
        sad1_rates		[0x6c0] 44100 48000 88200 96000
        sad1_max_bitrate	1536000
        sad2_coding_type	[0x2] AC-3
        sad2_channels		6
        sad2_rates		[0xe0] 32000 44100 48000
        sad2_max_bitrate	640000
        sad3_coding_type	[0xb] DTS-HD
        sad3_channels		8
        sad3_rates		[0x1ec0] 44100 48000 88200 96000 176400 192000
        sad4_coding_type	[0xa] E-AC-3/DD+ (Dolby Digital Plus)
        sad4_channels		8
        sad4_rates		[0xc0] 44100 48000
        sad5_coding_type	[0xc] MLP (Dolby TrueHD)
        sad5_channels		8
        sad5_rates		[0x1ec0] 44100 48000 88200 96000 176400 192000
        sad6_coding_type	[0xb] DTS-HD
        sad6_channels		8
        sad6_rates		[0x1ec0] 44100 48000 88200 96000 176400 192000
        cat /var/log/Xorg.0.log |grep HDMI
        [   512.534] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event2)
        [   512.534] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event3)
        [   512.535] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event4)
        [   512.535] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=9 (/dev/input/event5)
        [   512.535] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=10 (/dev/input/event6)
        [   512.535] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=11 (/dev/input/event7)
        #88217
        Member
        ModdIt
          Helpful
          Up
          0
          ::

          Hi techore, very quiet here, probably no helper has a similar setup
          in usage.

          I do have NVidia graphics (back at last) but use an audigy soundcard,
          bit shy of experimenting too much, was unable to connect to NVidia sound
          in a quick check..

          Best suggestion I can make is to start with a full antix version and get
          sound working with that than transfer knowledge, or slim down the full version,
          something I have found much easier than building from base.

          If you can get and set sound with the controll center application it should
          enable easy transfer of sound related settings such as alsarc etc.

          #88239
          Member
          techore
            Helpful
            Up
            0
            ::

            I gave a antix-base a go but I didn’t give antix-full a try. Simple enough to download, install on USB, and test. An excellent suggestion. *fingerscrossed*

            #88318
            Member
            marcelocripe
              Helpful
              Up
              0
              ::

              Hello techore.

              6. Audio works after installing pulseaudio, pulseaudio-utils, and pavucontrol with no further changes

              Some people are getting the audio following this thread Pipewire to manage audio in antiX 21.
              I don’t own two audio cards like you, but I got some good results with PipeWire, but in some specific cases I needed to install PulseAudio, as the computer got very slow after installing PulseAudio, I disabled it from antiX startup 21. When I need PulseAudio, I click on the menu PulseAudio Activator and Deactivator

              marcelocripe
              (Original text in Brazilian Portuguese language)

              – – – – –

              Olá techore.

              6. Audio works after installing pulseaudio, pulseaudio-utils, and pavucontrol with no further changes

              Algumas pessoas estão obtendo o áudio seguindo este tópico Pipewire to manage audio in antiX 21.
              Eu não possuo duas placas de áudio como você, mas consegui alguns bons resultados com o PipeWire, mas em alguns casos específicos, eu precisei instalar o PulseAudio, como o computador ficou muito lento depois da instalação do PulseAudio, eu o desativei da inicialização do antiX 21. Quando eu preciso do PulseAudio, clico no menu Ativador e Desativador do PulseAudio

              marcelocripe
              (Texto original em idioma Português do Brasil)

              #88348
              Member
              techore
                Helpful
                Up
                0
                ::

                Some people are getting the audio following this thread Pipewire to manage audio in antiX 21.

                It chaps my hide that I don’t have sufficient knowledge to get alsa working for the descrete GPU. Works fine on my other four boxes using built-in system board audio chips. I am determined to get alsa working, however, pipewire would be a acceptable alternative while I figure it out.

                Thank you for the suggestion.

                #88378
                Member
                ModdIt
                  Helpful
                  Up
                  0
                  ::

                  Hi techore, maybe some help in

                  https://bbs.archlinux.org/viewtopic.php?id=186597

                  Hard to understand how setting one card can push the default to the GPU
                  but worth a try.

                  #88419
                  Member
                  techore
                    Helpful
                    Up
                    0
                    ::

                    Agreed. Doesn’t make sense. I’ll read it again and check my assumptions.

                    Thank you, @Moddit.

                    #88421
                    Member
                    techore
                      Helpful
                      Up
                      0
                      ::

                      After reading it again, my take away is the poster is dealing with two sound devices and wants to use the second device as the default. Interesting reading and “emeres” knows his stuff.

                      I will keep digging and appreciate the reference.

                      #88432
                      Member
                      Wallon
                        Helpful
                        Up
                        0
                        ::

                        Hello,

                        On my desktop with antiX Full, I use the sound of the motherboard to connect my 2.1 stereo speakers with subwoofer in addition (it’s Logitech). I don’t use the sound provided by my NVIDIA GTX960 graphics card on my 2 monitors which also have speakers.
                        I don’t think it’s interesting to disable the sound on a motherboard from the bios. I have no problem with Alsa.

                        Best regards,
                        Wallon

                        #88447
                        Member
                        techore
                          Helpful
                          Up
                          0
                          ::

                          @wallon, not suggesting folks not use onboard audio chips and, yes, they are, generally, easy to setup with alsa.

                          The computer with the audio issue is a home theater system, so it makes sense to send the two-channel digital audio using the hdmi to the receiver in “direct” mode. A decade ago, I used good quality audio boards with optical out to serve the same purpose. An option, I would prefer to avoid ($$$).

                          #88453
                          Member
                          ModdIt
                            Helpful
                            Up
                            0
                            ::

                            Hi Techore, the posts do make sense to me although seem confusing.
                            You also have 2 sound devices.

                             cat /proc/asound/cards
                             0 [NVidia         ]: HDA-Intel - HDA NVidia
                            
                            I have 3. Intel is off in BIOS but strangely still active. Audigy set to default.
                            cat /proc/asound/cards
                             0 [PCH            ]: HDA-Intel - HDA Intel PCH
                                                  HDA Intel PCH at 0xf7310000 irq 34
                             1 [NVidia         ]: HDA-Intel - HDA NVidia
                                                  HDA NVidia at 0xf7080000 irq 17
                             2 [Audigy2        ]: Audigy2 - SB Audigy 2 ZS [SB0350]
                                                  SB Audigy 2 ZS [SB0350] (rev.4, serial:0x20021102) at 0xc000, irq 18

                            Maybe I can find time to try and get sound from my NVidia card over the weekend, might find some
                            clues to help with your issue.

                            @wallon, techore wants sound through his NVidia card.
                            There are many reasons for wanting to use a discrete card for sound.

                            Gamers or those working with video will want sound in synch with scenes and thus prefer
                            to use the Graphics card. I prefer my audigy card as the sound quality is vastly better
                            than onboard. But if for any reason a lot of frames drop in video sound is out of synch..

                            #88454
                            Member
                            ModdIt
                              Helpful
                              Up
                              0
                              ::

                              @ techore wondering if aplay -L will provide any clues.

                              Maybe worth trying, if you have not done so already, you will
                              need to insert correct device.

                              .asoundrc-device addition (my output device is hw:0,3):

                              pcm.stereo {
                              type plug
                              slave {
                              pcm { type hw card 0 device 3 subdevice 0 }
                              channels 2
                              }
                              }

                              • This reply was modified 7 months, 3 weeks ago by ModdIt.
                              #88562
                              Member
                              techore
                                Helpful
                                Up
                                0
                                ::

                                I got it! and thank you, @Moddit.

                                Your response set me on a line of discovery that was fruitful.

                                Ultimately, I just needed to:

                                1. Set the default card, *device*, and control in /etc/asound.conf
                                2. Unmute the alsa device s/pdif1 using ‘alsamixer’
                                3. Save to persist across reboots using ‘alsactl store’ which updates /var/lib/alsa/asound.state

                                Step one may not stick on package updates and steps 2 and 3 are just awkward. However, it works!

                                head -15 /etc/asound.conf

                                Results:

                                # v4.0
                                # Requires alsa-utils libasound2-plugin-equal
                                
                                # ***** Defaults *******************************************************
                                
                                # Audio card/chip and device to use and control
                                # In most cases these settings should remain commented (#)
                                # When commented, card and device 0 are usually automatically selected
                                # When uncommented, the item corresponding to the number is selected
                                defaults.pcm.card 0
                                defaults.pcm.device 7
                                defaults.ctl.card 0

                                Some of the more useful references I found.

                                References:
                                https://download.nvidia.com/XFree86/gpu-hdmi-audio-document/#_trouble_shooting
                                https://alsa.opensrc.org/Asoundrc
                                https://www.mythtv.org/wiki/Using_ALSA%27s_speaker-test_utility
                                https://www.alsa-project.org/main/index.php/Asoundrc
                                https://bbs.archlinux.org/viewtopic.php?id=152288
                                https://www.volkerschatz.com/noise/alsa.html

                                #88564
                                Member
                                ModdIt
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Good news Techore,
                                  I find every layer on top of alsa makes sound
                                  more murky and artificial, with a good audio setup that is
                                  important.
                                  Enjoy :-).

                                  I think the setup problem may not have happened with a full version
                                  of antiX as the control center tools generaly do the settings
                                  reliably on a user to user basis.

                                  Maybe worthwhile exploring the antiX scripts. The gui is only icing on
                                  the cake so with little change they should be usable in the terminal
                                  on more minimal systems.

                                  My system wide default card setting with etc/asound.conf is
                                  empty/commented out.
                                  Asound.rc does the job for me as an individual user configuration.
                                  Regarding asound not always sticking on updates, set it read only
                                  which should help.

                                  Thanks for links, especialy the first one sound from NVidia is well
                                  written and easy to understand. Noted for future use.

                                  Second user is for official work, endless hard to understand
                                  forms churned out by German officials to show the masses how
                                  powerless they are in the face of the state.

                                  • This reply was modified 7 months, 3 weeks ago by ModdIt.
                                  • This reply was modified 7 months, 3 weeks ago by ModdIt.
                                Viewing 15 posts - 1 through 15 (of 18 total)
                                • You must be logged in to reply to this topic.