linux/drivers/ps3/ps3av_cmd.c
<<
"v3./op/spa14. /op/form4. /opa "v3./o href="../linux+v3.8.6/drivers/ps3/ps3av_cmd.c">"v3./opimg src="../.static/gfx/right.png" alt=">>">"vp/spa14."vpspa1 class="lxr_search">"v3."v3./opinput typ"v3./opinput typ"v3./opbutt> typSearch 4. /op/form4. p/spa14."vpspa1 class="lxr_prefs"4. /opa href="+prefs?return=drivers/ps3/ps3av_cmd.c""v3./o onclick="return ajax_prefs();">"v3./oPrefs. /op/a>"vp/spa14.3./o op/div4.3./o opform acv3.1="ajax+*" method="post" onsubmit="return false;">"vpinput typ"3./o op/form4."3./o opdiv class="headingbott>m">. pdiv idopfile_contents"4
o o1p/a>pspa1 class="comment">/*p/spa14.o o2p/a>pspa1 class="comment"> * Copyright (C) 2006 Sony Computer Entertainment Inc.p/spa14.o o3p/a>pspa1 class="comment"> * Copyright 2006, 2007 Sony Corporav3.1p/spa14.o o4p/a>pspa1 class="comment"> *p/spa14.o o5p/a>pspa1 class="comment"> * AV backend support for PS3p/spa14.o o6p/a>pspa1 class="comment"> *p/spa14.o o7p/a>pspa1 class="comment"> * This program is free software; you ca1 redistribute it and/or modify itp/spa14.o o8p/a>pspa1 class="comment"> * under the terms of the GNU General Public License as publishedp/spa14.o o9p/a>pspa1 class="comment"> * by the Free Software Foundav3.1; versn>
 2 of the License.p/spa14.o >
  a>pspa1 class="comment"> *p/spa14.o 11p/a>pspa1 class="comment"> * This program is distributed in the hope that it will be useful, butp/spa14.o 12p/a>pspa1 class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty ofp/spa14.o 13p/a>pspa1 class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUp/spa14.o 14p/a>pspa1 class="comment"> * General Public License for more details.p/spa14.o 15p/a>pspa1 class="comment"> *p/spa14.o 16p/a>pspa1 class="comment"> * You should have received a copy of the GNU General Public License alongp/spa14.o 17p/a>pspa1 class="comment"> * with this program; if not, write to the Free Software Foundav3.1, Inc.,p/spa14.o 18p/a>pspa1 class="comment"> * 51 Franklin Street, Fifth Floor, Bost.1, MA 02110-1301 USA.p/spa14.o 19p/a>pspa1 class="comment"> */p/spa14.o 2
  a>.o 21p/a>#include <linux/module.hp/a>>.o 22p/a>#include <linux/kernel.hp/a>>.o 23p/a>#include <linux/delay.hp/a>>.o 24  a>.o 25p/a>#include <asm/ps3av.hp/a>>.o 26p/a>#include <asm/ps3.hp/a>>.o 27p/a>#include <asm/ps3gpu.hp/a>>.o 28  a>.o 29p/a>#include "vuart.hp/a>".o 3
  a>.o 31p/a>static const structopa href="+code=video_fmt" class="sref">video_fmtp/a> {.o 32p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=format" class="sref">formatp/a>;.o 33p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=order" class="sref">orderp/a>;.o 34  a>} pa href="+code=ps3av_video_fmt_table" class="sref">ps3av_video_fmt_table  a>[] = {.o 35p/a>        { pa href="+code=PS3AV_CMD_VIDEO_FORMAT_ARGB_8BIT" class="sref">PS3AV_CMD_VIDEO_FORMAT_ARGB_8BITp/a>, pa href="+code=PS3AV_CMD_VIDEO_ORDER_RGB" class="sref">PS3AV_CMD_VIDEO_ORDER_RGBp/a> },.o 36p/a>        { pa href="+code=PS3AV_CMD_VIDEO_FORMAT_ARGB_8BIT" class="sref">PS3AV_CMD_VIDEO_FORMAT_ARGB_8BITp/a>, pa href="+code=PS3AV_CMD_VIDEO_ORDER_BGR" class="sref">PS3AV_CMD_VIDEO_ORDER_BGRp/a> },.o 37p/a>};.o 38  a>.o 39p/a>static const structo{.o 40p/a>        intopa href="+code=cs" class="sref">csp/a>;.o 41p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=av" class="sref">avp/a>;.o 42p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=bl" class="sref">blp/a>;.o 43  a>} pa href="+code=ps3av_cs_video2av_table" class="sref">ps3av_cs_video2av_table  a>[] = {.o 44p/a>        {.o 45p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_RGB_8" class="sref">PS3AV_CMD_VIDEO_CS_RGB_8p/a>,.o 46p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_RGB_8" class="sref">PS3AV_CMD_AV_CS_RGB_8p/a>,.o 47p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_8" class="sref">PS3AV_CMD_AV_CS_8  a>.o 48p/a>        }, {.o 49p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_RGB_10" class="sref">PS3AV_CMD_VIDEO_CS_RGB_>
  a>,.o 50p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_RGB_8" class="sref">PS3AV_CMD_AV_CS_RGB_8p/a>,.o 51p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_8" class="sref">PS3AV_CMD_AV_CS_8  a>.o 52p/a>        }, {.o 53p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_RGB_12" class="sref">PS3AV_CMD_VIDEO_CS_RGB_12p/a>,.o 54p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_RGB_8" class="sref">PS3AV_CMD_AV_CS_RGB_8p/a>,.o 55p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_8" class="sref">PS3AV_CMD_AV_CS_8  a>.o 56p/a>        }, {.o 57p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_YUV444_8" class="sref">PS3AV_CMD_VIDEO_CS_YUV444_8p/a>,.o 58p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_YUV444_8" class="sref">PS3AV_CMD_AV_CS_YUV444_8p/a>,.o 59p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_8" class="sref">PS3AV_CMD_AV_CS_8  a>.o 60p/a>        }, {.o 61p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_YUV444_10" class="sref">PS3AV_CMD_VIDEO_CS_YUV444_10p/a>,.o 62p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_YUV444_8" class="sref">PS3AV_CMD_AV_CS_YUV444_8p/a>,.o 63p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_10" class="sref">PS3AV_CMD_AV_CS_10  a>.o 64p/a>        }, {.o 65p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_YUV444_12" class="sref">PS3AV_CMD_VIDEO_CS_YUV444_12p/a>,.o 66p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_YUV444_8" class="sref">PS3AV_CMD_AV_CS_YUV444_8p/a>,.o 67p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_10" class="sref">PS3AV_CMD_AV_CS_10  a>.o 68p/a>        }, {.o 69p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_YUV422_8" class="sref">PS3AV_CMD_VIDEO_CS_YUV422_8p/a>,.o 70p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_YUV422_8" class="sref">PS3AV_CMD_AV_CS_YUV422_8p/a>,.o 71p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_10" class="sref">PS3AV_CMD_AV_CS_10  a>.o 72p/a>        }, {.o 73p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_YUV422_10" class="sref">PS3AV_CMD_VIDEO_CS_YUV422_10p/a>,.o 74p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_YUV422_8" class="sref">PS3AV_CMD_AV_CS_YUV422_8p/a>,.o 75p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_10" class="sref">PS3AV_CMD_AV_CS_10  a>.o 76p/a>        }, {.o 77p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_YUV422_12" class="sref">PS3AV_CMD_VIDEO_CS_YUV422_12p/a>,.o 78p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_YUV422_8" class="sref">PS3AV_CMD_AV_CS_YUV422_8p/a>,.o 79p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_12" class="sref">PS3AV_CMD_AV_CS_12  a>.o 80p/a>        }, {.o 81p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_XVYCC_8" class="sref">PS3AV_CMD_VIDEO_CS_XVYCC_8p/a>,.o 82p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_XVYCC_8" class="sref">PS3AV_CMD_AV_CS_XVYCC_8p/a>,.o 83p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_12" class="sref">PS3AV_CMD_AV_CS_12  a>.o 84p/a>        }, {.o 85p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_XVYCC_10" class="sref">PS3AV_CMD_VIDEO_CS_XVYCC_10p/a>,.o 86p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_XVYCC_8" class="sref">PS3AV_CMD_AV_CS_XVYCC_8p/a>,.o 87p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_12" class="sref">PS3AV_CMD_AV_CS_12  a>.o 88p/a>        }, {.o 89p/a>                .pa href="+code=cs" class="sref">csp/a> = pa href="+code=PS3AV_CMD_VIDEO_CS_XVYCC_12" class="sref">PS3AV_CMD_VIDEO_CS_XVYCC_12p/a>,.o 90p/a>                .pa href="+code=av" class="sref">avp/a> = pa href="+code=PS3AV_CMD_AV_CS_XVYCC_8" class="sref">PS3AV_CMD_AV_CS_XVYCC_8p/a>,.o 91p/a>                .pa href="+code=bl" class="sref">blp/a> = pa href="+code=PS3AV_CMD_AV_CS_12" class="sref">PS3AV_CMD_AV_CS_12  a>.o 92p/a>        }.o 93  a>};.o 94  a>.o 95p/a>static pa href="+code=u32" class="sref">u32p/a> pa href="+code=ps3av_cs_video2av" class="sref">ps3av_cs_video2avp/a>(intopa href="+code=cs" class="sref">csp/a>).o 96p/a>{.o 97p/a>        unsigned intopa href="+code=i" class="sref">ip/a>;.o 98  a>.o 99p/a>        for (pa href="+code=i" class="sref">ip/a> = 0;opa href="+code=i" class="sref">ip/a> <opa href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZEp/a>(pa href="+code=ps3av_cs_video2av_table" class="sref">ps3av_cs_video2av_table  a>);opa href="+code=i" class="sref">ip/a>++).o100p/a>                if (pa href="+code=ps3av_cs_video2av_table" class="sref">ps3av_cs_video2av_table  a>[pa href="+code=i" class="sref">ip/a>].pa href="+code=cs" class="sref">csp/a> == pa href="+code=cs" class="sref">csp/a>).o101p/a>                        return pa href="+code=ps3av_cs_video2av_table" class="sref">ps3av_cs_video2av_table  a>[pa href="+code=i" class="sref">ip/a>].pa href="+code=av" class="sref">avp/a>;.o102  a>.o103p/a>        return pa href="+code=PS3AV_CMD_AV_CS_RGB_8" class="sref">PS3AV_CMD_AV_CS_RGB_8p/a>;.o104  a>}.o105  a>.o106p/a>static pa href="+code=u32" class="sref">u32p/a> pa href="+code=ps3av_cs_video2av_bitlen" class="sref">ps3av_cs_video2av_bitlenp/a>(intopa href="+code=cs" class="sref">csp/a>).o107p/a>{.o108p/a>        unsigned intopa href="+code=i" class="sref">ip/a>;.o109  a>.o110p/a>        for (pa href="+code=i" class="sref">ip/a> = 0;opa href="+code=i" class="sref">ip/a> <opa href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZEp/a>(pa href="+code=ps3av_cs_video2av_table" class="sref">ps3av_cs_video2av_table  a>);opa href="+code=i" class="sref">ip/a>++).o111p/a>                if (pa href="+code=ps3av_cs_video2av_table" class="sref">ps3av_cs_video2av_table  a>[pa href="+code=i" class="sref">ip/a>].pa href="+code=cs" class="sref">csp/a> == pa href="+code=cs" class="sref">csp/a>).o112p/a>                        return pa href="+code=ps3av_cs_video2av_table" class="sref">ps3av_cs_video2av_table  a>[pa href="+code=i" class="sref">ip/a>].pa href="+code=bl" class="sref">blp/a>;.o113p/a>.o114p/a>        return pa href="+code=PS3AV_CMD_AV_CS_8" class="sref">PS3AV_CMD_AV_CS_8  a>;.o115p/a>}.o116p/a>.o117p/a>static const structo{.o118p/a>        intopa href="+code=vid" class="sref">vid  a>;.o119p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=av" class="sref">avp/a>;.o12
  a>} pa href="+code=ps3av_vid_video2av_table" class="sref">ps3av_vid_video2av_table  a>[] = {.o121p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_480I" class="sref">PS3AV_CMD_VIDEO_VID_480Ip/a>, pa href="+code=PS3AV_CMD_AV_VID_480I" class="sref">PS3AV_CMD_AV_VID_480Ip/a> },.o122p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_480P" class="sref">PS3AV_CMD_VIDEO_VID_480Pp/a>, pa href="+code=PS3AV_CMD_AV_VID_480P" class="sref">PS3AV_CMD_AV_VID_480Pp/a> },.o123p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_576I" class="sref">PS3AV_CMD_VIDEO_VID_576Ip/a>, pa href="+code=PS3AV_CMD_AV_VID_576I" class="sref">PS3AV_CMD_AV_VID_576Ip/a> },.o124p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_576P" class="sref">PS3AV_CMD_VIDEO_VID_576Pp/a>, pa href="+code=PS3AV_CMD_AV_VID_576P" class="sref">PS3AV_CMD_AV_VID_576Pp/a> },.o125p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_1080I_60HZ" class="sref">PS3AV_CMD_VIDEO_VID_1080I_60HZp/a>, pa href="+code=PS3AV_CMD_AV_VID_1080I_60HZ" class="sref">PS3AV_CMD_AV_VID_1080I_60HZp/a> },.o126p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_720P_60HZ" class="sref">PS3AV_CMD_VIDEO_VID_720P_60HZp/a>, pa href="+code=PS3AV_CMD_AV_VID_720P_60HZ" class="sref">PS3AV_CMD_AV_VID_720P_60HZp/a> },.o127p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_1080P_60HZ" class="sref">PS3AV_CMD_VIDEO_VID_1080P_60HZp/a>, pa href="+code=PS3AV_CMD_AV_VID_1080P_60HZ" class="sref">PS3AV_CMD_AV_VID_1080P_60HZp/a> },.o128p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_1080I_50HZ" class="sref">PS3AV_CMD_VIDEO_VID_1080I_50HZp/a>, pa href="+code=PS3AV_CMD_AV_VID_1080I_50HZ" class="sref">PS3AV_CMD_AV_VID_1080I_50HZp/a> },.o129p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_720P_50HZ" class="sref">PS3AV_CMD_VIDEO_VID_720P_50HZp/a>, pa href="+code=PS3AV_CMD_AV_VID_720P_50HZ" class="sref">PS3AV_CMD_AV_VID_720P_50HZp/a> },.o130p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_1080P_50HZ" class="sref">PS3AV_CMD_VIDEO_VID_1080P_50HZp/a>, pa href="+code=PS3AV_CMD_AV_VID_1080P_50HZ" class="sref">PS3AV_CMD_AV_VID_1080P_50HZp/a> },.o131p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_WXGA" class="sref">PS3AV_CMD_VIDEO_VID_WXGAp/a>, pa href="+code=PS3AV_CMD_AV_VID_WXGA" class="sref">PS3AV_CMD_AV_VID_WXGAp/a> },.o132p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_SXGA" class="sref">PS3AV_CMD_VIDEO_VID_SXGAp/a>, pa href="+code=PS3AV_CMD_AV_VID_SXGA" class="sref">PS3AV_CMD_AV_VID_SXGAp/a> },.o133p/a>        { pa href="+code=PS3AV_CMD_VIDEO_VID_WUXGA" class="sref">PS3AV_CMD_VIDEO_VID_WUXGAp/a>, pa href="+code=PS3AV_CMD_AV_VID_WUXGA" class="sref">PS3AV_CMD_AV_VID_WUXGAp/a> }.o134  a>};.o135  a>.o136p/a>static pa href="+code=u32" class="sref">u32p/a> pa href="+code=ps3av_vid_video2av" class="sref">ps3av_vid_video2avp/a>(intopa href="+code=vid" class="sref">vid  a>).o137p/a>{.o138p/a>        unsigned intopa href="+code=i" class="sref">ip/a>;.o139  a>.o140p/a>        for (pa href="+code=i" class="sref">ip/a> = 0;opa href="+code=i" class="sref">ip/a> <opa href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZEp/a>(pa href="+code=ps3av_vid_video2av_table" class="sref">ps3av_vid_video2av_table  a>);opa href="+code=i" class="sref">ip/a>++).o141p/a>                if (pa href="+code=ps3av_vid_video2av_table" class="sref">ps3av_vid_video2av_table  a>[pa href="+code=i" class="sref">ip/a>].pa href="+code=vid" class="sref">vid  a> == pa href="+code=vid" class="sref">vid  a>).o142p/a>                        return pa href="+code=ps3av_vid_video2av_table" class="sref">ps3av_vid_video2av_table  a>[pa href="+code=i" class="sref">ip/a>].pa href="+code=av" class="sref">avp/a>;.o143p/a>.o144p/a>        return pa href="+code=PS3AV_CMD_AV_a>, pa href="+code=PS3AV_CMD_AV_VID_480P" class=;.                .pa hre145">o145p/a>}.o146p/a>.o147p/a>static intopa href="+code=ps3av_hdmi_range" class="sref">ps3av_hdmi_rangep/a>(void).o148p/a>{.o149p/a>        if (pa href="+code=ps3_compare_firmware_version" class="sref">ps3_compare_firmware_versionp/a>(1, 8, 0) <o0).o150p/a>                return 0;.o151p/a>        else.o152p/a>                return 1;opspa1 class="comment">/* supported */p/spa14.o153p/a>}.o154  a>.o155p/a>intopa href="+code=ps3av_cmd_init" class="sref">ps3av_cmd_initp/a>(void).o156p/a>{.o157p/a>        intopa href="+code=res" class="sref">resass=;.o158p/a>        structopa href="+code=ps3av_pkt_av_init" class="sref">ps3av_pkt_av_initp/a> pa href="+code=av_init" class="sref">av_initp/a>;.o159p/a>        structopa href="+code=ps3av_pkt_video_init" class="sref">ps3av_pkt_video_initp/a> pa href="+code=video_init" class="sref">video_initp/a>;.o160p/a>        structopa href="+code=ps3av_pkt_audio_init" class="sref">ps3av_pkt_audio_initp/a> pa href="+code=audio_init" class="sref">audio_initp/a>;.o161p/a>.o162p/a>        pspa1 class="comment">/* video init */p/spa14.o163p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=video_init" class="sref">video_initp/a>, 0, sizeof(pa href="+code=video_init" class="sref">video_initp/a>));.o164  a>.o165p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_VIDEO_INIT" class="sref">PS3AV_CID_VIDEO_INITp/a>, sizeof(pa href="+code=video_init" class="sref">video_initp/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>),.o166p/a>                           sizeof(pa href="+code=video_init" class="sref">video_initp/a>), &pa href="+code=video_init" class="sref">video_initp/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o167p/a>        if (pa href="+code=res" class="sref">resass= <o0).o168p/a>                return pa href="+code=res" class="sref">resass=;.o169  a>.o170p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=video_init" class="sref">video_initp/a>);.o171p/a>        if (pa href="+code=res" class="sref">resass=) {.o172p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_VIDEO_INIT: failed %x\n"resass=);.o173p/a>                return pa href="+code=res" class="sref">resass=;.o174p/a>        }.o175  a>.o176p/a>        pspa1 class="comment">/* audio init */p/spa14.o177p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=audio_init" class="sref">audio_initp/a>, 0, sizeof(pa href="+code=audio_init" class="sref">audio_initp/a>));.o178  a>.o179p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AUDIO_INIT" class="sref">PS3AV_CID_AUDIO_INITp/a>, sizeof(pa href="+code=audio_init" class="sref">audio_initp/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>),.o180p/a>                           sizeof(pa href="+code=audio_init" class="sref">audio_initp/a>), &pa href="+code=audio_init" class="sref">audio_initp/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o181p/a>        if (pa href="+code=res" class="sref">resass= <o0).o182p/a>                return pa href="+code=res" class="sref">resass=;.o183p/a>.o184p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=audio_init" class="sref">audio_initp/a>);.o185p/a>        if (pa href="+code=res" class="sref">resass=) {.o186p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_AUDIO_INIT: failed %x\n"resass=);.o187p/a>                return pa href="+code=res" class="sref">resass=;.o188p/a>        }.o189  a>.o190p/a>        pspa1 class="comment">/* av init */p/spa14.o191p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=av_init" class="sref">av_initp/a>, 0, sizeof(pa href="+code=av_init" class="sref">av_initp/a>));.o192p/a>        pa href="+code=av_init" class="sref">av_initp/a>.pa href="+code=event_bit" class="sref">event_bitp/a> = 0;.o193p/a>.o194p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_INIT" class="sref">PS3AV_CID_AV_INITp/a>, sizeof(pa href="+code=av_init" class="sref">av_initp/a>), sizeof(pa href="+code=av_init" class="sref">av_initp/a>),.o195p/a>                           &pa href="+code=av_init" class="sref">av_initp/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o196p/a>        if (pa href="+code=res" class="sref">resass= <o0).o197p/a>                return pa href="+code=res" class="sref">resass=;.o198  a>.o199p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=av_init" class="sref">av_initp/a>);.o200p/a>        if (pa href="+code=res" class="sref">resass=).o201p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_AV_INIT: failed %x\n"resass=);.o202  a>.o203p/a>        return pa href="+code=res" class="sref">resass=;.o204  a>}.o205  a>.o206p/a>intopa href="+code=ps3av_cmd_fin" class="sref">ps3av_cmd_finp/a>(void).o207p/a>{.o208p/a>        intopa href="+code=res" class="sref">resass=;.o209p/a>        structopa href="+code=ps3av_pkt_av_fin" class="sref">ps3av_pkt_av_finp/a> pa href="+code=av_fin" class="sref">av_finp/a>;.o210  a>.o211p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=av_fin" class="sref">av_finp/a>, 0, sizeof(pa href="+code=av_fin" class="sref">av_finp/a>));.o212  a>.o213p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_FIN" class="sref">PS3AV_CID_AV_FINp/a>, sizeof(pa href="+code=av_fin" class="sref">av_finp/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>),.o214p/a>                           sizeof(pa href="+code=av_fin" class="sref">av_finp/a>), &pa href="+code=av_fin" class="sref">av_finp/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o215p/a>        if (pa href="+code=res" class="sref">resass= <o0).o216p/a>                return pa href="+code=res" class="sref">resass=;.o217p/a>.o218p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=av_fin" class="sref">av_finp/a>);.o219p/a>        if (pa href="+code=res" class="sref">resass=).o220p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_AV_FIN: failed %x\n"resass=);.o221p/a>.o222p/a>        return pa href="+code=res" class="sref">resass=;.o223p/a>}.o224  a>.o225p/a>intopa href="+code=ps3av_cmd_av_video_mute" class="sref">ps3av_cmd_av_video_mutep/a>(intopa href="+code=num_of_port" class="sref">num_of_portp/a>, pa href="+code=u32" class="sref">u32p/a> *pa href="+code=port" class="sref">portp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=mute" class="sref">mutep/a>).o226p/a>{.o227p/a>        intopa href="+code=i" class="sref">ip/a>, pa href="+code=send_len" class="sref">send_lenp/a>, pa href="+code=res" class="sref">resass=;.o228p/a>        structopa href="+code=ps3av_pkt_av_video_mute" class="sref">ps3av_pkt_av_video_mutep/a> pa href="+code=av_video_mute" class="sref">av_video_mutep/a>;.o229  a>.o230p/a>        if (pa href="+code=num_of_port" class="sref">num_of_portp/a> >opa href="+code=PS3AV_MUTE_PORT_MAX" class="sref">PS3AV_MUTE_PORT_MAXp/a>).o231p/a>                return -pa href="+code=EINVAL" class="sref">EINVALp/a>;.o232  a>.o233p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=av_video_mute" class="sref">av_video_mutep/a>, 0, sizeof(pa href="+code=av_video_mute" class="sref">av_video_mutep/a>));.o234p/a>        for (pa href="+code=i" class="sref">ip/a> = 0;opa href="+code=i" class="sref">ip/a> <opa href="+code=num_of_port" class="sref">num_of_portp/a>;opa href="+code=i" class="sref">ip/a>++) {.o235p/a>                pa href="+code=av_video_mute" class="sref">av_video_mutep/a>.pa href="+code=mute" class="sref">mutep/a>[pa href="+code=i" class="sref">ip/a>].pa href="+code=avport" class="sref">avportass= = pa href="+code=port" class="sref">portp/a>[pa href="+code=i" class="sref">ip/a>];.o236p/a>                pa href="+code=av_video_mute" class="sref">av_video_mutep/a>.pa href="+code=mute" class="sref">mutep/a>[pa href="+code=i" class="sref">ip/a>].pa href="+code=mute" class="sref">mutep/a> = pa href="+code=mute" class="sref">mutep/a>;.o237p/a>        }.o238  a>.o239p/a>        pa href="+code=send_len" class="sref">send_lenp/a> = sizeof(pa href="+code=av_video_mute" class="sref">av_video_mutep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>) +.o240p/a>            sizeof(structopa href="+code=ps3av_av_mute" class="sref">ps3av_av_mutep/a>) *opa href="+code=num_of_port" class="sref">num_of_portp/a>;.o241p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_VIDEO_MUTE" class="sref">PS3AV_CID_AV_VIDEO_MUTEp/a>, pa href="+code=send_len" class="sref">send_lenp/a>,.o242p/a>                           sizeof(pa href="+code=av_video_mute" class="sref">av_video_mutep/a>), &pa href="+code=av_video_mute" class="sref">av_video_mutep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o243p/a>        if (pa href="+code=res" class="sref">resass= <o0).o244p/a>                return pa href="+code=res" class="sref">resass=;.                .pa hre245">o245  a>.o246p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=av_video_mute" class="sref">av_video_mutep/a>);.o247p/a>        if (pa href="+code=res" class="sref">resass=).o248p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_AV_VIDEO_MUTE: failed %x\n"resass=);.o249  a>.o250p/a>        return pa href="+code=res" class="sref">resass=;.o251p/a>}.o252  a>.o253p/a>intopa href="+code=ps3av_cmd_av_video_disable_sig" class="sref">ps3av_cmd_av_video_disable_sigp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=port" class="sref">portp/a>).o254  a>{.o255p/a>        intopa href="+code=res" class="sref">resass=;.o256p/a>        structopa href="+code=ps3av_pkt_av_video_disable_sig" class="sref">ps3av_pkt_av_video_disable_sigp/a> pa href="+code=av_video_sig" class="sref">av_video_sigass=;.o257p/a>.o258p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=av_video_sig" class="sref">av_video_sigass=, 0, sizeof(pa href="+code=av_video_sig" class="sref">av_video_sigass=));.o259p/a>        pa href="+code=av_video_sig" class="sref">av_video_sigass=.pa href="+code=avport" class="sref">avportass= = pa href="+code=port" class="sref">portp/a>;.o260  a>.o261p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_VIDEO_DISABLE_SIG" class="sref">PS3AV_CID_AV_VIDEO_DISABLE_SIGp/a>,.o262p/a>                           sizeof(pa href="+code=av_video_sig" class="sref">av_video_sigass=), sizeof(pa href="+code=av_video_sig" class="sref">av_video_sigass=),.o263p/a>                           &pa href="+code=av_video_sig" class="sref">av_video_sigass=.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o264p/a>        if (pa href="+code=res" class="sref">resass= <o0).o265p/a>                return pa href="+code=res" class="sref">resass=;.o266p/a>.o267p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=av_video_sig" class="sref">av_video_sigass=);.o268p/a>        if (pa href="+code=res" class="sref">resass=).o269p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a>.o270p/a>                       pspa1 class="string">"PS3AV_CID_AV_VIDEO_DISABLE_SIG: failed %x port:%x\n"o271p/a>                       pa href="+code=res" class="sref">resass=, pa href="+code=port" class="sref">portp/a>);.o272  a>.o273p/a>        return pa href="+code=res" class="sref">resass=;.o274  a>}.o275  a>.o276p/a>intopa href="+code=ps3av_cmd_av_tv_mute" class="sref">ps3av_cmd_av_tv_mutep/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=avport" class="sref">avportass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=mute" class="sref">mutep/a>).o277p/a>{.o278p/a>        intopa href="+code=res" class="sref">resass=;.o279p/a>        structopa href="+code=ps3av_pkt_av_tv_mute" class="sref">ps3av_pkt_av_tv_mutep/a> pa href="+code=tv_mute" class="sref">tv_mutep/a>;.o280  a>.o281p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=tv_mute" class="sref">tv_mutep/a>, 0, sizeof(pa href="+code=tv_mute" class="sref">tv_mutep/a>));.o282p/a>        pa href="+code=tv_mute" class="sref">tv_mutep/a>.pa href="+code=avport" class="sref">avportass= = pa href="+code=avport" class="sref">avportass=;.o283p/a>        pa href="+code=tv_mute" class="sref">tv_mutep/a>.pa href="+code=mute" class="sref">mutep/a> = pa href="+code=mute" class="sref">mutep/a>;.o284  a>.o285p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_TV_MUTE" class="sref">PS3AV_CID_AV_TV_MUTEp/a>, sizeof(pa href="+code=tv_mute" class="sref">tv_mutep/a>),.o286p/a>                           sizeof(pa href="+code=tv_mute" class="sref">tv_mutep/a>), &pa href="+code=tv_mute" class="sref">tv_mutep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o287p/a>        if (pa href="+code=res" class="sref">resass= <o0).o288p/a>                return pa href="+code=res" class="sref">resass=;.o289  a>.o290p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=tv_mute" class="sref">tv_mutep/a>);.o291p/a>        if (pa href="+code=res" class="sref">resass=).o292p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_AV_TV_MUTE: failed %x port:%x\n"o293p/a>                       pa href="+code=res" class="sref">resass=, pa href="+code=avport" class="sref">avportass=);.o294  a>.o295p/a>        return pa href="+code=res" class="sref">resass=;.o296p/a>}.o297p/a>.o298  a>intopa href="+code=ps3av_cmd_enable_event" class="sref">ps3av_cmd_enable_eventp/a>(void).o299p/a>{.o300p/a>        intopa href="+code=res" class="sref">resass=;.o301p/a>        structopa href="+code=ps3av_pkt_av_event" class="sref">ps3av_pkt_av_eventp/a> pa href="+code=av_event" class="sref">av_eventp/a>;.o302  a>.o303p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=av_event" class="sref">av_eventp/a>, 0, sizeof(pa href="+code=av_event" class="sref">av_eventp/a>));.o304p/a>        pa href="+code=av_event" class="sref">av_eventp/a>.pa href="+code=event_bit" class="sref">event_bitp/a> = pa href="+code=V_CMD_AMD_EVENT_BIT_UNPLUGGED" class="sref">PS3AV_CMD_EVENT_BIT_UNPLUGGEDp/a> |.o305p/a>            pa href="+code=V_CMD_AMD_EVENT_BIT_PLUGGED" class="sref">PS3AV_CMD_EVENT_BIT_PLUGGEDp/a> | pa href="+code=V_CMD_AMD_EVENT_BIT_HDCP_DONE" class="sref">PS3AV_CMD_EVENT_BIT_HDCP_DONEp/a>;.o306p/a>.o307p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_ENABLE_EVENT" class="sref">PS3AV_CID_AV_ENABLE_EVENTp/a>, sizeof(pa href="+code=av_event" class="sref">av_eventp/a>),.o308p/a>                           sizeof(pa href="+code=av_event" class="sref">av_eventp/a>), &pa href="+code=av_event" class="sref">av_eventp/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o309p/a>        if (pa href="+code=res" class="sref">resass= <o0).o310p/a>                return pa href="+code=res" class="sref">resass=;.o311p/a>.o312p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=av_event" class="sref">av_eventp/a>);.o313p/a>        if (pa href="+code=res" class="sref">resass=).o314p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_AV_ENABLE_EVENT: failed %x\n"resass=);.o315  a>.o316p/a>        return pa href="+code=res" class="sref">resass=;.o317p/a>}.o318  a>.o319p/a>intopa href="+code=ps3av_cmd_av_hdmi_mode" class="sref">ps3av_cmd_av_hdmi_modep/a>(pa href="+code=u8" class="sref">u8p/a> pa href="+code=mode" class="sref">modep/a>).o320p/a>{.o321p/a>        intopa href="+code=res" class="sref">resass=;.o322p/a>        structopa href="+code=ps3av_pkt_av_hdmi_mode" class="sref">ps3av_pkt_av_hdmi_modep/a> pa href="+code=hdmi_mode" class="sref">hdmi_modep/a>;.o323p/a>.o324p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=hdmi_mode" class="sref">hdmi_modep/a>, 0, sizeof(pa href="+code=hdmi_mode" class="sref">hdmi_modep/a>));.o325p/a>        pa href="+code=hdmi_mode" class="sref">hdmi_modep/a>.pa href="+code=mode" class="sref">modep/a> = pa href="+code=mode" class="sref">modep/a>;.o326p/a>.o327p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_HDMI_MODE" class="sref">PS3AV_CID_AV_HDMI_MODEp/a>, sizeof(pa href="+code=hdmi_mode" class="sref">hdmi_modep/a>),.o328p/a>                           sizeof(pa href="+code=hdmi_mode" class="sref">hdmi_modep/a>), &pa href="+code=hdmi_mode" class="sref">hdmi_modep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o329p/a>        if (pa href="+code=res" class="sref">resass= <o0).o330p/a>                return pa href="+code=res" class="sref">resass=;.o331p/a>.o332p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=hdmi_mode" class="sref">hdmi_modep/a>);.o333p/a>        if (pa href="+code=res" class="sref">resass= && pa href="+code=res" class="sref">resass= != pa href="+code=V_CMD_STATUS_UNSUPPORTED_HDMI_MODE" class="sref">PS3AV_STATUS_UNSUPPORTED_HDMI_MODEp/a>).o334p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_AV_HDMI_MODE: failed %x\n"resass=);.o335  a>.o336p/a>        return pa href="+code=res" class="sref">resass=;.o337p/a>}.o338  a>.o339p/a>pa href="+code=u32" class="sref">u32p/a> pa href="+code=ps3av_cmd_set_av_video_cs" class="sref">ps3av_cmd_set_av_video_csp/a>(void *pa href="+code=p" class="sref">pass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=avport" class="sref">avportass=, intopa href="+code=video_vid" class="sref">video_vidass=, intopa href="+code=cs_out" class="sref">cs_outass=,.o340p/a>                              intopa href="+code=aspect" class="sref">aspectass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=id" class="sref">idass=).o341p/a>{.o342p/a>        structopa href="+code=ps3av_pkt_av_video_cs" class="sref">ps3av_pkt_av_video_csp/a> *pa href="+code=av_video_cs" class="sref">av_video_csp/a>;.o343p/a>.o344p/a>        pa href="+code=av_video_cs" class="sref">av_video_csp/a> = (structopa href="+code=ps3av_pkt_av_video_cs" class="sref">ps3av_pkt_av_video_csp/a> *)pa href="+code=p" class="sref">pass=;.                .pa hre345">o345p/a>        if (pa href="+code=video_vid" class="sref">video_vidass= == -1).o346p/a>                pa href="+code=video_vid" class="sref">video_vidass= = pa href="+code=V_CMD_AMD_VIDEO_VID_720P_60HZ" class="sref">PS3AV_CMD_VIDEO_VID_720P_60HZass=;.o347p/a>        if (pa href="+code=cs_out" class="sref">cs_outass= == -1).o348p/a>                pa href="+code=cs_out" class="sref">cs_outass= = pa href="+code=V_CMD_AMD_VIDEO_CS_YUV444_8" class="sref">V_CMD_AMD_VIDEO_CS_YUV444_8ass=;.o349p/a>        if (pa href="+code=aspect" class="sref">aspectass= == -1).o350p/a>                pa href="+code=aspect" class="sref">aspectass= = 0;.o351p/a>.o352p/a>        pa href="+code=memset" class="sref">memsetp/a>(pa href="+code=av_video_cs" class="sref">av_video_csp/a>, 0, sizeof(*pa href="+code=av_video_cs" class="sref">av_video_csp/a>));.o353p/a>        pa href="+code=ps3av_set_hdr" class="sref">ps3av_set_hdrp/a>(pa href="+code=V_CMD_AID_AV_VIDEO_CS" class="sref">PS3AV_CID_AV_VIDEO_CSp/a>, sizeof(*pa href="+code=av_video_cs" class="sref">av_video_csp/a>),.o354p/a>                      &pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o355p/a>        pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=avport" class="sref">avportass= = pa href="+code=avport" class="sref">avportass=;.o356p/a>        pspa1 class="comment">/* should be sam< as video_mode.resolution */p/spa14.o357p/a>        pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=av_vid" class="sref">av_vidass= = pa href="+code=ps3av_vid_video2av" class="sref">ps3av_vid_video2avp/a>(pa href="+code=video_vid" class="sref">video_vidass=);.o358p/a>        pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=av_cs_out" class="sref">av_cs_outass= = pa href="+code=ps3av_cs_video2av" class="sref">ps3av_cs_video2avp/a>(pa href="+code=cs_out" class="sref">cs_outass=);.o359p/a>        pspa1 class="comment">/* should be sam< as video_mode.video_cs_out */p/spa14.o360p/a>        pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=av_cs_in" class="sref">av_cs_inass= = pa href="+code=ps3av_cs_video2av" class="sref">ps3av_cs_video2avp/a>(pa href="+code=V_CMD_AMD_VIDEO_CS_RGB_8" class="sref">V_CMD_AMD_VIDEO_CS_RGB_8ass=);.o361p/a>        pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=bitlen_out" class="sref">bitlen_outass= = pa href="+code=ps3av_cs_video2av_bitlen" class="sref">ps3av_cs_video2av_bitlenp/a>(pa href="+code=cs_out" class="sref">cs_outass=);.o362p/a>        if ((pa href="+code=id" class="sref">idass= & pa href="+code=PS3AV_MODE_WHITE" class="sref">PS3AV_MODE_WHITEass=) && pa href="+code=ps3av_hdmi_range" class="sref">ps3av_hdmi_rangep/a>()).o363p/a>                pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=super_white" class="sref">super_whiteass= = pa href="+code=V_CMD_AMD_AV_SUPER_WHITE_ON" class="sref">PS3AV_CMD_AV_SUPER_WHITE_ONass=;.o364p/a>        else pspa1 class="comment">/* default off */p/spa14.o365p/a>                pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=super_white" class="sref">super_whiteass= = pa href="+code=V_CMD_AMD_AV_SUPER_WHITE_OFF" class="sref">PS3AV_CMD_AV_SUPER_WHITE_OFFass=;.o366p/a>        pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=aspect" class="sref">aspectass= = pa href="+code=aspect" class="sref">aspectass=;.o367p/a>        if (pa href="+code=id" class="sref">idass= & pa href="+code=PS3AV_MODE_DITHER" class="sref">PS3AV_MODE_DITHERass=) {.o368p/a>                pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=dither" class="sref">ditherass= = pa href="+code=V_CMD_AMD_AV_DITHER_ON" class="sref">PS3AV_CMD_AV_DITHER_ONp/a>.o369p/a>                    | pa href="+code=V_CMD_AMD_AV_DITHER_8BIT" class="sref">PS3AV_CMD_AV_DITHER_8BITass=;.o370p/a>        } else {.o371p/a>                pspa1 class="comment">/* default off */p/spa14.o372p/a>                pa href="+code=av_video_cs" class="sref">av_video_csp/a>->pa href="+code=dither" class="sref">ditherass= = pa href="+code=V_CMD_AMD_AV_DITHER_OFF" class="sref">PS3AV_CMD_AV_DITHER_OFFass=;.o373p/a>        }.o374  a>.o375p/a>        return sizeof(*pa href="+code=av_video_cs" class="sref">av_video_csp/a>);.o376p/a>}.o377p/a>.o378p/a>pa href="+code=u32" class="sref">u32p/a> pa href="+code=ps3av_cmd_set_video_mode" class="sref">ps3av_cmd_set_video_modep/a>(void *pa href="+code=p" class="sref">pass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=head" class="sref">headass=, intopa href="+code=video_vid" class="sref">video_vidass=, intopa href="+code=video_fmt" class="sref">video_fmtass=,.o379p/a>                             pa href="+code=u32" class="sref">u32p/a> pa href="+code=id" class="sref">idass=).o380p/a>{.o381p/a>        structopa href="+code=ps3av_pkt_video_mode" class="sref">ps3av_pkt_video_modep/a> *pa href="+code=video_mode" class="sref">video_modep/a>;.o382p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=x" class="sref">xass=, pa href="+code=y" class="sref">yp/a>;.o383p/a>.o384p/a>        pa href="+code=video_mode" class="sref">video_modep/a> = (structopa href="+code=ps3av_pkt_video_mode" class="sref">ps3av_pkt_video_modep/a> *)pa href="+code=p" class="sref">pass=;.o385p/a>        if (pa href="+code=video_vid" class="sref">video_vidass= == -1).o386p/a>                pa href="+code=video_vid" class="sref">video_vidass= = pa href="+code=V_CMD_AMD_VIDEO_VID_720P_60HZ" class="sref">PS3AV_CMD_VIDEO_VID_720P_60HZass=;.o387p/a>        if (pa href="+code=video_fmt" class="sref">video_fmtass= == -1).o388p/a>                pa href="+code=video_fmt" class="sref">video_fmtass= = pa href="+code=V_CMD_AMD_VIDEO_FMT_X8R8G8B8" class="sref">V_CMD_AMD_VIDEO_FMT_X8R8G8B8ass=;.o389  a>.o390p/a>        if (pa href="+code=ps3av_video_mode2res" class="sref">ps3av_video_mode2resp/a>(pa href="+code=id" class="sref">idass=, &pa href="+code=x" class="sref">xass=, &pa href="+code=y" class="sref">yp/a>)).o391p/a>                return 0;.o392  a>.o393p/a>        pspa1 class="comment">/* video mode */p/spa14.o394p/a>        pa href="+code=memset" class="sref">memsetp/a>(pa href="+code=video_mode" class="sref">video_modep/a>, 0, sizeof(*pa href="+code=video_mode" class="sref">video_modep/a>));.o395p/a>        pa href="+code=ps3av_set_hdr" class="sref">ps3av_set_hdrp/a>(pa href="+code=V_CMD_AID_VIDEO_MODE" class="sref">PS3AV_CID_VIDEO_MODEp/a>, sizeof(*pa href="+code=video_mode" class="sref">video_modep/a>),.o396p/a>                      &pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o397p/a>        pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_head" class="sref">video_headass= = pa href="+code=head" class="sref">headass=;.o398p/a>        if (pa href="+code=video_vid" class="sref">video_vidass= == pa href="+code=V_CMD_AMD_VIDEO_VID_480I" class="sref">PS3AV_CMD_VIDEO_VID_480I  a>.o399p/a>            && pa href="+code=head" class="sref">headass= == pa href="+code=V_CMD_AMD_VIDEO_HEAD_B" class="sref">PS3AV_CMD_VIDEO_HEAD_Bass=).o400p/a>                pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_vid" class="sref">video_vidass= = pa href="+code=V_CMD_AMD_VIDEO_VID_480I_A" class="sref">PS3AV_CMD_VIDEO_VID_480I_Aass=;.o401p/a>        else.o402p/a>                pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_vid" class="sref">video_vidass= = pa href="+code=video_vid" class="sref">video_vidass=;.o403p/a>        pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=width" class="sref">widthp/a> = (pa href="+code=u16" class="sref">u16p/a>) pa href="+code=x" class="sref">xass=;.o404p/a>        pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=height" class="sref">heightp/a> = (pa href="+code=u16" class="sref">u16p/a>) pa href="+code=y" class="sref">yp/a>;.o405p/a>        pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=pitch" class="sref">pitchass= = pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=width" class="sref">widthp/a> * 4;      pspa1 class="comment">/* line_length */p/spa14.o406p/a>        pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_out_format" class="sref">video_out_formatass= = pa href="+code=V_CMD_AMD_VIDEO_OUT_FORMAT_RGB_12BIT" class="sref">PS3AV_CMD_VIDEO_OUT_FORMAT_RGB_12BITp/a>;.o407p/a>        pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_format" class="sref">video_formatass= = pa href="+code=ps3av_video_fmt_table" class="sref">ps3av_video_fmt_tableass=[pa href="+code=video_fmt" class="sref">video_fmtass=].pa href="+code=format" class="sref">formatass=;.o408p/a>        if ((pa href="+code=id" class="sref">idass= & pa href="+code=PS3AV_MODE_COLOR" class="sref">PS3AV_MODE_COLORp/a>) && pa href="+code=ps3av_hdmi_range" class="sref">ps3av_hdmi_rangep/a>()).o409p/a>                pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_cl_cnv" class="sref">video_cl_cnvass= = pa href="+code=V_CMD_AMD_VIDEO_CL_CNV_DISABLE_LUT" class="sref">PS3AV_CMD_VIDEO_CL_CNV_DISABLE_LUTass=;.o410p/a>        else pspa1 class="comment">/* default enable */p/spa14.o411p/a>                pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_cl_cnv" class="sref">video_cl_cnvass= = pa href="+code=V_CMD_AMD_VIDEO_CL_CNV_ENABLE_LUT" class="sref">PS3AV_CMD_VIDEO_CL_CNV_ENABLE_LUTass=;.o412p/a>        pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_order" class="sref">video_orderass= = pa href="+code=ps3av_video_fmt_table" class="sref">ps3av_video_fmt_tableass=[pa href="+code=video_fmt" class="sref">video_fmtass=].pa href="+code=order" class="sref">orderass=;.o413p/a>.o414p/a>        pa href="+code=pr_debug" class="sref">pr_debugp/a>(pspa1 class="string">"%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n"o415p/a>                pa href="+code=__func__" class="sref">__func__ass=, pa href="+code=video_vid" class="sref">video_vidass=, pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=width" class="sref">widthp/a>, pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=height" class="sref">heightp/a>,.o416p/a>                pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=pitch" class="sref">pitchass=, pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_out_format" class="sref">video_out_formatass=,.o417p/a>                pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_format" class="sref">video_formatass=, pa href="+code=video_mode" class="sref">video_modep/a>->pa href="+code=video_order" class="sref">video_orderass=);.o418p/a>        return sizeof(*pa href="+code=video_mode" class="sref">video_modep/a>);.o419p/a>}.o420  a>.o421p/a>intopa href="+code=ps3av_cmd_video_format_black" class="sref">ps3av_cmd_video_format_blackp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=head" class="sref">headass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=video_fmt" class="sref">video_fmtass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=mute" class="sref">mutep/a>).o422p/a>{.o423p/a>        intopa href="+code=res" class="sref">resass=;.o424p/a>        structopa href="+code=ps3av_pkt_video_format" class="sref">ps3av_pkt_video_formatp/a> pa href="+code=video_format" class="sref">video_formatass=;.o425  a>.o426p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=video_format" class="sref">video_formatass=, 0, sizeof(pa href="+code=video_format" class="sref">video_formatass=));.o427p/a>        pa href="+code=video_format" class="sref">video_formatass=.pa href="+code=video_head" class="sref">video_headass= = pa href="+code=head" class="sref">headass=;.o428p/a>        if (pa href="+code=mute" class="sref">mutep/a> != pa href="+code=V_CMD_CMD_MUTE_OFF" class="sref">PS3AV_CMD_MUTE_OFFp/a>).o429p/a>                pa href="+code=video_format" class="sref">video_formatass=.pa href="+code=video_format" class="sref">video_formatass= = pa href="+code=V_CMD_AMD_VIDEO_FORMAT_BLACK" class="sref">PS3AV_CMD_VIDEO_FORMAT_BLACKass=;.o430p/a>        else.o431p/a>                pa href="+code=video_format" class="sref">video_formatass=.pa href="+code=video_format" class="sref">video_formatass= =.o432p/a>                    pa href="+code=ps3av_video_fmt_table" class="sref">ps3av_video_fmt_tableass=[pa href="+code=video_fmt" class="sref">video_fmtass=].pa href="+code=format" class="sref">formatass=;.o433p/a>        pa href="+code=video_format" class="sref">video_formatass=.pa href="+code=video_order" class="sref">video_orderass= = pa href="+code=ps3av_video_fmt_table" class="sref">ps3av_video_fmt_tableass=[pa href="+code=video_fmt" class="sref">video_fmtass=].pa href="+code=order" class="sref">orderass=;.o434  a>.o435p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_VIDEO_FORMAT" class="sref">PS3AV_CID_VIDEO_FORMATass=, sizeof(pa href="+code=video_format" class="sref">video_formatass=),.o436p/a>                           sizeof(pa href="+code=video_format" class="sref">video_formatass=), &pa href="+code=video_format" class="sref">video_formatass=.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o437p/a>        if (pa href="+code=res" class="sref">resass= <o0).o438p/a>                return pa href="+code=res" class="sref">resass=;.o439  a>.o440p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=video_format" class="sref">video_formatass=);.o441p/a>        if (pa href="+code=res" class="sref">resass=).o442p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_VIDEO_FORMAT: failed %x\n"resass=);.o443p/a>.o444p/a>        return pa href="+code=res" class="sref">resass=;.                .pa hre445">o445p/a>}.o446p/a>.o447p/a>.o448  a>intopa href="+code=ps3av_cmd_av_audio_mute" class="sref">ps3av_cmd_av_audio_mutep/a>(intopa href="+code=num_of_port" class="sref">num_of_portass=, pa href="+code=u32" class="sref">u32p/a> *pa href="+code=port" class="sref">portass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=mute" class="sref">mutep/a>).o449p/a>{.o450p/a>        intopa href="+code=i" class="sref">iass=, pa href="+code=res" class="sref">resass=;.o451p/a>        structopa href="+code=ps3av_pkt_av_audio_mute" class="sref">ps3av_pkt_av_audio_mutep/a> pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>;.o452  a>.o453p/a>        if (pa href="+code=num_of_port" class="sref">num_of_portass= > pa href="+code=PS3AV_MUTE_PORT_MAX" class="sref">PS3AV_MUTE_PORT_MAXp/a>).o454p/a>                return -pa href="+code=EINVAL" class="sref">EINVALp/a>;.o455  a>.o456p/a>        pspa1 class="comment">/* audio mute */p/spa14.o457p/a>        pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>, 0, sizeof(pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>));.o458p/a>        for (pa href="+code=i" class="sref">iass= = 0;opa href="+code=i" class="sref">iass= <opa href="+code=num_of_port" class="sref">num_of_portass=;opa href="+code=i" class="sref">iass=++) {.o459p/a>                pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>.pa href="+code=mute" class="sref">mutep/a>[pa href="+code=i" class="sref">iass=].pa href="+code=avport" class="sref">avportass= = pa href="+code=port" class="sref">portass=[pa href="+code=i" class="sref">iass=];.o460p/a>                pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>.pa href="+code=mute" class="sref">mutep/a>[pa href="+code=i" class="sref">iass=].pa href="+code=mute" class="sref">mutep/a> = pa href="+code=mute" class="sref">mutep/a>;.o461p/a>        }.o462  a>.o463p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_AUDIO_MUTE" class="sref">PS3AV_CID_AV_AUDIO_MUTEp/a>,.o464p/a>                           sizeof(pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>) +.o465p/a>                           sizeof(structopa href="+code=ps3av_av_mute" class="sref">ps3av_av_mutep/a>) *opa href="+code=num_of_port" class="sref">num_of_portass=,.o466p/a>                           sizeof(pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>), &pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o467p/a>        if (pa href="+code=res" class="sref">resass= <o0).o468p/a>                return pa href="+code=res" class="sref">resass=;.o469  a>.o470p/a>        pa href="+code=res" class="sref">resass= = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=av_audio_mute" class="sref">av_audio_mutep/a>);.o471p/a>        if (pa href="+code=res" class="sref">resass=).o472p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"PS3AV_CID_AV_AUDIO_MUTE: failed %x\n"resass=);.o473p/a>.o474p/a>        return pa href="+code=res" class="sref">resass=;.o475p/a>}.o476p/a>.o477p/a>static const structo{.o478p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=fs" class="sref">fsass=;.o479p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=mclk" class="sref">mclkass=;.o480p/a>}opa href="+code=ps3av_cnv_mclk_table" class="sref">ps3av_cnv_mclk_tablep/a>[] = {.o481p/a>        { pa href="+code=V_CMD_AMD_AUDIO_FS_44K" class="sref">PS3AV_CMD_AUDIO_FS_44Kass=, pa href="+code=PS3AV_CMD_AV_MCLK_512" class="sref">PS3AV_CMD_AV_MCLK_512p/a> },.o482p/a>        { pa href="+code=V_CMD_AMD_AUDIO_FS_48K" class="sref">PS3AV_CMD_AUDIO_FS_48Kass=, pa href="+code=PS3AV_CMD_AV_MCLK_512" class="sref">PS3AV_CMD_AV_MCLK_512p/a> },.o483p/a>        { pa href="+code=V_CMD_AMD_AUDIO_FS_88K" class="sref">PS3AV_CMD_AUDIO_FS_88Kass=, pa href="+code=PS3AV_CMD_AV_MCLK_256" class="sref">PS3AV_CMD_AV_MCLK_256p/a> },.o484p/a>        { pa href="+code=V_CMD_AMD_AUDIO_FS_96K" class="sref">PS3AV_CMD_AUDIO_FS_96Kass=, pa href="+code=PS3AV_CMD_AV_MCLK_256" class="sref">PS3AV_CMD_AV_MCLK_256p/a> },.o485p/a>        { pa href="+code=V_CMD_AMD_AUDIO_FS_176K" class="sref">PS3AV_CMD_AUDIO_FS_176Kass=, pa href="+code=PS3AV_CMD_AV_MCLK_128" class="sref">V_CMD_AMD_AV_MCLK_128p/a> },.o486p/a>        { pa href="+code=V_CMD_AMD_AUDIO_FS_192K" class="sref">PS3AV_CMD_AUDIO_FS_192Kass=, pa href="+code=PS3AV_CMD_AV_MCLK_128" class="sref">V_CMD_AMD_AV_MCLK_128p/a> }.o487p/a>};.o488  a>.o489  a>static pa href="+code=u8" class="sref">u8p/a> pa href="+code=ps3av_cnv_mclk" class="sref">ps3av_cnv_mclkp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=fs" class="sref">fsass=).o490p/a>{.o491p/a>        unsigned intopa href="+code=i" class="sref">iass=;.o492  a>.o493p/a>        for (pa href="+code=i" class="sref">iass= = 0;opa href="+code=i" class="sref">iass= <opa href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZEp/a>(pa href="+code=ps3av_cnv_mclk_table" class="sref">ps3av_cnv_mclk_tablep/a>);opa href="+code=i" class="sref">iass=++).o494p/a>                if (pa href="+code=ps3av_cnv_mclk_table" class="sref">ps3av_cnv_mclk_tablep/a>[pa href="+code=i" class="sref">iass=].pa href="+code=fs" class="sref">fsass= == pa href="+code=fs" class="sref">fsass=).o495p/a>                        return pa href="+code=ps3av_cnv_mclk_table" class="sref">ps3av_cnv_mclk_tablep/a>[pa href="+code=i" class="sref">iass=].pa href="+code=mclk" class="sref">mclkass=;.o496p/a>.o497p/a>        pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"%s failed, fs:%x\n"__func__ass=, pa href="+code=fs" class="sref">fsass=);.o498p/a>        return 0;.o499p/a>}.o500  a>.o501p/a>#define pa href="+code=BASE" class="sref">BASEp/a>    pa href="+code=V_CMD_AMD_AUDIO_FS_44K" class="sref">PS3AV_CMD_AUDIO_FS_44Kass=.o502  a>.o503p/a>static const pa href="+code=u32" class="sref">u32p/a> pa href="+code=ps3av_ns_table" class="sref">ps3av_ns_tablep/a>[][5] = {.o504p/a>                                        pspa1 class="comment">/*   D1,    D2,    D3,    D4,    D5 */p/spa14.o505p/a>        [pa href="+code=V_CMD_AMD_AUDIO_FS_44K" class="sref">PS3AV_CMD_AUDIO_FS_44Kass=-pa href="+code=BASE" class="sref">BASEp/a>] = {  6272,  6272, 17836, 17836,  8918 },.o506p/a>        [pa href="+code=V_CMD_AMD_AUDIO_FS_48K" class="sref">PS3AV_CMD_AUDIO_FS_48Kass=-pa href="+code=BASE" class="sref">BASEp/a>] = {  6144,  6144, 11648, 11648,  5824 },.o507p/a>        [pa href="+code=V_CMD_AMD_AUDIO_FS_88K" class="sref">PS3AV_CMD_AUDIO_FS_88Kass=-pa href="+code=BASE" class="sref">BASEp/a>] = { 12544, 12544, 35672, 35672, 17836 },.o508p/a>        [pa href="+code=V_CMD_AMD_AUDIO_FS_96K" class="sref">PS3AV_CMD_AUDIO_FS_96Kass=-pa href="+code=BASE" class="sref">BASEp/a>] = { 12288, 12288, 23296, 23296, 11648 },.o509p/a>        [pa href="+code=V_CMD_AMD_AUDIO_FS_176K" class="sref">PS3AV_CMD_AUDIO_FS_176Kass=-pa href="+code=BASE" class="sref">BASEp/a>] =        { 25088, 25088, 71344, 71344, 35672 },.o510p/a>        [pa href="+code=V_CMD_AMD_AUDIO_FS_192K" class="sref">PS3AV_CMD_AUDIO_FS_192Kass=-pa href="+code=BASE" class="sref">BASEp/a>] =        { 24576, 24576, 46592, 46592, 23296 }.o511p/a>};.o512p/a>.o513p/a>static void pa href="+code=ps3av_cnv_ns" class="sref">ps3av_cnv_nsp/a>(pa href="+code=u8" class="sref">u8p/a> *pa href="+code=ns" class="sref">nsp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=fs" class="sref">fsass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=video_vid" class="sref">video_vidass=).o514p/a>{.o515p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=av_vid" class="sref">av_vidass=, pa href="+code=ns_val" class="sref">ns_valass=;.o516p/a>        intopa href="+code=d" class="sref">dass=;.o517p/a>.o518p/a>        pa href="+code=d" class="sref">dass= = pa href="+code=ns_val" class="sref">ns_valass= = 0;.o519p/a>        pa href="+code=av_vid" class="sref">av_vidass= = pa href="+code=ps3av_vid_video2av" class="sref">ps3av_vid_video2avp/a>(pa href="+code=video_vid" class="sref">video_vidass=);.o520p/a>        switch (pa href="+code=av_vid" class="sref">av_vidass=) {.o521p/a>        case pa href="+code=V_CMD_AMD_AV_VID_480I" class="sref">PS3AV_CMD_AV_VID_480Ip/a>:.o522p/a>        case pa href="+code=V_CMD_AMD_AV_VID_576I" class="sref">PS3AV_CMD_AV_VID_576Ip/a>:.o523p/a>                pa href="+code=d" class="sref">dass= = 0;.o524p/a>                break;.o525p/a>        case pa href="+code=V_CMD_AMD_AV_VID_480P" class="sref">PS3AV_CMD_AV_VID_480Pp/a>:.o526p/a>        case pa href="+code=V_CMD_AMD_AV_VID_576P" class="sref">PS3AV_CMD_AV_VID_576Pp/a>:.o527p/a>                pa href="+code=d" class="sref">dass= = 1;.o528p/a>                break;.o529p/a>        case pa href="+code=V_CMD_AMD_AV_VID_1080I_60HZ" class="sref">PS3AV_CMD_AV_VID_1080I_60HZp/a>:.o530p/a>        case pa href="+code=V_CMD_AMD_AV_VID_1080I_50HZ" class="sref">PS3AV_CMD_AV_VID_1080I_50HZp/a>:.o531p/a>                pa href="+code=d" class="sref">dass= = 2;.o532p/a>                break;.o533p/a>        case pa href="+code=V_CMD_AMD_AV_VID_720P_60HZ" class="sref">PS3AV_CMD_AV_VID_720P_60HZp/a>:.o534p/a>        case pa href="+code=V_CMD_AMD_AV_VID_720P_50HZ" class="sref">PS3AV_CMD_AV_VID_720P_50HZp/a>:.o535p/a>                pa href="+code=d" class="sref">dass= = 3;.o536p/a>                break;.o537p/a>        case pa href="+code=V_CMD_AMD_AV_VID_1080P_60HZ" class="sref">PS3AV_CMD_AV_VID_1080P_60HZp/a>:.o538p/a>        case pa href="+code=V_CMD_AMD_AV_VID_1080P_50HZ" class="sref">PS3AV_CMD_AV_VID_1080P_50HZp/a>:.o539p/a>        case pa href="+code=V_CMD_AMD_AV_VID_WXGA" class="sref">PS3AV_CMD_AV_VID_WXGAp/a>:.o540p/a>        case pa href="+code=V_CMD_AMD_AV_VID_SXGA" class="sref">PS3AV_CMD_AV_VID_SXGAp/a>:.o541p/a>        case pa href="+code=V_CMD_AMD_AV_VID_WUXGA" class="sref">PS3AV_CMD_AV_VID_WUXGAp/a>:.o542p/a>                pa href="+code=d" class="sref">dass= = 4;.o543p/a>                break;.o544p/a>        default:.                .pa hre545">o545p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"%s failed, vid:%x\n"__func__ass=, pa href="+code=video_vid" class="sref">video_vidass=);.o546p/a>                break;.o547p/a>        }.o548  a>.o549p/a>        if (pa href="+code=fs" class="sref">fsass= <opa href="+code=V_CMD_AMD_AUDIO_FS_44K" class="sref">PS3AV_CMD_AUDIO_FS_44Kass= || pa href="+code=fs" class="sref">fsass= > pa href="+code=PS3AV_AMD_AUDIO_FS_192K" class="sref">PS3AV_CMD_AUDIO_FS_192Kass=).o550p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"%s failed, fs:%x\n"__func__ass=, pa href="+code=fs" class="sref">fsass=);.o551p/a>        else.o552p/a>                pa href="+code=ns_val" class="sref">ns_valass= = pa href="+code=ps3av_ns_table" class="sref">ps3av_ns_tablep/a>[pa href="+code=V_CMD_AMD_AUDIO_FS_44K" class="sref">PS3AV_CMD_AUDIO_FS_44Kass=-pa href="+code=BASE" class="sref">BASEp/a>][pa href="+code=d" class="sref">dass=];.o553p/a>.o554p/a>        *pa href="+code=ns" class="sref">nsp/a>++ = pa href="+code=ns_val" class="sref">ns_valass= & 0x000000FF;.o555p/a>        *pa href="+code=ns" class="sref">nsp/a>++ = (pa href="+code=ns_val" class="sref">ns_valass= & 0x0000FF00) >> 8;.o556p/a>        *pa href="+code=ns" class="sref">nsp/a> = (pa href="+code=ns_val" class="sref">ns_valass= & 0x00FF0000) >> 16;.o557p/a>}.o558  a>.o559p/a>#undef pa href="+code=BASE" class="sref">BASEp/a>.o560  a>.o561p/a>static pa href="+code=u8" class="sref">u8p/a> pa href="+code=ps3av_cnv_enable" class="sref">ps3av_cnv_enablep/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=source" class="sref">sourceass=, const pa href="+code=u8" class="sref">u8p/a> *pa href="+code=enable" class="sref">enablep/a>).o562p/a>{.o563p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=ret" class="sref">retass= = 0;.o564  a>.o565p/a>        if (pa href="+code=source" class="sref">sourceass= == pa href="+code=V_CMD_AMD_AUDIO_SOURCE_SPDIF" class="sref">PS3AV_CMD_AUDIO_SOURCE_SPDIFass=) {.o566p/a>                pa href="+code=ret" class="sref">retass= = 0x03;.o567p/a>        } else if (pa href="+code=source" class="sref">sourceass= == pa href="+code=V_CMD_AMD_AUDIO_SOURCE_SERIAL" class="sref">V_CMD_AMD_AUDIO_SOURCE_SERIALass=) {.o568p/a>                pa href="+code=ret" class="sref">retass= = ((pa href="+code=enable" class="sref">enablep/a>[0] <<o4) + (pa href="+code=enable" class="sref">enablep/a>[1] <<o5) + (pa href="+code=enable" class="sref">enablep/a>[2] <<o6) +.o569p/a>                       (pa href="+code=enable" class="sref">enablep/a>[3] <<o7)) | 0x01;.o570p/a>        } else.o571p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"%s failed, source:%x\n"__func__ass=, pa href="+code=source" class="sref">sourceass=);.o572p/a>        return pa href="+code=ret" class="sref">retass=;.o573p/a>}.o574  a>.o575p/a>static pa href="+code=u8" class="sref">u8p/a> pa href="+code=ps3av_cnv_fifomap" class="sref">ps3av_cnv_fifomapp/a>(const pa href="+code=u8" class="sref">u8p/a> *pa href="+code=map" class="sref">mapp/a>).o576p/a>{.o577p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=ret" class="sref">retass= = 0;.o578  a>.o579p/a>        pa href="+code=ret" class="sref">retass= = pa href="+code=map" class="sref">mapp/a>[0] + (pa href="+code=map" class="sref">mapp/a>[1] <<o2) + (pa href="+code=map" class="sref">mapp/a>[2] <<o4) + (pa href="+code=map" class="sref">mapp/a>[3] <<o6);.o580p/a>        return pa href="+code=ret" class="sref">retass=;.o581p/a>}.o582p/a>.o583p/a>static pa href="+code=u8" class="sref">u8p/a> pa href="+code=ps3av_cnv_inputlen" class="sref">ps3av_cnv_inputlenp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=word_bits" class="sref">word_bitsp/a>).o584p/a>{.o585p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=ret" class="sref">retass= = 0;.o586p/a>.o587p/a>        switch (pa href="+code=word_bits" class="sref">word_bitsp/a>) {.o588p/a>        case pa href="+code=V_CMD_AMD_AUDIO_WORD_BITS_16" class="sref">PS3AV_CMD_AUDIO_WORD_BITS_16p/a>:.o589p/a>                pa href="+code=ret" class="sref">retass= = pa href="+code=PS3AV_CMD_AV_INPUTLEN_16" class="sref">PS3AV_CMD_AV_INPUTLEN_16ass=;.o590p/a>                break;.o591p/a>        case pa href="+code=V_CMD_AMD_AUDIO_WORD_BITS_20" class="sref">PS3AV_CMD_AUDIO_WORD_BITS_20p/a>:.o592p/a>                pa href="+code=ret" class="sref">retass= = pa href="+code=PS3AV_CMD_AV_INPUTLEN_20" class="sref">PS3AV_CMD_AV_INPUTLEN_20ass=;.o593p/a>                break;.o594p/a>        case pa href="+code=V_CMD_AMD_AUDIO_WORD_BITS_24" class="sref">PS3AV_CMD_AUDIO_WORD_BITS_24p/a>:.o595p/a>                pa href="+code=ret" class="sref">retass= = pa href="+code=PS3AV_CMD_AV_INPUTLEN_24" class="sref">PS3AV_CMD_AV_INPUTLEN_24ass=;.o596p/a>                break;.o597p/a>        default:.o598p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"%s failed, word_bits:%x\n"__func__ass=,.o599p/a>                       pa href="+code=word_bits" class="sref">word_bitsp/a>);.o600p/a>                break;.o601p/a>        }.o602p/a>        return pa href="+code=ret" class="sref">retass=;.o603p/a>}.o604  a>.o605p/a>static pa href="+code=u8" class="sref">u8p/a> pa href="+code=ps3av_cnv_layout" class="sref">ps3av_cnv_layoutp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=num_of_ch" class="sref">num_of_chp/a>).o606p/a>{.o607p/a>        if (pa href="+code=num_of_ch" class="sref">num_of_chp/a> > pa href="+code=PS3AV_AMD_AUDIO_NUM_OF_CH_8" class="sref">V_CMD_AMD_AUDIO_NUM_OF_CH_8p/a>) {.o608p/a>                pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"%s failed, num_of_ch:%x\n"__func__ass=,.o609p/a>                       pa href="+code=num_of_ch" class="sref">num_of_chp/a>);.o610p/a>                return 0;.o611p/a>        }.o612p/a>.o613p/a>        return pa href="+code=num_of_ch" class="sref">num_of_chp/a> == pa href="+code=V_CMD_AMD_AUDIO_NUM_OF_CH_2" class="sref">PS3AV_CMD_AUDIO_NUM_OF_CH_2p/a> ? 0x0 : 0x1;.o614p/a>}.o615  a>.o616ass=static void pa href="+code=ps3av_cnv_info" class="sref">ps3av_cnv_infop/a>(structopa href="+code=ps3av_audio_info_fram<" class="sref">ps3av_audio_info_fram

*pa href="+code=info" class="sref">infop/a>,.o617p/a> const structopa href="+code=ps3av_pkt_audio_mode" class="sref">ps3av_pkt_audio_modep/a> *pa href="+code=mode" class="sref">modep/a>).o618p/a>{.o619p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=pb1" class="sref">pb1p/a>.pa href="+code=cc" class="sref">ccass= = pa href="+code=mode" class="sref">modep/a>->pa href="+code=audio_num_of_ch" class="sref">audio_num_of_chass= + 1; pspa1 class="comment">/* CH2:0x01 --- CH8:0x07 */p/spa14.o620p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=pb1" class="sref">pb1p/a>.pa href="+code=ct" class="sref">ctass= = 0;.o621p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=pb2" class="sref">pb2p/a>.pa href="+code=sf" class="sref">sfass= = 0;.o622p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=pb2" class="sref">pb2p/a>.pa href="+code=ss" class="sref">ssass= = 0;.o623p/a>.o624p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=pb3" class="sref">pb3ass= = 0; pspa1 class="comment">/* check mode->audio_format ?? */p/spa14.o625p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=pb4" class="sref">pb4ass= = pa href="+code=mode" class="sref">modep/a>->pa href="+code=audio_layout" class="sref">audio_layoutass=;.o626p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=pb5" class="sref">pb5p/a>.pa href="+code=dm" class="sref">dmass= = pa href="+code=mode" class="sref">modep/a>->pa href="+code=audio_downmix" class="sref">audio_downmixass=;.o627p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=pb5" class="sref">pb5p/a>.pa href="+code=lsv" class="sref">lsvass= = pa href="+code=mode" class="sref">modep/a>->pa href="+code=audio_downmix_level" class="sref">audio_downmix_levelass=;.o628p/a>}.o629 a>.o630p/a>static void pa href="+code=ps3av_cnv_chstat" class="sref">ps3av_cnv_chstatp/a>(pa href="+code=u8" class="sref">u8p/a> *pa href="+code=chstat" class="sref">chstatp/a>, const pa href="+code=u8" class="sref">u8p/a> *pa href="+code=cs_info" class="sref">cs_infop/a>).o631p/a>{.o632p/a> pa href="+code=memcpy" class="sref">memcpyp/a>(pa href="+code=chstat" class="sref">chstatp/a>, pa href="+code=cs_info" class="sref">cs_infop/a>, 5);.o633p/a>}.o634 a>.o635p/a>pa href="+code=u32" class="sref">u32p/a> pa href="+code=ps3av_cmd_set_av_audio_param" class="sref">ps3av_cmd_set_av_audio_paramp/a>(void *pa href="+code=p" class="sref">pp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=port" class="sref">portass=,.o636p/a> const structopa href="+code=ps3av_pkt_audio_mode" class="sref">ps3av_pkt_audio_modep/a> *pa href="+code=audio_mode" class="sref">audio_modep/a>,.o637p/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=video_vid" class="sref">video_vidass=).o638p/a>{.o639p/a> structopa href="+code=ps3av_pkt_av_audio_param" class="sref">ps3av_pkt_av_audio_paramp/a> *pa href="+code=param" class="sref">paramp/a>;.o640 a>.o641p/a> pa href="+code=param" class="sref">paramp/a> = (structopa href="+code=ps3av_pkt_av_audio_param" class="sref">ps3av_pkt_av_audio_paramp/a> *)pa href="+code=p" class="sref">pp/a>;.o642p/a>.o643p/a> pa href="+code=memset" class="sref">memsetp/a>(pa href="+code=param" class="sref">paramp/a>, 0, sizeof(*pa href="+code=param" class="sref">paramp/a>));.o644p/a> pa href="+code=ps3av_set_hdr" class="sref">ps3av_set_hdrp/a>(pa href="+code=PS3AV_CID_AV_AUDIO_PARAM" class="sref">PS3AV_CID_AV_AUDIO_PARAMp/a>, sizeof(*pa href="+code=param" class="sref">paramp/a>),. .pa hre645">o645p/a> &pa href="+code=param" class="sref">paramp/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o646p/a>.o647p/a> pa href="+code=param" class="sref">paramp/a>->pa href="+code=avport" class="sref">avportass= = pa href="+code=port" class="sref">portass=;.o648p/a> pa href="+code=param" class="sref">paramp/a>->pa href="+code=mclk" class="sref">mclkass= = pa href="+code=ps3av_cnv_mclk" class="sref">ps3av_cnv_mclkp/a>(pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=audio_fs" class="sref">audio_fsp/a>) | 0x80;.o649p/a> pa href="+code=ps3av_cnv_ns" class="sref">ps3av_cnv_nsp/a>(pa href="+code=param" class="sref">paramp/a>->pa href="+code=ns" class="sref">nsp/a>, pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=audio_fs" class="sref">audio_fsp/a>, pa href="+code=video_vid" class="sref">video_vidass=);.o650p/a> pa href="+code=param" class="sref">paramp/a>->pa href="+code=enable" class="sref">enablep/a> = pa href="+code=ps3av_cnv_enable" class="sref">ps3av_cnv_enablep/a>(pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=audio_source" class="sref">audio_sourcep/a>,.o651p/a> pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=audio_enable" class="sref">audio_enableass=);.o652p/a> pa href="+code=param" class="sref">paramp/a>->pa href="+code=swaplr" class="sref">swaplrass= = 0x09;.o653p/a> pa href="+code=param" class="sref">paramp/a>->pa href="+code=fifomap" class="sref">fifomapp/a> = pa href="+code=ps3av_cnv_fifomap" class="sref">ps3av_cnv_fifomapp/a>(pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=audio_map" class="sref">audio_mapass=);.o654p/a> pa href="+code=param" class="sref">paramp/a>->pa href="+code=inputctrl" class="sref">inputctrlass= = 0x49;.o655p/a> pa href="+code=param" class="sref">paramp/a>->pa href="+code=inputlen" class="sref">inputlenp/a> = pa href="+code=ps3av_cnv_inputlen" class="sref">ps3av_cnv_inputlenp/a>(pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=audio_word_bits" class="sref">audio_word_bitsass=);.o656p/a> pa href="+code=param" class="sref">paramp/a>->pa href="+code=layout" class="sref">layoutass= = pa href="+code=ps3av_cnv_layout" class="sref">ps3av_cnv_layoutp/a>(pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=audio_num_of_ch" class="sref">audio_num_of_chass=);.o657p/a> pa href="+code=ps3av_cnv_info" class="sref">ps3av_cnv_infop/a>(&pa href="+code=param" class="sref">paramp/a>->pa href="+code=info" class="sref">infop/a>, pa href="+code=audio_mode" class="sref">audio_modep/a>);.o658p/a> pa href="+code=ps3av_cnv_chstat" class="sref">ps3av_cnv_chstatp/a>(pa href="+code=param" class="sref">paramp/a>->pa href="+code=chstat" class="sref">chstatp/a>, pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>);.o659 a>.o660p/a> return sizeof(*pa href="+code=param" class="sref">paramp/a>);.o661p/a>}.o662p/a>.o663p/a>pspa1 class="comment">/* default cs val */p/spa14.o664 a>pa href="+code=u8" class="sref">u8p/a> pa href="+code=ps3av_mode_cs_info" class="sref">ps3av_mode_cs_infop/a>[] = {.o665p/a> 0x00, 0x09, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00.o666p/a>};.o667p/a>pa href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPLp/a>(pa href="+code=ps3av_mode_cs_info" class="sref">ps3av_mode_cs_infop/a>);.o668 a>.o669p/a>#define pa href="+code=CS_44" class="sref">CS_44p/a> 0x00.o670p/a>#define pa href="+code=CS_48" class="sref">CS_48p/a> 0x02.o671p/a>#define pa href="+code=CS_88" class="sref">CS_88p/a> 0x08.o672p/a>#define pa href="+code=CS_96" class="sref">CS_96p/a> 0x0a.o673p/a>#define pa href="+code=CS_176" class="sref">CS_176p/a> 0x0c.o674 a>#define pa href="+code=CS_192" class="sref">CS_192p/a> 0x0e.o675p/a>#define pa href="+code=CS_MASK" class="sref">CS_MASKp/a> 0x0f.o676p/a>#define pa href="+code=CS_BIT" class="sref">CS_BITp/a> 0x40.o677p/a>.o678 a>void pa href="+code=ps3av_cmd_set_audio_mode" class="sref">ps3av_cmd_set_audio_modep/a>(structopa href="+code=ps3av_pkt_audio_mode" class="sref">ps3av_pkt_audio_modep/a> *pa href="+code=audio" class="sref">audiop/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=avport" class="sref">avportass=,.o679p/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=ch" class="sref">chass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=fs" class="sref">fsass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=word_bits" class="sref">word_bitsp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=format" class="sref">formatass=,.o680p/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=source" class="sref">sourceass=).o681p/a>{.o682p/a> intopa href="+code=spdif_through" class="sref">spdif_throughass=;.o683p/a> intopa href="+code=i" class="sref">iass=;.o684 a>.o685p/a> if (!(pa href="+code=ch" class="sref">chass= | pa href="+code=fs" class="sref">fsass= | pa href="+code=format" class="sref">formatass= | pa href="+code=word_bits" class="sref">word_bitsp/a> | pa href="+code=source" class="sref">sourceass=)) {.o686p/a> pa href="+code=ch" class="sref">chass= = pa href="+code=V_CMD_AMD_AUDIO_NUM_OF_CH_2" class="sref">PS3AV_CMD_AUDIO_NUM_OF_CH_2p/a>;.o687p/a> pa href="+code=fs" class="sref">fsass= = pa href="+code=V_CMD_AMD_AUDIO_FS_48K" class="sref">PS3AV_CMD_AUDIO_FS_48Kp/a>;.o688p/a> pa href="+code=word_bits" class="sref">word_bitsp/a> = pa href="+code=V_CMD_AMD_AUDIO_WORD_BITS_16" class="sref">PS3AV_CMD_AUDIO_WORD_BITS_16p/a>;.o689p/a> pa href="+code=format" class="sref">formatass= = pa href="+code=V_CMD_AMD_AUDIO_FORMAT_PCM" class="sref">PS3AV_CMD_AUDIO_FORMAT_PCMp/a>;.o690p/a> pa href="+code=source" class="sref">sourceass= = pa href="+code=V_CMD_AMD_AUDIO_SOURCE_SERIAL" class="sref">V_CMD_AMD_AUDIO_SOURCE_SERIALass=;.o691p/a> }.o692p/a>.o693p/a> pspa1 class="comment">/* audio mode */p/spa14.o694p/a> pa href="+code=memset" class="sref">memsetp/a>(pa href="+code=audio" class="sref">audiop/a>, 0, sizeof(*pa href="+code=audio" class="sref">audiop/a>));.o695p/a> pa href="+code=ps3av_set_hdr" class="sref">ps3av_set_hdrp/a>(pa href="+code=PS3AV_CID_AUDIO_MODE" class="sref">V_CMD_AID_AUDIO_MODEp/a>, sizeof(*pa href="+code=audio" class="sref">audiop/a>), &pa href="+code=audio" class="sref">audiop/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o696p/a>.o697p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=avport" class="sref">avportass= = (pa href="+code=u8" class="sref">u8p/a>) pa href="+code=avport" class="sref">avportass=;.o698p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=mask" class="sref">maskass= = 0x0FFF; pspa1 class="comment">/* XXX set all */p/spa14.o699p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_num_of_ch" class="sref">audio_num_of_chass= = pa href="+code=ch" class="sref">chass=;.o700p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_fs" class="sref">audio_fsp/a> = pa href="+code=fs" class="sref">fsass=;.o701p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_word_bits" class="sref">audio_word_bitsass= = pa href="+code=word_bits" class="sref">word_bitsp/a>;.o702p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_format" class="sref">audio_formatp/a> = pa href="+code=format" class="sref">formatass=;.o703p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_source" class="sref">audio_sourcep/a> = pa href="+code=source" class="sref">sourceass=;.o704 a>.o705p/a> switch (pa href="+code=ch" class="sref">chass=) {.o706p/a> case pa href="+code=V_CMD_AMD_AUDIO_NUM_OF_CH_8" class="sref">V_CMD_AMD_AUDIO_NUM_OF_CH_8p/a>:.o707p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_enable" class="sref">audio_enableass=[3] = 1;.o708p/a> pspa1 class="comment">/* fall through */p/spa14.o709p/a> case pa href="+code=V_CMD_AMD_AUDIO_NUM_OF_CH_6" class="sref">PS3AV_CMD_AUDIO_NUM_OF_CH_6p/a>:.o710p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_enable" class="sref">audio_enableass=[2] = 1;.o711p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_enable" class="sref">audio_enableass=[1] = 1;.o712p/a> pspa1 class="comment">/* fall through */p/spa14.o713p/a> case pa href="+code=V_CMD_AMD_AUDIO_NUM_OF_CH_2" class="sref">PS3AV_CMD_AUDIO_NUM_OF_CH_2p/a>:.o714p/a> default:.o715p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_enable" class="sref">audio_enableass=[0] = 1;.o716p/a> }.o717p/a>.o718p/a> pspa1 class="comment">/* audio swap L/R */p/spa14.o719p/a> for (pa href="+code=i" class="sref">iass= = 0; pa href="+code=i" class="sref">iass= <o4; pa href="+code=i" class="sref">iass=++).o720p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_swap" class="sref">audio_swapp/a>[pa href="+code=i" class="sref">iass=] = pa href="+code=V_CMD_AMD_AUDIO_SWAP_0" class="sref">PS3AV_CMD_AUDIO_SWAP_0ass=; pspa1 class="comment">/* no swap */p/spa14.o721p/a>.o722p/a> pspa1 class="comment">/* audio serial input mapping */p/spa14.o723p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_map" class="sref">audio_mapass=[0] = pa href="+code=V_CMD_AMD_AUDIO_MAP_OUTPUT_0" class="sref">PS3AV_CMD_AUDIO_MAP_OUTPUT_0ass=;.o724p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_map" class="sref">audio_mapass=[1] = pa href="+code=V_CMD_AMD_AUDIO_MAP_OUTPUT_1" class="sref">V_CMD_AMD_AUDIO_MAP_OUTPUT_1ass=;.o725p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_map" class="sref">audio_mapass=[2] = pa href="+code=V_CMD_AMD_AUDIO_MAP_OUTPUT_2" class="sref">PS3AV_CMD_AUDIO_MAP_OUTPUT_2ass=;.o726p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_map" class="sref">audio_mapass=[3] = pa href="+code=V_CMD_AMD_AUDIO_MAP_OUTPUT_3" class="sref">V_CMD_AMD_AUDIO_MAP_OUTPUT_3ass=;.o727p/a>.o728p/a> pspa1 class="comment">/* audio speaker layout */p/spa14.o729p/a> if (pa href="+code=avport" class="sref">avportass= == pa href="+code=PS3AV_CMD_AVPORT_HDMI_0" class="sref">PS3AV_CMD_AVPORT_HDMI_0p/a> ||.o730p/a> pa href="+code=avport" class="sref">avportass= == pa href="+code=PS3AV_CMD_AVPORT_HDMI_1" class="sref">V_CMD_AMD_AVPORT_HDMI_1ass=) {.o731p/a> switch (pa href="+code=ch" class="sref">chass=) {.o732p/a> case pa href="+code=V_CMD_AMD_AUDIO_NUM_OF_CH_8" class="sref">V_CMD_AMD_AUDIO_NUM_OF_CH_8p/a>:.o733p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_layout" class="sref">audio_layoutass= = pa href="+code=V_CMD_AMD_AUDIO_LAYOUT_8CH" class="sref">V_CMD_AMD_AUDIO_LAYOUT_8CHass=;.o734p/a> break;.o735p/a> case pa href="+code=V_CMD_AMD_AUDIO_NUM_OF_CH_6" class="sref">PS3AV_CMD_AUDIO_NUM_OF_CH_6p/a>:.o736p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_layout" class="sref">audio_layoutass= = pa href="+code=V_CMD_AMD_AUDIO_LAYOUT_6CH" class="sref">V_CMD_AMD_AUDIO_LAYOUT_6CHass=;.o737p/a> break;.o738p/a> case pa href="+code=V_CMD_AMD_AUDIO_NUM_OF_CH_2" class="sref">PS3AV_CMD_AUDIO_NUM_OF_CH_2p/a>:.o739p/a> default:.o740p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_layout" class="sref">audio_layoutass= = pa href="+code=V_CMD_AMD_AUDIO_LAYOUT_2CH" class="sref">V_CMD_AMD_AUDIO_LAYOUT_2CHass=;.o741p/a> break;.o742p/a> }.o743p/a> } else {.o744p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_layout" class="sref">audio_layoutass= = pa href="+code=V_CMD_AMD_AUDIO_LAYOUT_2CH" class="sref">V_CMD_AMD_AUDIO_LAYOUT_2CHass=;. .pa hre745">o745p/a> }.o746p/a>.o747p/a> pspa1 class="comment">/* audio downmix permission */p/spa14.o748p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_downmix" class="sref">audio_downmixass= = pa href="+code=V_CMD_AMD_AUDIO_DOWNMIX_PERMITTED" class="sref">V_CMD_AMD_AUDIO_DOWNMIX_PERMITTEDass=;.o749p/a> pspa1 class="comment">/* audio downmix level shift (0:0dB to 15:15dB) */p/spa14.o750p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_downmix_level" class="sref">audio_downmix_levelass= = 0; pspa1 class="comment">/* 0dB */p/spa14.o751p/a>.o752p/a> pspa1 class="comment">/* set ch status */p/spa14.o753p/a> for (pa href="+code=i" class="sref">iass= = 0; pa href="+code=i" class="sref">iass= <o8; pa href="+code=i" class="sref">iass=++).o754p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[pa href="+code=i" class="sref">iass=] = pa href="+code=ps3av_mode_cs_info" class="sref">ps3av_mode_cs_infop/a>[pa href="+code=i" class="sref">iass=];.o755 a>.o756p/a> switch (pa href="+code=fs" class="sref">fsass=) {.o757p/a> case pa href="+code=V_CMD_AMD_AUDIO_FS_44K" class="sref">PS3AV_CMD_AUDIO_FS_44Kp/a>:.o758p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] &= ~pa href="+code=CS_MASK" class="sref">CS_MASKp/a>;.o759p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] |= pa href="+code=CS_44" class="sref">CS_44p/a>;.o760p/a> break;.o761p/a> case pa href="+code=V_CMD_AMD_AUDIO_FS_88K" class="sref">PS3AV_CMD_AUDIO_FS_88Kp/a>:.o762p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] &= ~pa href="+code=CS_MASK" class="sref">CS_MASKp/a>;.o763p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] |= pa href="+code=CS_88" class="sref">CS_88p/a>;.o764p/a> break;.o765p/a> case pa href="+code=V_CMD_AMD_AUDIO_FS_96K" class="sref">PS3AV_CMD_AUDIO_FS_96Kp/a>:.o766p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] &= ~pa href="+code=CS_MASK" class="sref">CS_MASKp/a>;.o767p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] |= pa href="+code=CS_96" class="sref">CS_96p/a>;.o768p/a> break;.o769p/a> case pa href="+code=V_CMD_AMD_AUDIO_FS_176K" class="sref">PS3AV_CMD_AUDIO_FS_176Kp/a>:.o770p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] &= ~pa href="+code=CS_MASK" class="sref">CS_MASKp/a>;.o771p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] |= pa href="+code=CS_176" class="sref">CS_176p/a>;.o772p/a> break;.o773p/a> case pa href="+code=V_CMD_AMD_AUDIO_FS_192K" class="sref">PS3AV_CMD_AUDIO_FS_192Kp/a>:.o774p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] &= ~pa href="+code=CS_MASK" class="sref">CS_MASKp/a>;.o775p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[3] |= pa href="+code=CS_192" class="sref">CS_192p/a>;.o776p/a> break;.o777p/a> default:.o778p/a> break;.o779p/a> }.o780 a>.o781p/a> pspa1 class="comment">/* non-audio bit */p/spa14.o782p/a> pa href="+code=spdif_through" class="sref">spdif_throughass= = pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_cs_info" class="sref">audio_cs_infop/a>[0] & 0x02;.o783p/a>.o784p/a> pspa1 class="comment">/* pass through setting */p/spa14.o785p/a> if (pa href="+code=spdif_through" class="sref">spdif_throughass= &&.o786p/a> (pa href="+code=avport" class="sref">avportass= == pa href="+code=PS3AV_CMD_AVPORT_SPDIF_0" class="sref">PS3AV_CMD_AVPORT_SPDIF_0ass= ||.o787p/a> pa href="+code=avport" class="sref">avportass= == pa href="+code=PS3AV_CMD_AVPORT_SPDIF_1" class="sref">V_CMD_AMD_AVPORT_SPDIF_1ass= ||.o788p/a> pa href="+code=avport" class="sref">avportass= == pa href="+code=PS3AV_CMD_AVPORT_HDMI_0" class="sref">PS3AV_CMD_AVPORT_HDMI_0p/a> ||.o789p/a> pa href="+code=avport" class="sref">avportass= == pa href="+code=PS3AV_CMD_AVPORT_HDMI_1" class="sref">V_CMD_AMD_AVPORT_HDMI_1ass=)) {.o790p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_word_bits" class="sref">audio_word_bitsass= = pa href="+code=V_CMD_AMD_AUDIO_WORD_BITS_16" class="sref">PS3AV_CMD_AUDIO_WORD_BITS_16p/a>;.o791p/a> pa href="+code=audio" class="sref">audiop/a>->pa href="+code=audio_format" class="sref">audio_formatp/a> = pa href="+code=PS3AV_CMD_AUDIO_FORMAT_BITSTREAM" class="sref">PS3AV_CMD_AUDIO_FORMAT_BITSTREAMp/a>;.o792p/a> }.o793p/a>}.o794 a>.o795p/a>intopa href="+code=ps3av_cmd_audio_mode" class="sref">ps3av_cmd_audio_modep/a>(structopa href="+code=ps3av_pkt_audio_mode" class="sref">ps3av_pkt_audio_modep/a> *pa href="+code=audio_mode" class="sref">audio_modep/a>).o796p/a>{.o797p/a> intopa href="+code=res" class="sref">resp/a>;.o798 a>.o799p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=PS3AV_CID_AUDIO_MODE" class="sref">V_CMD_AID_AUDIO_MODEp/a>, sizeof(*pa href="+code=audio_mode" class="sref">audio_modep/a>),.o800p/a> sizeof(*pa href="+code=audio_mode" class="sref">audio_modep/a>), &pa href="+code=audio_mode" class="sref">audio_modep/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o801p/a> if (pa href="+code=res" class="sref">resp/a> <o0).o802p/a> return pa href="+code=res" class="sref">resp/a>;.o803p/a>.o804p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=get_status" class="sref">get_statusp/a>(pa href="+code=audio_mode" class="sref">audio_modep/a>);.o805p/a> if (pa href="+code=res" class="sref">resp/a>).o806p/a> pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"V_CMD_AID_AUDIO_MODE: failed %x\n"p/spa14, pa href="+code=res" class="sref">resp/a>);.o807p/a>.o808p/a> return pa href="+code=res" class="sref">resp/a>;.o809p/a>}.o810 a>.o811p/a>intopa href="+code=ps3av_cmd_audio_mute" class="sref">ps3av_cmd_audio_mutep/a>(intopa href="+code=num_of_port" class="sref">num_of_portp/a>, pa href="+code=u32" class="sref">u32p/a> *pa href="+code=port" class="sref">portass=, pa href="+code=u32" class="sref">u32p/a> pa href="+code=mute" class="sref">mutep/a>).o812p/a>{.o813p/a> intopa href="+code=i" class="sref">iass=, pa href="+code=res" class="sref">resp/a>;.o814p/a> structopa href="+code=ps3av_pkt_audio_mute" class="sref">ps3av_pkt_audio_mutep/a> pa href="+code=audio_mute" class="sref">audio_mutep/a>;.o815 a>.o816p/a> if (pa href="+code=num_of_port" class="sref">num_of_portp/a> > pa href="+code=PS3AV_OPT_PORT_MAX" class="sref">V_CMD_OPT_PORT_MAXp/a>).o817p/a> return -pa href="+code=EINVAL" class="sref">EINVALp/a>;.o818 a>.o819p/a> pspa1 class="comment">/* audio mute */p/spa14.o820p/a> pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=audio_mute" class="sref">audio_mutep/a>, 0, sizeof(pa href="+code=audio_mute" class="sref">audio_mutep/a>));.o821p/a> for (pa href="+code=i" class="sref">iass= = 0; pa href="+code=i" class="sref">iass= <opa href="+code=num_of_port" class="sref">num_of_portp/a>; pa href="+code=i" class="sref">iass=++) {.o822p/a> pa href="+code=audio_mute" class="sref">audio_mutep/a>.pa href="+code=mute" class="sref">mutep/a>[pa href="+code=i" class="sref">iass=].pa href="+code=avport" class="sref">avportass= = pa href="+code=port" class="sref">portass=[pa href="+code=i" class="sref">iass=];.o823p/a> pa href="+code=audio_mute" class="sref">audio_mutep/a>.pa href="+code=mute" class="sref">mutep/a>[pa href="+code=i" class="sref">iass=].pa href="+code=mute" class="sref">mutep/a> = pa href="+code=mute" class="sref">mutep/a>;.o824p/a> }.o825 a>.o826p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=PS3AV_CID_AUDIO_MUTE" class="sref">V_CMD_AID_AUDIO_MUTEp/a>,.o827p/a> sizeof(pa href="+code=audio_mute" class="sref">audio_mutep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>) +.o828p/a> sizeof(structopa href="+code=ps3av_audio_mute" class="sref">ps3av_audio_mutep/a>) *opa href="+code=num_of_port" class="sref">num_of_portp/a>,.o829p/a> sizeof(pa href="+code=audio_mute" class="sref">audio_mutep/a>), &pa href="+code=audio_mute" class="sref">audio_mutep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o830p/a> if (pa href="+code=res" class="sref">resp/a> <o0).o831p/a> return pa href="+code=res" class="sref">resp/a>;.o832p/a>.o833p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=audio_mute" class="sref">audio_mutep/a>);.o834p/a> if (pa href="+code=res" class="sref">resp/a>).o835p/a> pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"V_CMD_AID_AUDIO_MUTE: failed %x\n"p/spa14, pa href="+code=res" class="sref">resp/a>);.o836p/a>.o837p/a> return pa href="+code=res" class="sref">resp/a>;.o838p/a>}.o839p/a>.o840p/a>intopa href="+code=ps3av_cmd_audio_active" class="sref">ps3av_cmd_audio_activep/a>(intopa href="+code=active" class="sref">activep/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=port" class="sref">portass=).o841p/a>{.o842p/a> intopa href="+code=res" class="sref">resp/a>;.o843p/a> structopa href="+code=ps3av_pkt_audio_active" class="sref">ps3av_pkt_audio_activep/a> pa href="+code=audio_active" class="sref">audio_activep/a>;.o844p/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=cid" class="sref">cidp/a>;. .pa hre845">o845 a>.o846p/a> pspa1 class="comment">/* audio active */p/spa14.o847p/a> pa href="+code=memset" class="sref">memsetp/a>(&pa href="+code=audio_active" class="sref">audio_activep/a>, 0, sizeof(pa href="+code=audio_active" class="sref">audio_activep/a>));.o848p/a> pa href="+code=audio_active" class="sref">audio_activep/a>.pa href="+code=audio_port" class="sref">audio_portass= = pa href="+code=port" class="sref">portass=;.o849p/a> pa href="+code=cid" class="sref">cidp/a> = pa href="+code=active" class="sref">activep/a> ? pa href="+code=PS3AV_CID_AUDIO_ACTIVE" class="sref">V_CMD_AID_AUDIO_ACTIVEp/a> : pa href="+code=PS3AV_CID_AUDIO_INACTIVE" class="sref">V_CMD_AID_AUDIO_INACTIVEass=;.o850 a>.o851p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=cid" class="sref">cidp/a>, sizeof(pa href="+code=audio_active" class="sref">audio_activep/a>), sizeof(pa href="+code=audio_active" class="sref">audio_activep/a>),.o852p/a> &pa href="+code=audio_active" class="sref">audio_activep/a>.pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o853p/a> if (pa href="+code=res" class="sref">resp/a> <o0).o854p/a> return pa href="+code=res" class="sref">resp/a>;.o855 a>.o856p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=get_status" class="sref">get_statusp/a>(&pa href="+code=audio_active" class="sref">audio_activep/a>);.o857p/a> if (pa href="+code=res" class="sref">resp/a>).o858p/a> pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"V_CMD_AID_AUDIO_ACTIVE:%x failed %x\n"p/spa14, pa href="+code=cid" class="sref">cidp/a>,.o859p/a> pa href="+code=res" class="sref">resp/a>);.o860 a>.o861p/a> return pa href="+code=res" class="sref">resp/a>;.o862p/a>}.o863p/a>.o864p/a>intopa href="+code=ps3av_cmd_avb_param" class="sref">ps3av_cmd_avb_paramp/a>(structopa href="+code=ps3av_pkt_avb_param" class="sref">ps3av_pkt_avb_paramp/a> *pa href="+code=avb" class="sref">avbp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=send_len" class="sref">send_lenp/a>).o865p/a>{.o866p/a> intopa href="+code=res" class="sref">resp/a>;.o867p/a>.o868p/a> pa href="+code=mutex_lock" class="sref">mutex_lockp/a>(&pa href="+code=ps3_gpu_mutex" class="sref">ps3_gpu_mutexp/a>);.o869p/a>.o870p/a> pspa1 class="comment">/* avb packet */p/spa14.o871p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AVB_PARAM" class="sref">PS3AV_CID_AVB_PARAMp/a>, pa href="+code=send_len" class="sref">send_lenp/a>, sizeof(*pa href="+code=avb" class="sref">avbp/a>),.o872p/a> &pa href="+code=avb" class="sref">avbp/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o873p/a> if (pa href="+code=res" class="sref">resp/a> <o0).o874p/a> goto pa href="+code=out" class="sref">outass=;.o875 a>.o876p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=get_status" class="sref">get_statusp/a>(pa href="+code=avb" class="sref">avbp/a>);.o877p/a> if (pa href="+code=res" class="sref">resp/a>).o878p/a> pa href="+code=pr_debug" class="sref">pr_debugp/a>(pspa1 class="string">"%s: PS3AV_CID_AVB_PARAM: failed %x\n"p/spa14, pa href="+code=__func__" class="sref">__func__p/a>,.o879p/a> pa href="+code=res" class="sref">resp/a>);.o880 a>.o881p/a> pa href="+code=out" class="sref">outass=:.o882p/a> pa href="+code=mutex_unlock" class="sref">mutex_unlockp/a>(&pa href="+code=ps3_gpu_mutex" class="sref">ps3_gpu_mutexp/a>);.o883p/a> return pa href="+code=res" class="sref">resp/a>;.o884p/a>}.o885 a>.o886p/a>intopa href="+code=ps3av_cmd_av_get_hw_conf" class="sref">ps3av_cmd_av_get_hw_confp/a>(structopa href="+code=ps3av_pkt_av_get_hw_conf" class="sref">ps3av_pkt_av_get_hw_confp/a> *pa href="+code=hw_conf" class="sref">hw_confp/a>).o887p/a>{.o888p/a> intopa href="+code=res" class="sref">resp/a>;.o889p/a>.o890p/a> pa href="+code=memset" class="sref">memsetp/a>(pa href="+code=hw_conf" class="sref">hw_confp/a>, 0, sizeof(*pa href="+code=hw_conf" class="sref">hw_confp/a>));.o891p/a>.o892p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_GET_HW_CONF" class="sref">PS3AV_CID_AV_GET_HW_CONFp/a>, sizeof(pa href="+code=hw_conf" class="sref">hw_confp/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>),.o893p/a> sizeof(*pa href="+code=hw_conf" class="sref">hw_confp/a>), &pa href="+code=hw_conf" class="sref">hw_confp/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o894p/a> if (pa href="+code=res" class="sref">resp/a> <o0).o895p/a> return pa href="+code=res" class="sref">resp/a>;.o896p/a>.o897p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=get_status" class="sref">get_statusp/a>(pa href="+code=hw_conf" class="sref">hw_confp/a>);.o898p/a> if (pa href="+code=res" class="sref">resp/a>).o899p/a> pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"V_CMD_AID_AV_GET_HW_CONF: failed %x\n"p/spa14, pa href="+code=res" class="sref">resp/a>);.o900 a>.o901p/a> return pa href="+code=res" class="sref">resp/a>;.o902p/a>}.o903p/a>.o904p/a>intopa href="+code=ps3av_cmd_video_get_monitor_info" class="sref">ps3av_cmd_video_get_monitor_infop/a>(structopa href="+code=ps3av_pkt_av_get_monitor_info" class="sref">ps3av_pkt_av_get_monitor_infop/a> *pa href="+code=info" class="sref">infop/a>,.o905p/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=avport" class="sref">avportass=).o906p/a>{.o907p/a> intopa href="+code=res" class="sref">resp/a>;.o908 a>.o909p/a> pa href="+code=memset" class="sref">memsetp/a>(pa href="+code=info" class="sref">infop/a>, 0, sizeof(*pa href="+code=info" class="sref">infop/a>));.o910p/a> pa href="+code=info" class="sref">infop/a>->pa href="+code=avport" class="sref">avportass= = pa href="+code=avport" class="sref">avportass=;.o911p/a>.o912p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=ps3av_do_pkt" class="sref">ps3av_do_pktp/a>(pa href="+code=V_CMD_AID_AV_GET_MONITOR_INFO" class="sref">PS3AV_CID_AV_GET_MONITOR_INFOp/a>,.o913p/a> sizeof(pa href="+code=info" class="sref">infop/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>) + sizeof(pa href="+code=info" class="sref">infop/a>->pa href="+code=avport" class="sref">avportass=) +.o914p/a> sizeof(pa href="+code=info" class="sref">infop/a>->pa href="+code=reserved" class="sref">reservedp/a>),.o915p/a> sizeof(*pa href="+code=info" class="sref">infop/a>), &pa href="+code=info" class="sref">infop/a>->pa href="+code=send_hdr" class="sref">send_hdrp/a>);.o916p/a> if (pa href="+code=res" class="sref">resp/a> <o0).o917p/a> return pa href="+code=res" class="sref">resp/a>;.o918 a>.o919p/a> pa href="+code=res" class="sref">resp/a> = pa href="+code=get_status" class="sref">get_statusp/a>(pa href="+code=info" class="sref">infop/a>);.o920p/a> if (pa href="+code=res" class="sref">resp/a>).o921p/a> pa href="+code=printk" class="sref">printkp/a>(pa href="+code=KERN_ERR" class="sref">KERN_ERRp/a> pspa1 class="string">"V_CMD_AID_AV_GET_MONITOR_INFO: failed %x\n"p/spa14,.o922p/a> pa href="+code=res" class="sref">resp/a>);.o923p/a>.o924p/a> return pa href="+code=res" class="sref">resp/a>;.o925 a>}.o926p/a>.o927p/a>#define pa href="+code=PS3AV_AV_LAYOUT_0" class="sref">PS3AV_AV_LAYOUT_0p/a> (pa href="+code=V_CMD_AMD_AV_LAYOUT_32" class="sref">V_CMD_AMD_AV_LAYOUT_32p/a> \.o928p/a> | pa href="+code=PS3AV_CMD_AV_LAYOUT_44" class="sref">PS3AV_CMD_AV_LAYOUT_44p/a> \.o929p/a> | pa href="+code=PS3AV_CMD_AV_LAYOUT_48" class="sref">PS3AV_CMD_AV_LAYOUT_48p/a>).o930 a>.o931p/a>#define pa href="+code=PS3AV_AV_LAYOUT_1" class="sref">V_CMD_AV_LAYOUT_1p/a> (pa href="+code=V_CMD_AV_LAYOUT_0" class="sref">PS3AV_AV_LAYOUT_0p/a> \.o932p/a> | pa href="+code=PS3AV_CMD_AV_LAYOUT_88" class="sref">PS3AV_CMD_AV_LAYOUT_88p/a> \.o933p/a> | pa href="+code=PS3AV_CMD_AV_LAYOUT_96" class="sref">PS3AV_CMD_AV_LAYOUT_96p/a> \.o934p/a> | pa href="+code=PS3AV_CMD_AV_LAYOUT_176" class="sref">PS3AV_CMD_AV_LAYOUT_176p/a> \.o935p/a> | pa href="+code=PS3AV_CMD_AV_LAYOUT_192" class="sref">PS3AV_CMD_AV_LAYOUT_192p/a>).o936p/a>.o937p/a>

lxr.linux.no kindly hosted by pa href="http://www.redpill-linpro.no">Redpill Linpro ASp/a>, provider of Linux consulting and operations services since 1995.