Lines Matching refs:ps3av

32 static struct ps3av {  struct
51 } *ps3av; argument
159 dev_dbg(&ps3av->dev->core, in ps3av_parse_event_packet()
215 if (!ps3av) in ps3av_send_cmd_pkt()
219 res = ps3av_vuart_write(ps3av->dev, send_buf, write_len); in ps3av_send_cmd_pkt()
221 dev_warn(&ps3av->dev->core, in ps3av_send_cmd_pkt()
231 res = ps3av_vuart_read(ps3av->dev, recv_buf, PS3AV_HDR_SIZE, in ps3av_send_cmd_pkt()
234 dev_warn(&ps3av->dev->core, in ps3av_send_cmd_pkt()
241 res = ps3av_vuart_read(ps3av->dev, &recv_buf->cid, in ps3av_send_cmd_pkt()
244 dev_warn(&ps3av->dev->core, in ps3av_send_cmd_pkt()
255 dev_warn(&ps3av->dev->core, "%s:%d: reply err: %x\n", __func__, in ps3av_send_cmd_pkt()
270 dev_dbg(&ps3av->dev->core, "reply_packet invalid version:%x\n", in ps3av_process_reply_packet()
294 BUG_ON(!ps3av); in ps3av_do_pkt()
296 mutex_lock(&ps3av->mutex); in ps3av_do_pkt()
308 res = ps3av_send_cmd_pkt(buf, &ps3av->recv_buf.reply_hdr, send_len, in ps3av_do_pkt()
318 res = ps3av_process_reply_packet(buf, &ps3av->recv_buf.reply_hdr, in ps3av_do_pkt()
326 mutex_unlock(&ps3av->mutex); in ps3av_do_pkt()
330 mutex_unlock(&ps3av->mutex); in ps3av_do_pkt()
339 num_of_av_port = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_av_video_mute()
340 ps3av->av_hw_conf.num_of_avmulti; in ps3av_set_av_video_mute()
343 res = ps3av_cmd_av_video_mute(1, &ps3av->av_port[i], mute); in ps3av_set_av_video_mute()
355 num_of_hdmi_port = ps3av->av_hw_conf.num_of_hdmi; in ps3av_set_video_disable_sig()
356 num_of_av_port = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_video_disable_sig()
357 ps3av->av_hw_conf.num_of_avmulti; in ps3av_set_video_disable_sig()
361 res = ps3av_cmd_av_tv_mute(ps3av->av_port[i], in ps3av_set_video_disable_sig()
370 res = ps3av_cmd_av_video_disable_sig(ps3av->av_port[i]); in ps3av_set_video_disable_sig()
374 res = ps3av_cmd_av_tv_mute(ps3av->av_port[i], in ps3av_set_video_disable_sig()
389 num_of_av_port = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_audio_mute()
390 ps3av->av_hw_conf.num_of_avmulti; in ps3av_set_audio_mute()
391 num_of_opt_port = ps3av->av_hw_conf.num_of_spdif; in ps3av_set_audio_mute()
394 res = ps3av_cmd_av_audio_mute(1, &ps3av->av_port[i], mute); in ps3av_set_audio_mute()
399 res = ps3av_cmd_audio_mute(1, &ps3av->opt_port[i], mute); in ps3av_set_audio_mute()
414 num_of_audio = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_audio_mode()
415 ps3av->av_hw_conf.num_of_avmulti + in ps3av_set_audio_mode()
416 ps3av->av_hw_conf.num_of_spdif; in ps3av_set_audio_mode()
421 avb_param.num_of_av_audio_pkt = ps3av->av_hw_conf.num_of_hdmi; in ps3av_set_audio_mode()
423 vid = video_mode_table[ps3av->ps3av_mode].vid; in ps3av_set_audio_mode()
429 res = ps3av_cmd_audio_active(0, ps3av->audio_port); in ps3av_set_audio_mode()
431 dev_dbg(&ps3av->dev->core, in ps3av_set_audio_mode()
436 ps3av_cmd_set_audio_mode(&audio_mode, ps3av->av_port[i], ch, in ps3av_set_audio_mode()
438 if (i < ps3av->av_hw_conf.num_of_hdmi) { in ps3av_set_audio_mode()
441 ps3av->av_port[i], in ps3av_set_audio_mode()
447 dev_dbg(&ps3av->dev->core, in ps3av_set_audio_mode()
455 dev_dbg(&ps3av->dev->core, "ps3av_cmd_avb_param failed\n"); in ps3av_set_audio_mode()
461 res = ps3av_cmd_audio_active(1, ps3av->audio_port); in ps3av_set_audio_mode()
463 dev_dbg(&ps3av->dev->core, in ps3av_set_audio_mode()
476 schedule_work(&ps3av->work); in ps3av_set_videomode()
493 avb_param.num_of_av_video_pkt = ps3av->av_hw_conf.num_of_hdmi + in ps3av_set_videomode_packet()
494 ps3av->av_hw_conf.num_of_avmulti; in ps3av_set_videomode_packet()
500 ps3av->head[i], video_mode->vid, in ps3av_set_videomode_packet()
509 if (ps3av->av_port[i] == PS3AV_CMD_AVPORT_HDMI_0 || in ps3av_set_videomode_packet()
510 ps3av->av_port[i] == PS3AV_CMD_AVPORT_HDMI_1) in ps3av_set_videomode_packet()
514 ps3av->av_port[i], in ps3av_set_videomode_packet()
526 dev_dbg(&ps3av->dev->core, "ps3av_cmd_avb_param failed\n"); in ps3av_set_videomode_packet()
551 dev_dbg(&ps3av->dev->core, "Not supported\n"); in ps3av_set_videomode_cont()
553 dev_dbg(&ps3av->dev->core, in ps3av_set_videomode_cont()
558 dev_dbg(&ps3av->dev->core, in ps3av_set_videomode_cont()
571 ps3av_set_videomode_cont(ps3av->ps3av_mode, ps3av->ps3av_mode_old); in ps3avd()
572 complete(&ps3av->done); in ps3avd()
649 if (ps3av->region & PS3AV_REGION_60) in ps3av_hdmi_get_id()
782 if (ps3av->region & PS3AV_REGION_60) in ps3av_auto_videomode()
786 if (ps3av->region & PS3AV_REGION_RGB) in ps3av_auto_videomode()
794 static int ps3av_get_hw_conf(struct ps3av *ps3av) in ps3av_get_hw_conf() argument
800 res = ps3av_cmd_av_get_hw_conf(&ps3av->av_hw_conf); in ps3av_get_hw_conf()
804 hw_conf = &ps3av->av_hw_conf; in ps3av_get_hw_conf()
810 ps3av->head[i] = PS3AV_CMD_VIDEO_HEAD_A + i; in ps3av_get_hw_conf()
812 ps3av->opt_port[i] = PS3AV_CMD_AVPORT_SPDIF_0 + i; in ps3av_get_hw_conf()
814 ps3av->av_port[i] = PS3AV_CMD_AVPORT_HDMI_0 + i; in ps3av_get_hw_conf()
816 ps3av->av_port[i + j] = PS3AV_CMD_AVPORT_AVMULTI_0 + j; in ps3av_get_hw_conf()
818 ps3av->av_port[i + j + k] = PS3AV_CMD_AVPORT_SPDIF_0 + k; in ps3av_get_hw_conf()
821 ps3av->audio_port = PS3AV_CMD_AUDIO_PORT_HDMI_0 in ps3av_get_hw_conf()
837 dev_dbg(&ps3av->dev->core, "%s: error id :%d\n", __func__, id); in ps3av_set_video_mode()
844 id = ps3av_auto_videomode(&ps3av->av_hw_conf); in ps3av_set_video_mode()
853 wait_for_completion(&ps3av->done); in ps3av_set_video_mode()
854 ps3av->ps3av_mode_old = ps3av->ps3av_mode; in ps3av_set_video_mode()
855 ps3av->ps3av_mode = id; in ps3av_set_video_mode()
857 ps3av->ps3av_mode = ps3av->ps3av_mode_old; in ps3av_set_video_mode()
865 return ps3av_auto_videomode(&ps3av->av_hw_conf); in ps3av_get_auto_mode()
871 return ps3av ? ps3av->ps3av_mode : 0; in ps3av_get_mode()
905 for (i = 0; i < ps3av->av_hw_conf.num_of_avmulti; i++) { in ps3av_audio_mute_analog()
907 &ps3av->av_port[i + ps3av->av_hw_conf.num_of_hdmi], in ps3av_audio_mute_analog()
932 if (ps3av) { in ps3av_probe()
937 ps3av = kzalloc(sizeof(*ps3av), GFP_KERNEL); in ps3av_probe()
938 if (!ps3av) in ps3av_probe()
941 mutex_init(&ps3av->mutex); in ps3av_probe()
942 ps3av->ps3av_mode = PS3AV_MODE_AUTO; in ps3av_probe()
943 ps3av->dev = dev; in ps3av_probe()
945 INIT_WORK(&ps3av->work, ps3avd); in ps3av_probe()
946 init_completion(&ps3av->done); in ps3av_probe()
947 complete(&ps3av->done); in ps3av_probe()
951 ps3av->region = PS3AV_REGION_60; in ps3av_probe()
955 ps3av->region = PS3AV_REGION_50; in ps3av_probe()
958 ps3av->region = PS3AV_REGION_50 | PS3AV_REGION_RGB; in ps3av_probe()
961 ps3av->region = PS3AV_REGION_60; in ps3av_probe()
971 ps3av_get_hw_conf(ps3av); in ps3av_probe()
976 id = ps3av_auto_videomode(&ps3av->av_hw_conf); in ps3av_probe()
985 mutex_lock(&ps3av->mutex); in ps3av_probe()
986 ps3av->ps3av_mode = id; in ps3av_probe()
987 mutex_unlock(&ps3av->mutex); in ps3av_probe()
994 kfree(ps3av); in ps3av_probe()
995 ps3av = NULL; in ps3av_probe()
1002 if (ps3av) { in ps3av_remove()
1004 flush_work(&ps3av->work); in ps3av_remove()
1005 kfree(ps3av); in ps3av_remove()
1006 ps3av = NULL; in ps3av_remove()