Announcement

Collapse
No announcement yet.

Realtek ALC1220-VB USB Audio

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Hi ALL!
    Ubuntu 18 with 5.5.3-050503-generic tested. Nothing changed. Sound via SPDIF did not appear.
    dmesg | grep snd
    [Пт фев 14 17:15:31 2020] snd_hda_intel 0000:21:00.1: Disabling MSI
    [Пт фев 14 17:15:31 2020] snd_hda_intel 0000:21:00.1: Handle vga_switcheroo audio client
    [Пт фев 14 17:15:31 2020] snd_hda_intel 0000:23:00.4: enabling device (0000 -> 0002)
    [Пт фев 14 17:15:31 2020] snd_hda_intel 0000:23:00.4: no codecs found!
    [Пт фев 14 17:15:34 2020] usbcore: registered new interface driver snd-usb-audio

    Comment


    • #12
      Still broken on 5.6-rc4.

      Comment


      • #14
        Asus Zenith II Extreme. Fedora 33 with kernel 5.8.17-300.fc33.x86_64. Not getting audio over optical out :-(

        Comment


        • #15
          Hi All,

          I have an Asus Zenith II Extreme here on Debian Sid (unstable) since april. I'm also having issues with sound. I got analog sound to work after I installed, but had no luck with digital sound. And analog sound support is also kinda flaky, loosing it's configuration after restart from time to time, or needing to switch profiles until some sound finds its way to the output again.

          My system is using ALSA and PulseAudio, I'm slowly learning about how those intertwine and it looks like the setup is pretty complex, between multiple hardware devices and complex setup to actually be able to support those configs. From what I see, the complexity comes from front and back output, hot plug of headphones and then analog and digital output.

          For output, I use a Logitech Z906 5.1 system, that has analog and SPDIF input. And a button to switch between analog input or digital input. (Evidently, when I forget to switch the input during testing, there is no sound coming out of the speaker, which adds fun and confusion...).

          I also have a USB webcam that appears as a USB device, that I currently use as a microphone for videoconferences.

          I'll describe here what I learned and how to do some stuff, maybe it can help some people along and then they can help me to progress further... I might have miss-understood some stuff, in which case, I'd be happy to learn, all help is welcome!

          The main issues I'm having right now are these:
          1. No digital sound output with PulseAudio.
          2. At system start, sound output on jacks at the back of the motherboard is muted.
          3. no sound input through MB


          Layout of the system and preliminary setup

          From Asus' website, it seems to use two main chips and probably some additional stuff:
          • Supreme FX S1220 Codec: this is the Realtek chip that brought me here, I think
          • ESS SABRE9018Q2C High Definition DAC
          • another chip to switch impedance sensing between front and back panel ?
          It looks like the sound card is connected to the USB bus and appears as USB Audio devices.

          I also had an snd_hda_intel driver loaded, but I determined that this one got loaded because of my NVIDIA graphics card, to provide sound output over HDMI to a connected screen with sound system, with:

          Code:
          lsmod | grep snd
          and listing pulseaudio info, which shows the driver used

          Code:
          pactl list
          Not sure where to get this information from alsa...

          As I don't use this, I disabled it by creating a file in /etc/modprobe.d/sound.conf

          Code:
          -# disable snd_hda_intel that seems to be loading NVidia HDMI output as sound card
          -install snd_hda_intel /bin/false
          -options snd-usb-audio enable=1 index=2
          -options snd-usb-audio enable=1 index=1
          -options snd-usb-audio enable=1 index=0
          (II had to add the - at start of each lines in the quote, or the forum software wouldn't let me post for whatever reason)


          The second part is to reorder the audio devices to have the two USB devices from the motherboard as alsa card 0 and 1, and alsa card 2 is the USB webcam. Not sure this is the best syntax, maybe it could also be one line of
          Code:
          options snd-usb-audio enable=1 index=2,1,0
          but I haven't tested that.

          I hoped this would get my machine to use the usual device as default, but nope...


          ALSA and PulsesAudio

          Now, we have the basic setup, with cards appearing in ALSA (low level kernel interface, can't really mix sound output from multiple sources), and PulseAudio siting on top of ALSA, to show an API to applications and seamlessly mix streams of sound coming from different sources. To add some confusion, some applications talk directly to ALSA, which would block all output of sound from other apps. To avoid this, ALSA also presents a device that is the "alsa.pulse" plugin, that presents a sound card that redirects sound to PulseAudio for mixing before doing the output. You might see a PulseAudio device in alsamixer, which appears without a number and as "default" for me in alsamixer.

          So from my understanding, first thing is to check if low level sound detects what's needed, with ALSA, and then go one layer above with PulseAudio.

          ALSA

          My alsa PLAYBACK cards appear this way (you can see the capture cards with arecord -l, I won't open that can of worms for now):


          Code:
          aplay -l
          **** List of PLAYBACK Hardware Devices ****
          card 0: Audio [USB Audio], device 0: USB Audio [USB Audio]
          Subdevices: 1/1
          Subdevice #0: subdevice #0
          card 0: Audio [USB Audio], device 1: USB Audio [USB Audio #1]
          Subdevices: 1/1
          Subdevice #0: subdevice #0
          card 0: Audio [USB Audio], device 3: USB Audio [USB Audio #3]
          Subdevices: 1/1
          Subdevice #0: subdevice #0
          card 1: Audio_1 [USB Audio], device 0: USB Audio [USB Audio]
          Subdevices: 1/1
          Subdevice #0: subdevice #0

          The devices appear with:

          Code:
          aplay -L
          null
          Discard all samples (playback) or generate zero samples (capture)
          default
          Playback/recording through the PulseAudio sound server
          sysdefault
          Default Audio Device
          lavrate
          Rate Converter Plugin Using Libav/FFmpeg Library
          samplerate
          Rate Converter Plugin Using Samplerate Library
          speexrate
          Rate Converter Plugin Using Speex Resampler
          jack
          JACK Audio Connection Kit
          oss
          Open Sound System
          pulse
          PulseAudio Sound Server
          upmix
          Plugin for channel upmix (4,6,8)
          vdownmix
          Plugin for channel downmix (stereo) with a simple spacialization
          hw:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Direct hardware device without any conversions
          hw:CARD=Audio,DEV=1
          USB Audio, USB Audio #1
          Direct hardware device without any conversions
          hw:CARD=Audio,DEV=3
          USB Audio, USB Audio #3
          Direct hardware device without any conversions
          plughw:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Hardware device with all software conversions
          plughw:CARD=Audio,DEV=1
          USB Audio, USB Audio #1
          Hardware device with all software conversions
          plughw:CARD=Audio,DEV=3
          USB Audio, USB Audio #3
          Hardware device with all software conversions
          sysdefault:CARD=Audio
          USB Audio, USB Audio
          Default Audio Device
          front:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Front output / input
          surround21:CARD=Audio,DEV=0
          USB Audio, USB Audio
          2.1 Surround output to Front and Subwoofer speakers
          surround40:CARD=Audio,DEV=0
          USB Audio, USB Audio
          4.0 Surround output to Front and Rear speakers
          surround41:CARD=Audio,DEV=0
          USB Audio, USB Audio
          4.1 Surround output to Front, Rear and Subwoofer speakers
          surround50:CARD=Audio,DEV=0
          USB Audio, USB Audio
          5.0 Surround output to Front, Center and Rear speakers
          surround51:CARD=Audio,DEV=0
          USB Audio, USB Audio
          5.1 Surround output to Front, Center, Rear and Subwoofer speakers
          surround71:CARD=Audio,DEV=0
          USB Audio, USB Audio
          7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
          iec958:CARD=Audio,DEV=0
          USB Audio, USB Audio
          IEC958 (S/PDIF) Digital Audio Output
          iec958:CARD=Audio,DEV=1
          USB Audio, USB Audio #1
          IEC958 (S/PDIF) Digital Audio Output
          dmix:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Direct sample mixing device
          dmix:CARD=Audio,DEV=1
          USB Audio, USB Audio #1
          Direct sample mixing device
          dmix:CARD=Audio,DEV=3
          USB Audio, USB Audio #3
          Direct sample mixing device
          usbstream:CARD=Audio
          USB Audio
          USB Stream Output
          hw:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          Direct hardware device without any conversions
          plughw:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          Hardware device with all software conversions
          sysdefault:CARD=Audio_1
          USB Audio, USB Audio
          Default Audio Device
          front:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          Front output / input
          surround21:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          2.1 Surround output to Front and Subwoofer speakers
          surround40:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          4.0 Surround output to Front and Rear speakers
          surround41:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          4.1 Surround output to Front, Rear and Subwoofer speakers
          surround50:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          5.0 Surround output to Front, Center and Rear speakers
          surround51:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          5.1 Surround output to Front, Center, Rear and Subwoofer speakers
          surround71:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
          iec958:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          IEC958 (S/PDIF) Digital Audio Output
          dmix:CARD=Audio_1,DEV=0
          USB Audio, USB Audio
          Direct sample mixing device
          usbstream:CARD=Audio_1
          USB Audio
          USB Stream Output
          usbstream:CARD=C920
          HD Pro Webcam C920
          USB Stream Output


          From my understanding, alsa cards are physical cards, and devices are usually linked to physical outputs, and subdevices are mysterious things I don't have any of, so I don't know about that... There are also some plugins and other stuff appearing in there, so it's not directly clear what device belongs to what card. I think you need to match the card name and number from aplay -l to the card name and device number in aplay -L to have a combination of card and device numbers.

          So my cards and devices are:


          Alsa devices usually are talked to with a destination name of interface:card,device,subdevice. You can use this to test your output, with a wave file:

          Code:
          aplay -D <destination> <test wave file>

          interface can be, between others:
          • hw: directly send stream to hardware
          • plughw: send stream to hardware with some adaptation
          • anything from the aplay -L list (not clear about that one, discovered it while writing this)
          • other stuff I don't know of

          If you use hw and the sound file is not adapted to the bitrate of the output, you'll hear your sound played in a Donald Duck voice and receive a warning. plughw does the conversion for you.

          So for me after on change, I tested this:

          Code:
          aplay -D plughw:0,0 test-mic.wav
          -> sends sound out to analog output on the back of the MB. (and this seems to be the same as aplay -D plughw:CARD=Audio,DEV=0 test-mic.wav )

          Code:
          aplay -D plughw:0,1 test-mic.wav
          -> sends sound out to digital output on the back of the MB. For this, I need to switch my amp to digital input, of course...

          Code:
          aplay -D plughw:0,3 test-mic.wav
          -> sends sound out to digital output on the back of the MB, but is pretty garbled, not sure what this one is.

          Code:
          aplay -D plughw:1,0 test-mic.wav
          -> sends sound out to analog output on the front panel of the computer. Has sounds on headphones plugged in the front.

          So from the ALSA and hardware point of view, DIGITAL OUTPUT WORKS

          Alsa issue

          When I start up, I have no sound playing on the analog output, though the volume is up in pulseaudio. If I look with alsamixer, I see that the volume of card 0 device 0 is set to zero and muted. This control does not appear in pulseaudio! If I output to the digital output, sound volume it works, but this one seems to show no volume control interface.

          I tried different things: "alsa store" to store settings, get rid of the autostore file and disable the automatic settings storage on shutdown, for it to restart from fresh, but it still doesn't store my settings.

          One interesting thing is that in alsamixerr, the devices appear with the names "Headphone front", "Headphone Rear", "Headphone Center", "Headphone Woofer", "Headphone Side". So I wonder if it thinks it's a headphone, and the jack is unplugged, so it sets the output volume to zero and mutes it.

          There seem to be files in /usr/share/pulseaudio/alsa-mixer/paths/ that tell what behaviour to have on certain types of output, and if it should handle jack connection or not, but I haven't tested those. First trying to understand what makes it think this output is a headphone.

          It also looks like there is some hardware on the board to do sensing of jack connection either on the front or the back connection, from waht I infer from ASUS' specs on the board web page, but it's pretty sparse in information.

          Plugging a headphone in the front input doesn't seem to change anything.

          If I increase the volume in alsaamixer and unmute, I get analog output. But this gets reset at each reboot.

          PulseAudio

          With sound coming out when I play directly from alsa, I can try to get it to work with PulseAudio. I usually use "pavucontrol" to try and manipulate PulseAudio.

          In analog mode, I need to fiddle with the PulseAudio outputs and profiles and restart the sound playing to have it come out the loudspeaker.

          I have two audio devices: the front panel output, and the backpanel output. And both appear as devices named "USB Audio" in pulseaudio, I can only distiguish them by their list of profiles.

          When trying to select the digital output, I didn't manage to get any sound out of the device. (well sometimes some weird glitches, and some cases where it was playing stuff, but not sure if it was just telling me it was on the digital out and playing analog, and I don't remember exactly those cases, so maybe a fluke). As pulseaudio tries to automatise a lot of stuff, it seems to me like it's randomly changing configurations...

          I'm now diging into console tools for pulseaudio, to try to get a clearer picture of how those pieces fit together between cards, outputs, devices, profiles and how those match ALSA's setup.

          This post got pretty long, if you read down to here, thanks for reading this tedious brain dump. I hope it helps someone to get a bit further and we can solve our problem! I'll report back if I find something more.
          Last edited by nabajour; 28 November 2020, 03:17 PM. Reason: merging posts and reinsert quote making the forum software choke, by doctoring it a bit

          Comment

          Working...
          X