Lines Matching refs:ps3av
31 static struct ps3av { struct
50 } *ps3av; argument
158 dev_dbg(&ps3av->dev->core, in ps3av_parse_event_packet()
214 if (!ps3av) in ps3av_send_cmd_pkt()
218 res = ps3av_vuart_write(ps3av->dev, send_buf, write_len); in ps3av_send_cmd_pkt()
220 dev_dbg(&ps3av->dev->core, in ps3av_send_cmd_pkt()
230 res = ps3av_vuart_read(ps3av->dev, recv_buf, PS3AV_HDR_SIZE, in ps3av_send_cmd_pkt()
233 dev_dbg(&ps3av->dev->core, in ps3av_send_cmd_pkt()
240 res = ps3av_vuart_read(ps3av->dev, &recv_buf->cid, in ps3av_send_cmd_pkt()
243 dev_dbg(&ps3av->dev->core, in ps3av_send_cmd_pkt()
254 dev_dbg(&ps3av->dev->core, "%s: reply err (result=%x)\n", in ps3av_send_cmd_pkt()
269 dev_dbg(&ps3av->dev->core, "reply_packet invalid version:%x\n", in ps3av_process_reply_packet()
293 BUG_ON(!ps3av); in ps3av_do_pkt()
295 mutex_lock(&ps3av->mutex); in ps3av_do_pkt()
307 res = ps3av_send_cmd_pkt(buf, &ps3av->recv_buf.reply_hdr, send_len, in ps3av_do_pkt()
317 res = ps3av_process_reply_packet(buf, &ps3av->recv_buf.reply_hdr, in ps3av_do_pkt()
325 mutex_unlock(&ps3av->mutex); in ps3av_do_pkt()
329 mutex_unlock(&ps3av->mutex); in ps3av_do_pkt()
338 num_of_av_port = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_av_video_mute()
339 ps3av->av_hw_conf.num_of_avmulti; in ps3av_set_av_video_mute()
342 res = ps3av_cmd_av_video_mute(1, &ps3av->av_port[i], mute); in ps3av_set_av_video_mute()
354 num_of_hdmi_port = ps3av->av_hw_conf.num_of_hdmi; in ps3av_set_video_disable_sig()
355 num_of_av_port = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_video_disable_sig()
356 ps3av->av_hw_conf.num_of_avmulti; in ps3av_set_video_disable_sig()
360 res = ps3av_cmd_av_tv_mute(ps3av->av_port[i], in ps3av_set_video_disable_sig()
369 res = ps3av_cmd_av_video_disable_sig(ps3av->av_port[i]); in ps3av_set_video_disable_sig()
373 res = ps3av_cmd_av_tv_mute(ps3av->av_port[i], in ps3av_set_video_disable_sig()
388 num_of_av_port = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_audio_mute()
389 ps3av->av_hw_conf.num_of_avmulti; in ps3av_set_audio_mute()
390 num_of_opt_port = ps3av->av_hw_conf.num_of_spdif; in ps3av_set_audio_mute()
393 res = ps3av_cmd_av_audio_mute(1, &ps3av->av_port[i], mute); in ps3av_set_audio_mute()
398 res = ps3av_cmd_audio_mute(1, &ps3av->opt_port[i], mute); in ps3av_set_audio_mute()
413 num_of_audio = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_audio_mode()
414 ps3av->av_hw_conf.num_of_avmulti + in ps3av_set_audio_mode()
415 ps3av->av_hw_conf.num_of_spdif; in ps3av_set_audio_mode()
420 avb_param.num_of_av_audio_pkt = ps3av->av_hw_conf.num_of_hdmi; in ps3av_set_audio_mode()
422 vid = video_mode_table[ps3av->ps3av_mode].vid; in ps3av_set_audio_mode()
428 res = ps3av_cmd_audio_active(0, ps3av->audio_port); in ps3av_set_audio_mode()
430 dev_dbg(&ps3av->dev->core, in ps3av_set_audio_mode()
435 ps3av_cmd_set_audio_mode(&audio_mode, ps3av->av_port[i], ch, in ps3av_set_audio_mode()
437 if (i < ps3av->av_hw_conf.num_of_hdmi) { in ps3av_set_audio_mode()
440 ps3av->av_port[i], in ps3av_set_audio_mode()
446 dev_dbg(&ps3av->dev->core, in ps3av_set_audio_mode()
454 dev_dbg(&ps3av->dev->core, "ps3av_cmd_avb_param failed\n"); in ps3av_set_audio_mode()
460 res = ps3av_cmd_audio_active(1, ps3av->audio_port); in ps3av_set_audio_mode()
462 dev_dbg(&ps3av->dev->core, in ps3av_set_audio_mode()
475 schedule_work(&ps3av->work); in ps3av_set_videomode()
492 avb_param.num_of_av_video_pkt = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_videomode_packet()
493 ps3av->av_hw_conf.num_of_avmulti; in ps3av_set_videomode_packet()
499 ps3av->head[i], video_mode->vid, in ps3av_set_videomode_packet()
508 if (ps3av->av_port[i] == PS3AV_CMD_AVPORT_HDMI_0 || in ps3av_set_videomode_packet()
509 ps3av->av_port[i] == PS3AV_CMD_AVPORT_HDMI_1) in ps3av_set_videomode_packet()
513 ps3av->av_port[i], in ps3av_set_videomode_packet()
525 dev_dbg(&ps3av->dev->core, "ps3av_cmd_avb_param failed\n"); in ps3av_set_videomode_packet()
550 dev_dbg(&ps3av->dev->core, "Not supported\n"); in ps3av_set_videomode_cont()
552 dev_dbg(&ps3av->dev->core, in ps3av_set_videomode_cont()
557 dev_dbg(&ps3av->dev->core, in ps3av_set_videomode_cont()
570 ps3av_set_videomode_cont(ps3av->ps3av_mode, ps3av->ps3av_mode_old); in ps3avd()
571 complete(&ps3av->done); in ps3avd()
648 if (ps3av->region & PS3AV_REGION_60) in ps3av_hdmi_get_id()
781 if (ps3av->region & PS3AV_REGION_60) in ps3av_auto_videomode()
785 if (ps3av->region & PS3AV_REGION_RGB) in ps3av_auto_videomode()
793 static int ps3av_get_hw_conf(struct ps3av *ps3av) in ps3av_get_hw_conf() argument
799 res = ps3av_cmd_av_get_hw_conf(&ps3av->av_hw_conf); in ps3av_get_hw_conf()
803 hw_conf = &ps3av->av_hw_conf; in ps3av_get_hw_conf()
809 ps3av->head[i] = PS3AV_CMD_VIDEO_HEAD_A + i; in ps3av_get_hw_conf()
811 ps3av->opt_port[i] = PS3AV_CMD_AVPORT_SPDIF_0 + i; in ps3av_get_hw_conf()
813 ps3av->av_port[i] = PS3AV_CMD_AVPORT_HDMI_0 + i; in ps3av_get_hw_conf()
815 ps3av->av_port[i + j] = PS3AV_CMD_AVPORT_AVMULTI_0 + j; in ps3av_get_hw_conf()
817 ps3av->av_port[i + j + k] = PS3AV_CMD_AVPORT_SPDIF_0 + k; in ps3av_get_hw_conf()
820 ps3av->audio_port = PS3AV_CMD_AUDIO_PORT_HDMI_0 in ps3av_get_hw_conf()
836 dev_dbg(&ps3av->dev->core, "%s: error id :%d\n", __func__, id); in ps3av_set_video_mode()
843 id = ps3av_auto_videomode(&ps3av->av_hw_conf); in ps3av_set_video_mode()
852 wait_for_completion(&ps3av->done); in ps3av_set_video_mode()
853 ps3av->ps3av_mode_old = ps3av->ps3av_mode; in ps3av_set_video_mode()
854 ps3av->ps3av_mode = id; in ps3av_set_video_mode()
856 ps3av->ps3av_mode = ps3av->ps3av_mode_old; in ps3av_set_video_mode()
864 return ps3av_auto_videomode(&ps3av->av_hw_conf); in ps3av_get_auto_mode()
870 return ps3av ? ps3av->ps3av_mode : 0; in ps3av_get_mode()
904 for (i = 0; i < ps3av->av_hw_conf.num_of_avmulti; i++) { in ps3av_audio_mute_analog()
906 &ps3av->av_port[i + ps3av->av_hw_conf.num_of_hdmi], in ps3av_audio_mute_analog()
930 if (ps3av) { in ps3av_probe()
935 ps3av = kzalloc(sizeof(*ps3av), GFP_KERNEL); in ps3av_probe()
936 if (!ps3av) in ps3av_probe()
939 mutex_init(&ps3av->mutex); in ps3av_probe()
940 ps3av->ps3av_mode = PS3AV_MODE_AUTO; in ps3av_probe()
941 ps3av->dev = dev; in ps3av_probe()
943 INIT_WORK(&ps3av->work, ps3avd); in ps3av_probe()
944 init_completion(&ps3av->done); in ps3av_probe()
945 complete(&ps3av->done); in ps3av_probe()
949 ps3av->region = PS3AV_REGION_60; in ps3av_probe()
953 ps3av->region = PS3AV_REGION_50; in ps3av_probe()
956 ps3av->region = PS3AV_REGION_50 | PS3AV_REGION_RGB; in ps3av_probe()
959 ps3av->region = PS3AV_REGION_60; in ps3av_probe()
969 ps3av_get_hw_conf(ps3av); in ps3av_probe()
975 id = ps3av_auto_videomode(&ps3av->av_hw_conf); in ps3av_probe()
984 mutex_lock(&ps3av->mutex); in ps3av_probe()
985 ps3av->ps3av_mode = id; in ps3av_probe()
986 mutex_unlock(&ps3av->mutex); in ps3av_probe()
993 kfree(ps3av); in ps3av_probe()
994 ps3av = NULL; in ps3av_probe()
1001 if (ps3av) { in ps3av_remove()
1003 flush_work(&ps3av->work); in ps3av_remove()
1004 kfree(ps3av); in ps3av_remove()
1005 ps3av = NULL; in ps3av_remove()