Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

李松錡

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Hi SENGA,
     
    For 1., there should be no extra setup for the kernel config change. `g_audio/UAC1` gadget config should be enough (no need to recompile the kernel). The thing you need to change is the alsaloop daemon (this line). I did not verify it, but AI gives a example of looping the speaker and microphone in 2 different threads like this:
     
    alsaloop -v \ -T 1 -C hw:Loopback,1,0 -P hw:CARD=B,DEV=0 -t 20000 -A 3 \ -T 2 -C hw:CARD=B,DEV=0 -P hw:Loopback,1,1 -t 20000 -A 3  
    . It looks legitimate, you can give it a try.
     
    For 2., I tried playing Astro Bot the last stage, and I did not notice any inconsistency or audio lagging. I did not have the equipment to measure the latency, so I cannot give you the exact number. But do make sure the device is properly cooled (a nice heatsink and do not seal it in a box should be good), otherwise the CPU is throttled, and there will be sound breaking.
     
    So as the long text in the description, the reason I ended up using Radxa Zero 3W is because:
     
    It has at least two USB controllers. That is the requirement, because you need one for the USB gadget to connect to PS5, and another one for the USB host to connect to the USB speaker for output. The CPU is powerful enough. Before I used orange Pi One, but the single core performance is not fast enough, so I heard sound breaking. I guess maybe compare the single core score with rk3566 (the one on Radxa Zero 3W) might be a reference to see if a CPU is capable of handling the task. Higher single core score is better. With these 2 reasons, Radxa Zero 3W seems to be the bottom line you can find on market for such project. You can get a even more powerful board as you like.
  2. Like
    Hi, I would like to share my recent work: a cheap USB Audio Class 1.0 (UAC) input to UAC 2.0 output converter.
     
    For folks that may not understand why I have this crazy idea, here is the background:
    For some shitty reasons, PS5 does not support outputting audio through certain USB sound card, and that is because PS5 only supports very old USB sound card (UAC 1.0), and usually high end speakers or sound cards would use newer, better UAC 2.0 protocol.
    So, this shitty thing happens to me, when I thought my EDIFIER S880 speaker would be a plus for my gaming experience. EDIFIER S880 has a UAC 2.0 in input source, so my PS5 does not support that. So, what I can do is to use another 3.5 jack to connect the speaker to my PS5.
    Unfortunately, there is a staticky buzz sound throughout this channel. What's even worse is that EDIFIER S880 has 6 input source selection, but I can only switch to the next source, wait for 2 seconds, and repeat this process 5 times every time I want to switch the audio from my computer to the PS5.
     
    After lots of trials and flashing my custom kernel, I finally did it!
    The idea is to use a board that has 1 USB otg port to act as a UAC 1.0 sound card, and has another 1 USB host port to connect to the UAC 2.0 speakers, then run programs on that board to redirect sound from USB otg port to USB host port. It is even a plus that the board consumes less power, so we do not need an extra or special power supply for it; this becomes crucial, especially when sharing the same USB connection with the USB otg port (SBC boards are more power-hungry these days!). The standard USB 2.0 protocol only allows 5V 0.5A to the device connected.
    I actually built one with an Orange Pi One board, but it turns out that the CPU is not fast enough, and there are sound glitches sometimes.
     
    With some research, I found this board that perfectly fits my needs: Radxa zero 3W. Here is the advantage:
    - It is cheap, and the one I used is the nearly minimum SKU (1 GB ram with 8 GB onboard eMMC, they also have no onboard eMMC SKU).
    - The otg port could handle USB PD protocol, meaning no special hacks are needed, you could get at most 30W of power, if needed (and turns out the normal USB 2.0 port on my PS5 works perfectly, so I guess it consumes less than 5V 1A = 5W)
    - It is tiny.
     
    However, things don't work right out of the box. At the beginning, I flashed the official, latest Radxa OS, modprobe the g_audio. It is running as a UAC 2.0 device, so it is not the one I want. As a result, I grabbed their kernel source, changed the config to UAC 1.0 gadget, and flashed onto the board, but there seems to be some issues in their kernel fork for UAC 1.0 driver: there was no /dev/snd/controlC0, so the g_audio failed to run.
    As a result, I turned to use the Armbian build. This time, the /dev/snd/pcmC0D0c is missing, so g_audio failed to run again.
    I then compiled my own kernel, flashed it onto the board. The Armbian build is with kernel 6.1, and the kernel I built is kernel 6.12, then the board failed to boot to the kernel due to U-Boot thought there were some errors.
    Luckily, I found that building the whole Armbian image with kernel 6.12 can boot without issues, so I built a custom kernel 6.12 with UAC 1.0 enabled image, modeprobe the g_audio module, and it finally worked!
     
    After that, I crafted a simple golang SystemV daemon for bootstrapping and terminating the alsaloop program for redirecting the sound, and used a udev rule to notify that daemon of the attachment/detachment of the USB speaker out event. The converter is finally working!
     
    Here is the pre-built image for folks who want a quick test. It is based on the commit b27c86e620dcd9f55daadf52ccc85643dba2a381 from the armbian build repo with the following config modification:
    diff --git a/config/kernel/linux-rockchip64-current.config b/config/kernel/linux-rockchip64-current.config index d053d0997..6e360bba7 100644 --- a/config/kernel/linux-rockchip64-current.config +++ b/config/kernel/linux-rockchip64-current.config @@ -3507,3 +3507,8 @@ CONFIG_RATIONAL_KUNIT_TEST=m CONFIG_MEMCPY_KUNIT_TEST=m CONFIG_TEST_MEMCAT_P=m CONFIG_MEMTEST=y + +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=n +CONFIG_USB_F_UAC2=n +CONFIG_GADGET_UAC1=y  
    Currently, the "current" build does not detect the Wi-Fi interface, but as it does not affect the audio converting feature, I may not put too much effort into this.

  3. Like
    Hi, I would like to share my recent work: a cheap USB Audio Class 1.0 (UAC) input to UAC 2.0 output converter.
     
    For folks that may not understand why I have this crazy idea, here is the background:
    For some shitty reasons, PS5 does not support outputting audio through certain USB sound card, and that is because PS5 only supports very old USB sound card (UAC 1.0), and usually high end speakers or sound cards would use newer, better UAC 2.0 protocol.
    So, this shitty thing happens to me, when I thought my EDIFIER S880 speaker would be a plus for my gaming experience. EDIFIER S880 has a UAC 2.0 in input source, so my PS5 does not support that. So, what I can do is to use another 3.5 jack to connect the speaker to my PS5.
    Unfortunately, there is a staticky buzz sound throughout this channel. What's even worse is that EDIFIER S880 has 6 input source selection, but I can only switch to the next source, wait for 2 seconds, and repeat this process 5 times every time I want to switch the audio from my computer to the PS5.
     
    After lots of trials and flashing my custom kernel, I finally did it!
    The idea is to use a board that has 1 USB otg port to act as a UAC 1.0 sound card, and has another 1 USB host port to connect to the UAC 2.0 speakers, then run programs on that board to redirect sound from USB otg port to USB host port. It is even a plus that the board consumes less power, so we do not need an extra or special power supply for it; this becomes crucial, especially when sharing the same USB connection with the USB otg port (SBC boards are more power-hungry these days!). The standard USB 2.0 protocol only allows 5V 0.5A to the device connected.
    I actually built one with an Orange Pi One board, but it turns out that the CPU is not fast enough, and there are sound glitches sometimes.
     
    With some research, I found this board that perfectly fits my needs: Radxa zero 3W. Here is the advantage:
    - It is cheap, and the one I used is the nearly minimum SKU (1 GB ram with 8 GB onboard eMMC, they also have no onboard eMMC SKU).
    - The otg port could handle USB PD protocol, meaning no special hacks are needed, you could get at most 30W of power, if needed (and turns out the normal USB 2.0 port on my PS5 works perfectly, so I guess it consumes less than 5V 1A = 5W)
    - It is tiny.
     
    However, things don't work right out of the box. At the beginning, I flashed the official, latest Radxa OS, modprobe the g_audio. It is running as a UAC 2.0 device, so it is not the one I want. As a result, I grabbed their kernel source, changed the config to UAC 1.0 gadget, and flashed onto the board, but there seems to be some issues in their kernel fork for UAC 1.0 driver: there was no /dev/snd/controlC0, so the g_audio failed to run.
    As a result, I turned to use the Armbian build. This time, the /dev/snd/pcmC0D0c is missing, so g_audio failed to run again.
    I then compiled my own kernel, flashed it onto the board. The Armbian build is with kernel 6.1, and the kernel I built is kernel 6.12, then the board failed to boot to the kernel due to U-Boot thought there were some errors.
    Luckily, I found that building the whole Armbian image with kernel 6.12 can boot without issues, so I built a custom kernel 6.12 with UAC 1.0 enabled image, modeprobe the g_audio module, and it finally worked!
     
    After that, I crafted a simple golang SystemV daemon for bootstrapping and terminating the alsaloop program for redirecting the sound, and used a udev rule to notify that daemon of the attachment/detachment of the USB speaker out event. The converter is finally working!
     
    Here is the pre-built image for folks who want a quick test. It is based on the commit b27c86e620dcd9f55daadf52ccc85643dba2a381 from the armbian build repo with the following config modification:
    diff --git a/config/kernel/linux-rockchip64-current.config b/config/kernel/linux-rockchip64-current.config index d053d0997..6e360bba7 100644 --- a/config/kernel/linux-rockchip64-current.config +++ b/config/kernel/linux-rockchip64-current.config @@ -3507,3 +3507,8 @@ CONFIG_RATIONAL_KUNIT_TEST=m CONFIG_MEMCPY_KUNIT_TEST=m CONFIG_TEST_MEMCAT_P=m CONFIG_MEMTEST=y + +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=n +CONFIG_USB_F_UAC2=n +CONFIG_GADGET_UAC1=y  
    Currently, the "current" build does not detect the Wi-Fi interface, but as it does not affect the audio converting feature, I may not put too much effort into this.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.