Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

Commit

Permalink
ps3: Add ps3av_audio_mute_analog()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Masakazu Mokuno authored and tiwai committed Oct 20, 2008
1 parent 219b22b commit 756ba83
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/ps3av.h
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
16 changes: 16 additions & 0 deletions drivers/ps3/ps3av.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 756ba83

Please sign in to comment.