aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ps3
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-10-20 02:05:10 -0400
committerTakashi Iwai <tiwai@suse.de>2008-10-20 02:05:15 -0400
commit64931a4be03dbc49bd50d10d211592cf98b523bb (patch)
treec6c02601b5ccba9bafda665a9950713d8148e816 /drivers/ps3
parent756ba83ee370fbf62643777e7ba4a4f05932f6fb (diff)
ps3: Add passthru support for non-audio streams
Add support for the channel status bit setting so that non-PCM data stream can be sent (i.e. pass-through) via SPDIF/HDMI. Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/ps3')
-rw-r--r--drivers/ps3/ps3av_cmd.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ps3/ps3av_cmd.c b/drivers/ps3/ps3av_cmd.c
index 7f880c26122f..11eb50318fec 100644
--- a/drivers/ps3/ps3av_cmd.c
+++ b/drivers/ps3/ps3av_cmd.c
@@ -660,9 +660,10 @@ u32 ps3av_cmd_set_av_audio_param(void *p, u32 port,
660} 660}
661 661
662/* default cs val */ 662/* default cs val */
663static const u8 ps3av_mode_cs_info[] = { 663u8 ps3av_mode_cs_info[] = {
664 0x00, 0x09, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00 664 0x00, 0x09, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00
665}; 665};
666EXPORT_SYMBOL_GPL(ps3av_mode_cs_info);
666 667
667#define CS_44 0x00 668#define CS_44 0x00
668#define CS_48 0x02 669#define CS_48 0x02
@@ -677,7 +678,7 @@ void ps3av_cmd_set_audio_mode(struct ps3av_pkt_audio_mode *audio, u32 avport,
677 u32 ch, u32 fs, u32 word_bits, u32 format, 678 u32 ch, u32 fs, u32 word_bits, u32 format,
678 u32 source) 679 u32 source)
679{ 680{
680 int spdif_through, spdif_bitstream; 681 int spdif_through;
681 int i; 682 int i;
682 683
683 if (!(ch | fs | format | word_bits | source)) { 684 if (!(ch | fs | format | word_bits | source)) {
@@ -687,7 +688,6 @@ void ps3av_cmd_set_audio_mode(struct ps3av_pkt_audio_mode *audio, u32 avport,
687 format = PS3AV_CMD_AUDIO_FORMAT_PCM; 688 format = PS3AV_CMD_AUDIO_FORMAT_PCM;
688 source = PS3AV_CMD_AUDIO_SOURCE_SERIAL; 689 source = PS3AV_CMD_AUDIO_SOURCE_SERIAL;
689 } 690 }
690 spdif_through = spdif_bitstream = 0; /* XXX not supported */
691 691
692 /* audio mode */ 692 /* audio mode */
693 memset(audio, 0, sizeof(*audio)); 693 memset(audio, 0, sizeof(*audio));
@@ -777,16 +777,17 @@ void ps3av_cmd_set_audio_mode(struct ps3av_pkt_audio_mode *audio, u32 avport,
777 break; 777 break;
778 } 778 }
779 779
780 /* non-audio bit */
781 spdif_through = audio->audio_cs_info[0] & 0x02;
782
780 /* pass through setting */ 783 /* pass through setting */
781 if (spdif_through && 784 if (spdif_through &&
782 (avport == PS3AV_CMD_AVPORT_SPDIF_0 || 785 (avport == PS3AV_CMD_AVPORT_SPDIF_0 ||
783 avport == PS3AV_CMD_AVPORT_SPDIF_1)) { 786 avport == PS3AV_CMD_AVPORT_SPDIF_1 ||
787 avport == PS3AV_CMD_AVPORT_HDMI_0 ||
788 avport == PS3AV_CMD_AVPORT_HDMI_1)) {
784 audio->audio_word_bits = PS3AV_CMD_AUDIO_WORD_BITS_16; 789 audio->audio_word_bits = PS3AV_CMD_AUDIO_WORD_BITS_16;
785 audio->audio_source = PS3AV_CMD_AUDIO_SOURCE_SPDIF; 790 audio->audio_format = PS3AV_CMD_AUDIO_FORMAT_BITSTREAM;
786 if (spdif_bitstream) {
787 audio->audio_format = PS3AV_CMD_AUDIO_FORMAT_BITSTREAM;
788 audio->audio_cs_info[0] |= CS_BIT;
789 }
790 } 791 }
791} 792}
792 793