mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-06 22:04:10 +08:00
修复耳机无法外放的bug
This commit is contained in:
parent
a30575b935
commit
9fa049e281
@ -762,11 +762,12 @@ bool CODEC_getRawAdcData(CdcAdcData *data)
|
|||||||
void CODEC_soundSwitchOutput(void)
|
void CODEC_soundSwitchOutput(void)
|
||||||
{
|
{
|
||||||
static u8 headset = 0;
|
static u8 headset = 0;
|
||||||
u8 state = readReg(CDC_REG_100_44) & 3u;
|
u8 state = readReg(CDC_REG_100_44) & 1u;
|
||||||
if( state != headset )
|
if( state != headset )
|
||||||
{
|
{
|
||||||
headset = state;
|
headset = state;
|
||||||
if( headset ) maskReg( CDC_REG_HEADSET_SEL, HEADSET_SEL_HP, 0xff);
|
// see: forceAudioOutput@Luma3DS/sysmodules/rosalina/source/shell.c
|
||||||
else maskReg( CDC_REG_HEADSET_SEL, HEADSET_SEL_SP, 0xff);
|
if( headset ) maskReg( CDC_REG_HEADSET_SEL, 0x30, 0xff);
|
||||||
|
else maskReg( CDC_REG_HEADSET_SEL, 0x20, 0xff);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user