Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
audio_issues [2021/09/27 12:49] – adjusted wraps atariaudio_issues [2022/08/02 09:31] – added profile section atari
Line 5: Line 5:
 </WRAP> </WRAP>
  
-==== I have no sound! ====+===== I have no sound! =====
  
 If trying to use HDMI sound on a Radeon GPU, first check [[:supported_pc_hardware#ati_radeon_hdmi_audio_output|that you have enabled the setting in the boot line]]. If on a Nvidia card, make sure your [[:supported_pc_hardware#nvidia_drivers|official drivers are activated]]. If trying to use HDMI sound on a Radeon GPU, first check [[:supported_pc_hardware#ati_radeon_hdmi_audio_output|that you have enabled the setting in the boot line]]. If on a Nvidia card, make sure your [[:supported_pc_hardware#nvidia_drivers|official drivers are activated]].
  
-When that's all clear, first experiment with different settings in **MAIN MENU** -> **SYSTEM SETTINGS** -> **AUDIO PROFILE**. You should get sound immediately when exiting back to the **MAIN MENU** (there is background music playing by default). If you're still not able to get any sound, try also manually setting an **AUDIO OUTPUT** device (they change with each different profile, you need to exit back to **MAIN MENU** to update the list). This may take a lot of trial and error, but only needs to be done once.+When that's all clear, first experiment with different settings in **MAIN MENU** -> **SYSTEM SETTINGS** -> **AUDIO PROFILE**. You should get sound immediately when exiting back to the **MAIN MENU** (there is background music playing by default). If you're still not able to get any sound, try also manually setting an **AUDIO OUTPUT** device (they change with each different profile, you need to exit back to **MAIN MENU** to update the list). To rigidly test all your hardware's possible audio output modes (this may take a lot of trial and error, but only needs to be done once): 
 + 
 +  - Go to **MAIN MENU** -> **SYSTEM SETTINGS** -> **AUDIO PROFILE** and select the first profile, then back out to the **MAIN MENU**. 
 +  - Go back into **SYSTEM SETTINGS** -> **AUDIO OUTPUT** and test all available outputs, exiting to the **MAIN MENU** between each change. 
 +  - If none of the **AUDIO OUTPUT** options worked, repeat steps 1-2 for a different **AUDIO PROFILE**. Your **AUDIO OUTPUT** options might change depending on the **AUDIO PROFILE** selected. 
 + 
 +If the appropriate options are not being listed in the menu, you could try using the generic name for the audio device by manually editing the configuration file. Open ''system/batocera.conf'' and modify (or add if not already present) the ''audio.device'' key to be: 
 + 
 +<code> 
 +audio.device=hdmi 
 +</code> 
 + 
 +where "hdmi" is the generic name for your audio device.
  
 <WRAP center round info> <WRAP center round info>
Line 21: Line 33:
   - You can also diagnose some sound issues with the ''alsamixer'' sound mixer that is available when pressing ''[Ctrl]''+''[Alt]''+''[F4]'' (text-mode sound mixer). Make sure that all the outputs are enabled, and they have their volume up. You can return to Batocera with ''[Ctrl]''+''[Alt]''+''[F2]''.   - You can also diagnose some sound issues with the ''alsamixer'' sound mixer that is available when pressing ''[Ctrl]''+''[Alt]''+''[F4]'' (text-mode sound mixer). Make sure that all the outputs are enabled, and they have their volume up. You can return to Batocera with ''[Ctrl]''+''[Alt]''+''[F2]''.
  
-==== I have sound in Kodi, but not in the main menu or emulators even after selecting the audio device from the above steps and rebooting ====+===== I have sound in Kodi, but not in the main menu or emulators even after selecting the audio device from the above steps and rebooting =====
  
 <WRAP center round info> <WRAP center round info>
Line 43: Line 55:
   - Reboot, and if your audio still isn't working then try ''audio.device=1,3'', then ''audio.device=2,3'' and so on.   - Reboot, and if your audio still isn't working then try ''audio.device=1,3'', then ''audio.device=2,3'' and so on.
  
-==== I have sound in emulators and the main menu, but not during video previews ====+===== Not all of my speakers are being used ===== 
 + 
 +Ensure you have selected the right audio profile in  
 + 
 +For instance, a 5.1 surround sound setup would want to use the "SURROUND 5.1" profile: 
 + 
 +{{:audio-profile.png?nolink&600|}} 
 + 
 +===== I have sound in emulators and the main menu, but not during video previews =====
  
 <WRAP center round info> <WRAP center round info>
-No longer applicable for **v32** and up. ''.asoundrc'' isn't read by Pipewire (there shouldn't be this specific problem in the first place anymore).+No longer applicable for **v32** and up. ''.asoundrc'' isn't read by Pipewire (there shouldn't be this specific problem in the first place anymore). **v32** and up will <wrap em>automatically remove</wrap> ''/userdata/system/.asoundrc''.
 </WRAP> </WRAP>
  
Line 88: Line 108:
 Worst case, if it doesn't work and you want to go back to the original state, just remove the file ''/userdata/system/.asoundrc'' (or ''\system\.asoundrc'' from the network share). Worst case, if it doesn't work and you want to go back to the original state, just remove the file ''/userdata/system/.asoundrc'' (or ''\system\.asoundrc'' from the network share).
  
-==== No sound during the splash video ====+===== No sound during the splash video =====
  
 First of all, check that the splash.screen.sound value in the ''batocera.conf'' file is set to ''1''. First of all, check that the splash.screen.sound value in the ''batocera.conf'' file is set to ''1''.
Line 106: Line 126:
   - When updating batocera, those changes will be lost.   - When updating batocera, those changes will be lost.
  
-==== My audio is randomly cutting out, depending on what's happening on screen ====+===== My audio is randomly cutting out, depending on what's happening on screen =====
  
 It could be that your audio buffer isn't high enough. It could be that your audio buffer isn't high enough.
  
-You can change your default audio buffer for Libretro cores by navigating to **MAIN MENU** -> **GAMES SETTINGS** -> **PER SYSTEM ADVANCED CONFIGURATION** -> [system affected by audio cutting out-> **AUDIO LATENCY**.+You can change your default audio buffer for libretro cores by navigating to **MAIN MENU** -> **GAMES SETTINGS** -> **PER SYSTEM ADVANCED CONFIGURATION** -> <system affected by audio cutting out-> **AUDIO LATENCY**.
  
-To change the setting for all Libretro cores, you can add ''global.retroarch.audio_buffer=128'' to your ''batocera.conf'' file, with your intended buffer in milliseconds. Try a higher number if it's still cutting out, it should gradually get better. If it isn't gradually getting better, refer to the [[#my_audio_is_consistently_cutting_out_irrelevant_of_what_my_system_is_doing|section below]].+To change the setting for all libretro cores, you can add ''global.audio_latency=128'' to your ''batocera.conf'' file, with your intended buffer in milliseconds. Try a higher number if it's still cutting out, it should gradually get better. If it isn't gradually getting better, refer to the [[#my_audio_is_consistently_cutting_out_irrelevant_of_what_my_system_is_doing|section below]].
  
 <WRAP center round info> <WRAP center round info>
-Note that this will only affect Libretro cores. If you have audio skipping on other emulators, you'll need to discover how to adjust the audio buffer settings for that emulator in particularusually can be found on its [[:systems|system page]].+Note that this mostly only affects libretro cores. If you have audio skipping on other emulators which this setting has no effect on, you'll need to discover how to adjust the audio buffer settings for that emulator in particular (usually can be found on its [[:systems|system page]]'s troubleshooting section).
 </WRAP> </WRAP>
  
-==== My audio is consistently cutting out, irrelevant of what my system is doing ====+===== My audio is randomly cutting out, and/or is distorted, on my RPi but only when using the headphone jack, and not the HDMI audio output ===== 
 + 
 +This is a very specific situation. The RPi seems like it overflows the audio buffer seemingly at random with the default audio drivers and latency. This can solved by either: 
 +  * Increasing the audio latency as above (some Pis can do this with just 96ms, others require significantly higher settings like 256ms which is obviously not desirable) 
 +  * Switching the audio driver to ''tinyalsa'' (this will end up breaking HDMI audio output) 
 + 
 +=== Via batocera.conf === 
 + 
 +Add ''global.retroarch.audio_driver=tinyalsa'' as a new line to your ''system/batocera.conf'' file. 
 + 
 +=== Via RetroArch's Quick Menu === 
 +To switch the default audio driver for Libretro cores: 
 +  - Run a game that uses a Libretro core. 
 +  - Press ''[HOTKEY]'' + {{:wiki:south.png?nolink&20|South button (B SNES)}} to open the RetroArch Quick Menu. 
 +  - Press {{:wiki:east.png?nolink&20|East button (A SNES)}} twice to exit to the main menu. 
 +  - Navigate to **Settings** -> **Audio** -> **Output** -> **Audio (Audio driver to use.)** and switch it to ''tinyalsa''
 +  - That's it. Simply changing this setting saves it. You can exit out of the emulator now. 
 + 
 +If the setting keeps going back to ''alsathreaded''/''alsa'': 
 +  * Use the ''batocera.conf'' method 
 +  * Disable any configuration overrides you might be using 
 +  * Disable any core overrides you might be using 
 +  * Disable any folder overrides you might be using 
 +  * Delete any overlays you might be using 
 + 
 +<WRAP center round info> 
 +This only works for Libretro cores, which is most of the systems that can be emulated on the Pi anyway. Other emulators either require advanced knowledge on changing their audio configuration, don't support the ''tinyalsa'' driver, aren't affected by audio cutting issues or would experience audio cutting issues anyway. 
 +</WRAP> 
 + 
 +===== My audio is consistently cutting out, irrelevant of what my system is doing =====
  
 This is more likely to be a hardware fault. Replug the cable, try a different cable, using a different interface (like 3.5mm analog audio instead of HDMI), etc. This is more likely to be a hardware fault. Replug the cable, try a different cable, using a different interface (like 3.5mm analog audio instead of HDMI), etc.
 +
 +===== How do I diagnose my audio cutting out? =====
 +
 +While running a game, SSH into Batocera and run ''%%pw-top%%''. One line will be for ''alsa_output'' (depending on the emulator) and another line will be for the emulator (in most cases, ''retroarch''). Look at the ''ERR'' column, if both are increasing this indicates an issue with underrun audio frames. This can be solved via increasing the audio latency, choosing a more optimized audio backend or reducing the overall CPU usage.
 +
 +===== My audio device is not appearing in the list of available audio outputs on Raspberry Pi =====
 +
 +Try using the fake kernel mode setting instead of the full one as a workaround.
 +
 +In ''/boot/config.txt'', comment out the ''dtoverlay=vc4-kms-v3d'' and uncomment the ''dtoverlay=vc4-fkms-v3d'' lines. It should look like this:
 +
 +<code>
 +# Enable DRM VC4 V3D driver on top of the dispmanx display stack
 +# Preferred 'Full' Kernel Mode Setting (KMS)
 +#dtoverlay=vc4-kms-v3d
 +
 +# Optional 'Fake' KMS for displays that won't work with 'Full' KMS
 +dtoverlay=vc4-fkms-v3d
 +</code>
 +
 +Using the fake kernel mode setting may introduce performance issues. It is preferable to instead figure out the root cause of the issue instead.
 +
 +===== I need to automate something involving my audio settings =====
 +
 +You can use [[:launch_a_script|Batocera's scripting capabilities]] to do so. [[:launch_a_script#batocera_scripts1|Scroll down to find an example related to audio settings.]]
  
  • audio_issues.txt
  • Last modified: 3 months ago
  • by maximumentropy