surfansf28: Major improvements:

* Add a crude keymap
 * Use native "hardware mute" for audiohw_mute()
 * Properly handle touchscreen inputs
 * Can now play back music, with some warts..

Broken:

 * rotary wheel still doesn't work
 * audio garbled/distorted a bit
 * no volume control

Change-Id: I040217035a7bf3983b0e269fca3408eedd972cd0
This commit is contained in:
Solomon Peachy 2025-05-04 21:50:30 -04:00
parent 3a0d490713
commit 95f970076e
6 changed files with 239 additions and 15 deletions

View file

@ -84,23 +84,12 @@ static int muted = -1;
void audiohw_mute(int mute)
{
logf("mute %d", mute);
if (!hw_init || muted == mute)
if (hw_init < 0 || muted == mute)
return;
muted = mute;
if(mute)
{
long int ps0 = 0;
alsa_controls_set_ints("Output Port Switch", 1, &ps0);
}
else
{
last_ps = 0;
surfans_get_outputs();
}
alsa_controls_set_bool("Hardware Mute", !!mute);
}
int surfans_get_outputs(void){
@ -144,7 +133,8 @@ void audiohw_preinit(void)
alsa_controls_init("default");
hw_init = 1;
audiohw_mute(false); /* No need */
audiohw_mute(false); /* No need ? */
alsa_controls_set_bool("isDSD", 0);
}
void audiohw_postinit(void)