Announcement

Collapse
No announcement yet.

Realtek ALC1220-VB USB Audio

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

  • nabajour
    replied
    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

    Leave a comment:


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

    Leave a comment:


  • vitkor
    replied
    I created a bug in bugzilla.kernel.org:
    https://bugzilla.kernel.org/show_bug.cgi?id=206873

    Leave a comment:


  • pnky
    replied
    Still broken on 5.6-rc4.

    Leave a comment:


  • vitkor
    replied
    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

    Leave a comment:


  • vitkor
    replied
    I checked in ubuntu 18 with new 5.5 kernel. Nothing changed. Support did not appear.

    Leave a comment:


  • Noname
    replied
    Update after purchase of ASUS ROG ZENITH II EXTREME

    Windows audio - same as before. This time I installed fresh copy of Windows 1903 and it auto updated to 1909. After some time audio driver was picked up from M$ and installed.

    Linux audio - same issue, optics don't work, line out works (although my installed Debian version now don't output authing even on LineOut, need to investigate that, Live works fine).

    Performance on sTRx40 platform for SATA both in AHCI and RAID mode is slower then on x299 platform for smaller files (cache / memory latency causing this ???)

    Due to some purchase issue I will need to return Zenith so now I wonder if going with MSI is viable option. Although I do like Zenith DIMM.2 slot.

    Leave a comment:


  • Noname
    replied
    Audio Windows:
    I can't recall at what step I did installed audio, but it was not picked up when installing Windows, then I did update and installed driver using provided drivers from Asus website.
    To be honest this is for work workstation and I already wasted so much time on this so I given up and purchased ASUS ROG ZENITH II EXTREME. I'm suspecting that issue is with my mobo not series itself. Wanted to go with MSI but availability is scarce and there is long waiting period for shipment. Either way will check that Zenith (with is overkill for my needs, well maybe later for "cheap" render rig with quad GPU) and report. To be honest I'm fine with LineOut but it's like splinter when You know that something in Your "new" shiny rig doesn't work. Unfortunately I only have one speakers with build in DAC but that was working with x299 so I doubt that's the issue.

    There is also issue with SSD performance with is slower on sTRx40 for me so I will check that also.
    New board uses same audio codec so now I'm putting my money on faulty mobo unit on my end.

    Audio Linux:
    Check out ALSA wiki, they have info about usb and hda_intel modules their parameters and how to use them: https://www.alsa-project.org/wiki/Matrix:Main (if not already). By brief look at it Your assumption could be right that usb module is the one that should be checked out.
    Filling bug report definetly but I already seen SupremeFX bug report (it was unspecified if issue was with LineOut or optical) reported back in 2017 IIRC so ... I wouldn't hold my breathe for quick fix, but maybe work around could be shared / found.

    Leave a comment:


  • mattlach
    replied
    Yeah,

    I have had no issues in Windows. Did you let Windows automatically install the driver, or did you download the latest from the website? Mine has been working perfectly in Windows with latest downloaded drivers. I never tested without them though.

    As far as Linux goes I have reinstalled my old Creative X-Fi Titanium HD in my 1x slot for now. Guess this is just one of those "early adopter penalty" situations, going to have to wait for updated kernels/modules/ALSA.

    I hope that Threadripper doesn't stay a small enough install base that it never gets addressed.

    Maybe we should collect some information and file a proper bug report?
    Last edited by mattlach; 30 December 2019, 05:35 PM.

    Leave a comment:


  • Noname
    replied
    SSD:
    Did testing with latest Windows 10 1909 same story although a little bit better.

    Audio Windows:
    Windows 10 1909 - exactly as in 1803 (cracklings when changing songs, audio hangs and then humming sound from speakers, delay on playback). Plus there is this bonus "new feature: search on type" /sarcasm off (I hate this in new Nautilus and of course M$ had to port this to Windows ...).
    So yeah staying away from 1909.

    Audio Linux:

    I'm afraid that there is no solution for this to work. I didn't found anything and I'm afraid that this is instance of no HW support.

    Here is alsa-info from various distros that I tested:

    Debian testing: http://alsa-project.org/db/?f=5f9186...13193c3cb2aa14
    Kubuntu 19.10: http://alsa-project.org/db/?f=ae06d2...dd018613b49132
    Mint 19.3: http://alsa-project.org/db/?f=c25807...434f2877179eec
    Ubuntu 19.10: http://alsa-project.org/db/?f=f61444...80d6816b3a71e7

    Audio pci devices on ROG

    Code:
    [email protected]:/home/user/Desktop# lspci | grep Audio
    21:00.1 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)
    23:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
    From what I understand that Realtek® ALC4050H codec should be completely transparent to OS and is just USB2 <-> I2S bridge as TR platform (Ryzen also ???) don't support Intel HD Audio. But I can be wrong on this one.

    Bottom line I will return that ROG board and get myself MSI WiFi one then will report back.
    Personally I think that entire TR platform has those issues.

    PS. snd_hda_intel dunno about that. On Windows there is this "Realtek USB Audio" sound-card so maybe that's indeed done via USB.

    Just side note here I'm coming from Ausu Prime Deluxe x299 platform and that Debian (and Windows) was installed there - S/PDIF Out worked fine and codec on that mobo is: Realtek® S1220A. So only addition here (at least on Aorus dunno about Strix as they don't provide this info) is that 4050H in between.
    Last edited by Noname; 28 December 2019, 09:23 AM.

    Leave a comment:

Working...
X