Commit 756ba83e authored by Masakazu Mokuno's avatar Masakazu Mokuno Committed by Takashi Iwai

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: default avatarMasakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 219b22b2
......@@ -735,6 +735,7 @@ extern int ps3av_get_mode(void);
extern int ps3av_video_mode2res(u32, u32 *, u32 *);
extern int ps3av_video_mute(int);
extern int ps3av_audio_mute(int);
extern int ps3av_audio_mute_analog(int);
extern int ps3av_dev_open(void);
extern int ps3av_dev_close(void);
extern void ps3av_register_flip_ctl(void (*flip_ctl)(int on, void *data),
......
......@@ -915,6 +915,22 @@ int ps3av_video_mute(int mute)
EXPORT_SYMBOL_GPL(ps3av_video_mute);
/* mute analog output only */
int ps3av_audio_mute_analog(int mute)
{
int i, res;
for (i = 0; i < ps3av->av_hw_conf.num_of_avmulti; i++) {
res = ps3av_cmd_av_audio_mute(1,
&ps3av->av_port[i + ps3av->av_hw_conf.num_of_hdmi],
mute);
if (res < 0)
return -1;
}
return 0;
}
EXPORT_SYMBOL_GPL(ps3av_audio_mute_analog);
int ps3av_audio_mute(int mute)
{
return ps3av_set_audio_mute(mute ? PS3AV_CMD_MUTE_ON
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment