Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+12 -9
+2
arch/powerpc/include/asm/ps3av.h
··· 678 678 u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE]; 679 679 }; 680 680 681 + /* channel status */ 682 + extern u8 ps3av_mode_cs_info[]; 681 683 682 684 /** command status **/ 683 685 #define PS3AV_STATUS_SUCCESS 0x0000 /* success */
+10 -9
drivers/ps3/ps3av_cmd.c
··· 660 660 } 661 661 662 662 /* default cs val */ 663 - static const u8 ps3av_mode_cs_info[] = { 663 + u8 ps3av_mode_cs_info[] = { 664 664 0x00, 0x09, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00 665 665 }; 666 + EXPORT_SYMBOL_GPL(ps3av_mode_cs_info); 666 667 667 668 #define CS_44 0x00 668 669 #define CS_48 0x02 ··· 678 677 u32 ch, u32 fs, u32 word_bits, u32 format, 679 678 u32 source) 680 679 { 681 - int spdif_through, spdif_bitstream; 680 + int spdif_through; 682 681 int i; 683 682 684 683 if (!(ch | fs | format | word_bits | source)) { ··· 688 687 format = PS3AV_CMD_AUDIO_FORMAT_PCM; 689 688 source = PS3AV_CMD_AUDIO_SOURCE_SERIAL; 690 689 } 691 - spdif_through = spdif_bitstream = 0; /* XXX not supported */ 692 690 693 691 /* audio mode */ 694 692 memset(audio, 0, sizeof(*audio)); ··· 777 777 break; 778 778 } 779 779 780 + /* non-audio bit */ 781 + spdif_through = audio->audio_cs_info[0] & 0x02; 782 + 780 783 /* pass through setting */ 781 784 if (spdif_through && 782 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 789 audio->audio_word_bits = PS3AV_CMD_AUDIO_WORD_BITS_16; 785 - audio->audio_source = PS3AV_CMD_AUDIO_SOURCE_SPDIF; 786 - if (spdif_bitstream) { 787 - audio->audio_format = PS3AV_CMD_AUDIO_FORMAT_BITSTREAM; 788 - audio->audio_cs_info[0] |= CS_BIT; 789 - } 790 + audio->audio_format = PS3AV_CMD_AUDIO_FORMAT_BITSTREAM; 790 791 } 791 792 } 792 793