Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/kernel/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ libpspkernelinclude_HEADERS = \
pspsysclib.h \
pspimpose_driver.h \
pspinit.h \
pspamctrl.h \
pspaudiorouting.h
pspamctrl.h

lib_LIBRARIES = libpspkernel.a

Expand Down
9 changes: 8 additions & 1 deletion src/user/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 $@
Expand Down Expand Up @@ -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 $@
26 changes: 24 additions & 2 deletions src/kernel/pspaudiorouting.h → src/user/pspaudiorouting.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#ifndef __PSPAUDIOROUTING_H__
#define __PSPAUDIOROUTING_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/**
* Set routing mode.
*
Expand All @@ -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__ */

19 changes: 19 additions & 0 deletions src/user/sceAudioRouting.S
Original file line number Diff line number Diff line change
@@ -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