libretro / Lakka-LibreELEC

Lakka is a lightweight Linux distribution that transforms a small computer into a full blown game console.
https://www.lakka.tv
1.7k stars 288 forks source link

Fix no audio on GPICase/Pi02GPi when upgrade from v4.3 #1942

Closed ShigeakiAsai closed 3 months ago

ShigeakiAsai commented 3 months ago

Fix no audio on GPICase/Pi02GPi when upgrade from v4.3

This PR is related to #1904. When 1st time boot after upgrading, it changes 'audio_device' setting in retroarch.cfg via one time service.

Background

When it upgrades v5.0 from v4.3, GPICase/Pi02GPi still keep audio_device = ALSA by /storage/.config/retroarch/retroarch.cfg. It needs to change audio_device setting in /storage/.config/retroarch/retroarch.cfg when upgrading.


modified : 1 files , added : 3 file

  1. packages/lakka/package.mk When device is GPICase or Pi02GPi, it adds 'gpicase_change_audio_device' package.

  2. packages/lakka/lakka_tools/gpicase_change_audio_device/package.mk It installs following service and related python script. And, enable service.

  3. packages/lakka/lakka_tools/gpicase_change_audio_device/system.d/gpicase-change-audio_device.service It is unit file for this service. - This service starts before retroarch-autostart.service - This service type is 'oneshot' - This service is not Restart - This service is not Remain After Exit

  4. packages/lakka/lakka_tools/gpicase_change_audio_device/scripts/gpicase-change-audio_device.py It is main script for this service. - If it includes 'audio_device = "default:CARD=ALSA"' in /storage/.config/retroarch/retroarch.cfg, replace to 'audio_device = "default:CARD=Headphones"' - It mask this service


Confirmation


My English is so wrong. Please let me know if you have question. Thanks. ASAI, Shigeaki

ShigeakiAsai commented 3 months ago

I confirmed that GPICase/Pi02GPi audio working when it upgrades from v4.3.


Thanks ASAI, Shigeaki