diff --git a/src/kernel/Makefile.am b/src/kernel/Makefile.am index 774a66b1eb..d2b8f76720 100644 --- a/src/kernel/Makefile.am +++ b/src/kernel/Makefile.am @@ -73,8 +73,7 @@ libpspkernelinclude_HEADERS = \ pspsysclib.h \ pspimpose_driver.h \ pspinit.h \ - pspamctrl.h \ - pspaudiorouting.h + pspamctrl.h lib_LIBRARIES = libpspkernel.a diff --git a/src/user/Makefile.am b/src/user/Makefile.am index bac5f39516..3d6b07bd98 100644 --- a/src/user/Makefile.am +++ b/src/user/Makefile.am @@ -32,8 +32,11 @@ LOADEXEC_OBJS = LoadExecForUser_0000.o LoadExecForUser_0001.o LoadExecForUser_00 IMPOSE_OBJS = sceImpose_0000.o sceImpose_0001.o sceImpose_0002.o sceImpose_0003.o sceImpose_0004.o sceImpose_0005.o sceImpose_0006.o sceImpose_0007.o sceImpose_0008.o sceImpose_0009.o sceImpose_0010.o sceImpose_0011.o sceImpose_0012.o sceImpose_0013.o sceImpose_0014.o sceImpose_0015.o +AUDIOROUTING_OBJS = sceAudioRouting_0000.o sceAudioRouting_0001.o sceAudioRouting_0002.o sceAudioRouting_0003.o + libpspuserincludedir = @PSPSDK_INCLUDEDIR@ libpspuserinclude_HEADERS = \ + pspaudiorouting.h \ pspiofilemgr.h \ pspiofilemgr_devctl.h \ pspiofilemgr_dirent.h \ @@ -81,7 +84,8 @@ $(THREADMAN_OBJS) \ $(UTILS_OBJS) \ $(INTERRUPT_OBJS) \ $(LOADEXEC_OBJS) \ -$(IMPOSE_OBJS) +$(IMPOSE_OBJS) \ +$(AUDIOROUTING_OBJS) $(IO_OBJS): IoFileMgrForUser.S $(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@ @@ -115,3 +119,6 @@ $(LOADEXEC_OBJS): LoadExecForUser.S $(IMPOSE_OBJS): sceImpose.S $(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@ + +$(AUDIOROUTING_OBJS): sceAudioRouting.S + $(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@ diff --git a/src/kernel/pspaudiorouting.h b/src/user/pspaudiorouting.h similarity index 56% rename from src/kernel/pspaudiorouting.h rename to src/user/pspaudiorouting.h index 16891bc426..2297e6e644 100644 --- a/src/kernel/pspaudiorouting.h +++ b/src/user/pspaudiorouting.h @@ -11,6 +11,10 @@ #ifndef __PSPAUDIOROUTING_H__ #define __PSPAUDIOROUTING_H__ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** * Set routing mode. * @@ -25,7 +29,25 @@ int sceAudioRoutingSetMode( int mode ); * * @return the current routing mode. */ -int sceAudioRoutingGetMode(); +int sceAudioRoutingGetMode(void); + +/** Get the current routing volume mode. + * + * @return The current routing volume mode. + */ +int sceAudioRoutingGetVolumeMode(void); + +/** Set the routing volume mode. + * + * @param vol_mode The routing volume to set (`0` or `1`). + * + * @return `0` on success, `< 0` on error. + */ +int sceAudioRoutingSetVolumeMode(int vol_mode); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ -#endif +#endif /* __PSPAUDIOROUTING_H__ */ diff --git a/src/user/sceAudioRouting.S b/src/user/sceAudioRouting.S new file mode 100644 index 0000000000..d218b2177e --- /dev/null +++ b/src/user/sceAudioRouting.S @@ -0,0 +1,19 @@ + .set noreorder + +#include "pspimport.s" + +#ifdef F_sceAudioRouting_0000 + IMPORT_START "sceAudioRouting",0x40010000 +#endif +#ifdef F_sceAudioRouting_0001 + IMPORT_FUNC "sceAudioRouting",0x28235C56,sceAudioRoutingGetVolumeMode +#endif +#ifdef F_sceAudioRouting_0002 + IMPORT_FUNC "sceAudioRouting",0x36FD8AA9,sceAudioRoutingSetMode +#endif +#ifdef F_sceAudioRouting_0003 + IMPORT_FUNC "sceAudioRouting",0x39240E7D,sceAudioRoutingGetMode +#endif +#ifdef F_sceAudioRouting_0004 + IMPORT_FUNC "sceAudioRouting",0xBB548475,sceAudioRoutingSetVolumeMode +#endif