doc:appunti:hardware:mini_pc_ryzen_7_5825u
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:hardware:mini_pc_ryzen_7_5825u [2025/06/07 08:29] – [Problem with audio over HDMI using Pulseaudio and ALSA] niccolo | doc:appunti:hardware:mini_pc_ryzen_7_5825u [2025/10/17 16:36] (current) – [The problem of mute HDMI audio] niccolo | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ===== Linux kernel support of WiFi adapter ===== | ===== Linux kernel support of WiFi adapter ===== | ||
| - | GNU/Linux **kernel 6.1.0** shipped with **Debian 12 Bookworm** does not support the WiFi adapter | + | GNU/Linux **kernel 6.1.0** shipped with **Debian 12 Bookworm** does not support the **RTL8852BE** |
| + | |||
| + | * **[[https:// | ||
| + | * **[[https:// | ||
| + | * **[[https:// | ||
| ===== Problem with audio over HDMI using Pulseaudio and ALSA ===== | ===== Problem with audio over HDMI using Pulseaudio and ALSA ===== | ||
| I had a problem getting audio to work on the **HDMI port**: at bootstrap the PC was totally mute; **no audio** was routed to the HDMI display. | I had a problem getting audio to work on the **HDMI port**: at bootstrap the PC was totally mute; **no audio** was routed to the HDMI display. | ||
| - | First of all I manually checked all the following: | + | First of all I manually checked all the following |
| - | * Using **alsamixer** unmute the **S/PDIF output** of the **default: | + | * From **alsamixer**: unmute the **S/PDIF output** of the first **HD-Audio Generic** sound card. |
| + | * From the **PulseAdio Plugin** on the XFCE panel: check that the master volume control si associated to the **Renoir Radeon High Definition Audio Controller HDMI / DisplayPort 1 Output**, enable the output and set a sensible volume level. | ||
| * Open the XFCE mixer app **pavucontrol**: | * Open the XFCE mixer app **pavucontrol**: | ||
| - | * Into the **Output Devices** tab, check that the **HDMI / DisplayPort 1 Output** is marked as //plugged in//, //unmuted// and click the //Set as fallback// button. | + | * Into the **Output Devices** tab: check that the **HDMI / DisplayPort 1 Output** is marked as //plugged in//, verify it is //unmuted// and click the //Set as fallback// button. |
| - | * From the **PulseAdio Plugin** on the XFCE panel, | + | * Start an audio player (e.g. the **audacious** program to play some mp3 files); into the **Playback** tab of **pavucontrol** |
| - | * Start an audio player (e.g. the **audacious** program | + | |
| + | ==== The problem of mute HDMI audio ==== | ||
| + | |||
| + | There are actually two problems with this PC and the HDMI audio: | ||
| + | |||
| + | - On each reboot the order of the sound cards may vary. The mini PC has two sound cards that can play audio: a **C-Media Electronics Inc. USB Audio Device** is connected to the 3.5 mm jack, and an **HDA-Intel** is responsible to send audio to the HDMI port. On each boot the kernel may discover the hardware with different timing, so the **card #0** is not guaranteed to be always the same. | ||
| + | - A **pulseaudio.service** is started in user-space. If you run a graphical environment, | ||
| + | |||
| + | There is the system-wide service named **alsa-restore.service**, this service is intended | ||
| + | |||
| + | To solve the first problem, set - as the intended user - **the default PulseAudio sink** (where audio goes): | ||
| + | |||
| + | <code bash> | ||
| + | pactl set-default-sink ' | ||
| + | </ | ||
| + | |||
| + | You can discover the available audio sink using the command (search for the lines starting with '' | ||
| + | |||
| + | <code bash> | ||
| + | pacmd list-sinks | ||
| + | </ | ||
| + | |||
| + | You can confirm that the default sink is correctly set with: | ||
| + | |||
| + | <code bash> | ||
| + | pactl get-default-sink | ||
| + | </ | ||
| + | |||
| + | The settings are saved into the user directory | ||
| + | |||
| + | < | ||
| + | # Renoir Radeon High Definition Audio Controller HDMI / DisplayPort | ||
| + | default-sink = alsa_output.pci-0000_04_00.1.HiFi__hw_Generic_1_3__sink | ||
| + | </ | ||
| + | |||
| + | Solving the second problem (pulseaudio.service which sets the mute state to the HDMI port) is a bit more complicated. I resorted on creating **an user systemd service** to be run just after the pulseaudio.service. | ||
| + | |||
| + | First of all unmute the HDMI S/PDIF port using **alsamixer**; | ||
| + | |||
| + | <code bash> | ||
| + | mkdir -p ~/ | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Create a systemd service named **alsa-restore.service** (the name is the same as the system-wide service, but this is executed on user logon): | ||
| + | |||
| + | <code bash> | ||
| + | mkdir -p ~/ | ||
| + | vi ~/ | ||
| + | </ | ||
| + | |||
| + | The file is like this: | ||
| + | |||
| + | < | ||
| + | [Unit] | ||
| + | Description=Restore ALSA mixer levels | ||
| + | After=pulseaudio.service | ||
| + | |||
| + | [Service] | ||
| + | Type=oneshot | ||
| + | RemainAfterExit=true | ||
| + | ExecStart=/ | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=default.target | ||
| + | </ | ||
| + | |||
| + | Finally enable this user's systemd service: | ||
| + | |||
| + | <code bash> | ||
| + | systemctl --user enable alsa-restore.service | ||
| + | </ | ||
| + | |||
| + | **NOTICE**: The '' | ||
| + | |||
| + | < | ||
| + | / | ||
| + | alsa-lib parser.c: | ||
| + | alsa-lib main.c: | ||
| + | </ | ||
| + | |||
| + | To view the **card ID** associated to the **card number**, inspect the ''/ | ||
| - | Now you should ear the sound coming from the HDMI display (obviously your device must have the speakers!). | + | < |
| + | cat / | ||
| + | 0 [Generic_1 | ||
| + | HD-Audio Generic at 0xfc9c8000 irq 69 | ||
| + | 1 [Generic | ||
| + | HD-Audio Generic at 0xfc9c0000 irq 70 | ||
| + | 2 [Device | ||
| + | C-Media Electronics Inc. USB Audio Device at usb-0000: | ||
| + | 3 [acp ]: acp - acp | ||
| + | HCTechnology.Ltd.-HCAR5000_MI-Defaultstring | ||
| + | </ | ||
doc/appunti/hardware/mini_pc_ryzen_7_5825u.1749277792.txt.gz · Last modified: by niccolo
