diff options
author | Masakazu Mokuno <mokuno@sm.sony.co.jp> | 2008-10-20 02:03:33 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-20 02:04:59 -0400 |
commit | 756ba83ee370fbf62643777e7ba4a4f05932f6fb (patch) | |
tree | 7f1ee5dbf5558129ded18182d9d5d1060becc530 | |
parent | 219b22b24546dbd512419766eb46f6b729a5453a (diff) |
ps3: Add ps3av_audio_mute_analog()
Add support for muting the analog output so that it does not
play noises while non-PCM data is played.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | arch/powerpc/include/asm/ps3av.h | 1 | ||||
-rw-r--r-- | drivers/ps3/ps3av.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ps3av.h b/arch/powerpc/include/asm/ps3av.h index fda98715cd35..d30bde2b11ef 100644 --- a/arch/powerpc/include/asm/ps3av.h +++ b/arch/powerpc/include/asm/ps3av.h | |||
@@ -735,6 +735,7 @@ extern int ps3av_get_mode(void); | |||
735 | extern int ps3av_video_mode2res(u32, u32 *, u32 *); | 735 | extern int ps3av_video_mode2res(u32, u32 *, u32 *); |
736 | extern int ps3av_video_mute(int); | 736 | extern int ps3av_video_mute(int); |
737 | extern int ps3av_audio_mute(int); | 737 | extern int ps3av_audio_mute(int); |
738 | extern int ps3av_audio_mute_analog(int); | ||
738 | extern int ps3av_dev_open(void); | 739 | extern int ps3av_dev_open(void); |
739 | extern int ps3av_dev_close(void); | 740 | extern int ps3av_dev_close(void); |
740 | extern void ps3av_register_flip_ctl(void (*flip_ctl)(int on, void *data), | 741 | extern void ps3av_register_flip_ctl(void (*flip_ctl)(int on, void *data), |
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index 6f2f90ebb020..06848b254d57 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c | |||
@@ -915,6 +915,22 @@ int ps3av_video_mute(int mute) | |||
915 | 915 | ||
916 | EXPORT_SYMBOL_GPL(ps3av_video_mute); | 916 | EXPORT_SYMBOL_GPL(ps3av_video_mute); |
917 | 917 | ||
918 | /* mute analog output only */ | ||
919 | int ps3av_audio_mute_analog(int mute) | ||
920 | { | ||
921 | int i, res; | ||
922 | |||
923 | for (i = 0; i < ps3av->av_hw_conf.num_of_avmulti; i++) { | ||
924 | res = ps3av_cmd_av_audio_mute(1, | ||
925 | &ps3av->av_port[i + ps3av->av_hw_conf.num_of_hdmi], | ||
926 | mute); | ||
927 | if (res < 0) | ||
928 | return -1; | ||
929 | } | ||
930 | return 0; | ||
931 | } | ||
932 | EXPORT_SYMBOL_GPL(ps3av_audio_mute_analog); | ||
933 | |||
918 | int ps3av_audio_mute(int mute) | 934 | int ps3av_audio_mute(int mute) |
919 | { | 935 | { |
920 | return ps3av_set_audio_mute(mute ? PS3AV_CMD_MUTE_ON | 936 | return ps3av_set_audio_mute(mute ? PS3AV_CMD_MUTE_ON |