Lines Matching refs:msg

13 static inline void cec_msg_htng_init(struct cec_msg *msg, uint8_t op)  in cec_msg_htng_init()  argument
15 msg->len = 6; in cec_msg_htng_init()
16 msg->msg[1] = CEC_MSG_VENDOR_COMMAND_WITH_ID; in cec_msg_htng_init()
17 msg->msg[2] = VENDOR_ID_HTNG >> 16; in cec_msg_htng_init()
18 msg->msg[3] = (VENDOR_ID_HTNG >> 8) & 0xff; in cec_msg_htng_init()
19 msg->msg[4] = VENDOR_ID_HTNG & 0xff; in cec_msg_htng_init()
20 msg->msg[5] = op; in cec_msg_htng_init()
24 static inline void cec_msg_htng_tuner_1part_chan(struct cec_msg *msg, in cec_msg_htng_tuner_1part_chan() argument
28 cec_msg_htng_init(msg, CEC_MSG_HTNG_TUNER_1PART_CHAN); in cec_msg_htng_tuner_1part_chan()
29 msg->msg[msg->len++] = htng_tuner_type; in cec_msg_htng_tuner_1part_chan()
30 msg->msg[msg->len++] = chan >> 8; in cec_msg_htng_tuner_1part_chan()
31 msg->msg[msg->len++] = chan & 0xff; in cec_msg_htng_tuner_1part_chan()
34 static inline void cec_ops_htng_tuner_1part_chan(const struct cec_msg *msg, in cec_ops_htng_tuner_1part_chan() argument
38 *htng_tuner_type = msg->msg[6]; in cec_ops_htng_tuner_1part_chan()
39 *chan = (msg->msg[7] << 8) | msg->msg[8]; in cec_ops_htng_tuner_1part_chan()
42 static inline void cec_msg_htng_tuner_2part_chan(struct cec_msg *msg, in cec_msg_htng_tuner_2part_chan() argument
47 cec_msg_htng_init(msg, CEC_MSG_HTNG_TUNER_2PART_CHAN); in cec_msg_htng_tuner_2part_chan()
48 msg->msg[msg->len++] = htng_tuner_type; in cec_msg_htng_tuner_2part_chan()
49 msg->msg[msg->len++] = major_chan; in cec_msg_htng_tuner_2part_chan()
50 msg->msg[msg->len++] = minor_chan >> 8; in cec_msg_htng_tuner_2part_chan()
51 msg->msg[msg->len++] = minor_chan & 0xff; in cec_msg_htng_tuner_2part_chan()
54 static inline void cec_ops_htng_tuner_2part_chan(const struct cec_msg *msg, in cec_ops_htng_tuner_2part_chan() argument
59 *htng_tuner_type = msg->msg[6]; in cec_ops_htng_tuner_2part_chan()
60 *major_chan = msg->msg[7]; in cec_ops_htng_tuner_2part_chan()
61 *minor_chan = (msg->msg[8] << 8) | msg->msg[9]; in cec_ops_htng_tuner_2part_chan()
64 static inline void cec_msg_htng_input_sel_av(struct cec_msg *msg, in cec_msg_htng_input_sel_av() argument
67 cec_msg_htng_init(msg, CEC_MSG_HTNG_INPUT_SEL_AV); in cec_msg_htng_input_sel_av()
68 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_input_sel_av()
69 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_input_sel_av()
72 static inline void cec_ops_htng_input_sel_av(const struct cec_msg *msg, in cec_ops_htng_input_sel_av() argument
75 *input = (msg->msg[6] << 8) | msg->msg[7]; in cec_ops_htng_input_sel_av()
78 static inline void cec_msg_htng_input_sel_pc(struct cec_msg *msg, in cec_msg_htng_input_sel_pc() argument
81 cec_msg_htng_init(msg, CEC_MSG_HTNG_INPUT_SEL_PC); in cec_msg_htng_input_sel_pc()
82 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_input_sel_pc()
83 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_input_sel_pc()
86 static inline void cec_ops_htng_input_sel_pc(const struct cec_msg *msg, in cec_ops_htng_input_sel_pc() argument
89 *input = (msg->msg[6] << 8) | msg->msg[7]; in cec_ops_htng_input_sel_pc()
92 static inline void cec_msg_htng_input_sel_hdmi(struct cec_msg *msg, in cec_msg_htng_input_sel_hdmi() argument
95 cec_msg_htng_init(msg, CEC_MSG_HTNG_INPUT_SEL_HDMI); in cec_msg_htng_input_sel_hdmi()
96 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_input_sel_hdmi()
97 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_input_sel_hdmi()
100 static inline void cec_ops_htng_input_sel_hdmi(const struct cec_msg *msg, in cec_ops_htng_input_sel_hdmi() argument
103 *input = (msg->msg[6] << 8) | msg->msg[7]; in cec_ops_htng_input_sel_hdmi()
106 static inline void cec_msg_htng_input_sel_component(struct cec_msg *msg, in cec_msg_htng_input_sel_component() argument
109 cec_msg_htng_init(msg, CEC_MSG_HTNG_INPUT_SEL_COMPONENT); in cec_msg_htng_input_sel_component()
110 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_input_sel_component()
111 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_input_sel_component()
114 static inline void cec_ops_htng_input_sel_component(const struct cec_msg *msg, in cec_ops_htng_input_sel_component() argument
117 *input = (msg->msg[6] << 8) | msg->msg[7]; in cec_ops_htng_input_sel_component()
120 static inline void cec_msg_htng_input_sel_dvi(struct cec_msg *msg, in cec_msg_htng_input_sel_dvi() argument
123 cec_msg_htng_init(msg, CEC_MSG_HTNG_INPUT_SEL_DVI); in cec_msg_htng_input_sel_dvi()
124 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_input_sel_dvi()
125 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_input_sel_dvi()
128 static inline void cec_ops_htng_input_sel_dvi(const struct cec_msg *msg, in cec_ops_htng_input_sel_dvi() argument
131 *input = (msg->msg[6] << 8) | msg->msg[7]; in cec_ops_htng_input_sel_dvi()
134 static inline void cec_msg_htng_input_sel_dp(struct cec_msg *msg, in cec_msg_htng_input_sel_dp() argument
137 cec_msg_htng_init(msg, CEC_MSG_HTNG_INPUT_SEL_DP); in cec_msg_htng_input_sel_dp()
138 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_input_sel_dp()
139 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_input_sel_dp()
142 static inline void cec_ops_htng_input_sel_dp(const struct cec_msg *msg, in cec_ops_htng_input_sel_dp() argument
145 *input = (msg->msg[6] << 8) | msg->msg[7]; in cec_ops_htng_input_sel_dp()
148 static inline void cec_msg_htng_input_sel_usb(struct cec_msg *msg, in cec_msg_htng_input_sel_usb() argument
151 cec_msg_htng_init(msg, CEC_MSG_HTNG_INPUT_SEL_USB); in cec_msg_htng_input_sel_usb()
152 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_input_sel_usb()
153 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_input_sel_usb()
156 static inline void cec_ops_htng_input_sel_usb(const struct cec_msg *msg, in cec_ops_htng_input_sel_usb() argument
159 *input = (msg->msg[6] << 8) | msg->msg[7]; in cec_ops_htng_input_sel_usb()
162 static inline void cec_msg_htng_set_def_pwr_on_input_src(struct cec_msg *msg, in cec_msg_htng_set_def_pwr_on_input_src() argument
168 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_DEF_PWR_ON_INPUT_SRC); in cec_msg_htng_set_def_pwr_on_input_src()
169 msg->msg[msg->len++] = htng_input_src; in cec_msg_htng_set_def_pwr_on_input_src()
170 msg->msg[msg->len++] = htng_tuner_type; in cec_msg_htng_set_def_pwr_on_input_src()
172 msg->msg[msg->len++] = major; in cec_msg_htng_set_def_pwr_on_input_src()
173 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_set_def_pwr_on_input_src()
174 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_set_def_pwr_on_input_src()
176 msg->msg[msg->len++] = 0; in cec_msg_htng_set_def_pwr_on_input_src()
179 static inline void cec_ops_htng_set_def_pwr_on_input_src(const struct cec_msg *msg, in cec_ops_htng_set_def_pwr_on_input_src() argument
185 *htng_input_src = msg->msg[6]; in cec_ops_htng_set_def_pwr_on_input_src()
186 *htng_tuner_type = msg->msg[7]; in cec_ops_htng_set_def_pwr_on_input_src()
188 *major = msg->msg[8]; in cec_ops_htng_set_def_pwr_on_input_src()
189 *input = (msg->msg[9] << 8) | msg->msg[10]; in cec_ops_htng_set_def_pwr_on_input_src()
192 *input = (msg->msg[8] << 8) | msg->msg[9]; in cec_ops_htng_set_def_pwr_on_input_src()
196 static inline void cec_msg_htng_set_tv_speakers(struct cec_msg *msg, in cec_msg_htng_set_tv_speakers() argument
199 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_TV_SPEAKERS); in cec_msg_htng_set_tv_speakers()
200 msg->msg[msg->len++] = on; in cec_msg_htng_set_tv_speakers()
203 static inline void cec_ops_htng_set_tv_speakers(const struct cec_msg *msg, in cec_ops_htng_set_tv_speakers() argument
206 *on = msg->msg[6]; in cec_ops_htng_set_tv_speakers()
209 static inline void cec_msg_htng_set_dig_audio(struct cec_msg *msg, in cec_msg_htng_set_dig_audio() argument
212 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_DIG_AUDIO); in cec_msg_htng_set_dig_audio()
213 msg->msg[msg->len++] = on; in cec_msg_htng_set_dig_audio()
216 static inline void cec_ops_htng_set_dig_audio(const struct cec_msg *msg, in cec_ops_htng_set_dig_audio() argument
219 *on = msg->msg[6]; in cec_ops_htng_set_dig_audio()
222 static inline void cec_msg_htng_set_ana_audio(struct cec_msg *msg, in cec_msg_htng_set_ana_audio() argument
225 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_ANA_AUDIO); in cec_msg_htng_set_ana_audio()
226 msg->msg[msg->len++] = on; in cec_msg_htng_set_ana_audio()
229 static inline void cec_ops_htng_set_ana_audio(const struct cec_msg *msg, in cec_ops_htng_set_ana_audio() argument
232 *on = msg->msg[6]; in cec_ops_htng_set_ana_audio()
235 static inline void cec_msg_htng_set_def_pwr_on_vol(struct cec_msg *msg, in cec_msg_htng_set_def_pwr_on_vol() argument
238 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_DEF_PWR_ON_VOL); in cec_msg_htng_set_def_pwr_on_vol()
239 msg->msg[msg->len++] = vol; in cec_msg_htng_set_def_pwr_on_vol()
242 static inline void cec_ops_htng_set_def_pwr_on_vol(const struct cec_msg *msg, in cec_ops_htng_set_def_pwr_on_vol() argument
245 *vol = msg->msg[6]; in cec_ops_htng_set_def_pwr_on_vol()
248 static inline void cec_msg_htng_set_max_vol(struct cec_msg *msg, in cec_msg_htng_set_max_vol() argument
251 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_MAX_VOL); in cec_msg_htng_set_max_vol()
252 msg->msg[msg->len++] = vol; in cec_msg_htng_set_max_vol()
255 static inline void cec_ops_htng_set_max_vol(const struct cec_msg *msg, in cec_ops_htng_set_max_vol() argument
258 *vol = msg->msg[6]; in cec_ops_htng_set_max_vol()
261 static inline void cec_msg_htng_set_min_vol(struct cec_msg *msg, in cec_msg_htng_set_min_vol() argument
264 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_MIN_VOL); in cec_msg_htng_set_min_vol()
265 msg->msg[msg->len++] = vol; in cec_msg_htng_set_min_vol()
268 static inline void cec_ops_htng_set_min_vol(const struct cec_msg *msg, in cec_ops_htng_set_min_vol() argument
271 *vol = msg->msg[6]; in cec_ops_htng_set_min_vol()
274 static inline void cec_msg_htng_set_blue_screen(struct cec_msg *msg, in cec_msg_htng_set_blue_screen() argument
277 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_BLUE_SCREEN); in cec_msg_htng_set_blue_screen()
278 msg->msg[msg->len++] = blue; in cec_msg_htng_set_blue_screen()
281 static inline void cec_ops_htng_set_blue_screen(const struct cec_msg *msg, in cec_ops_htng_set_blue_screen() argument
284 *blue = msg->msg[6]; in cec_ops_htng_set_blue_screen()
287 static inline void cec_msg_htng_set_brightness(struct cec_msg *msg, in cec_msg_htng_set_brightness() argument
290 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_BRIGHTNESS); in cec_msg_htng_set_brightness()
291 msg->msg[msg->len++] = brightness; in cec_msg_htng_set_brightness()
294 static inline void cec_ops_htng_set_brightness(const struct cec_msg *msg, in cec_ops_htng_set_brightness() argument
297 *brightness = msg->msg[6]; in cec_ops_htng_set_brightness()
300 static inline void cec_msg_htng_set_color(struct cec_msg *msg, in cec_msg_htng_set_color() argument
303 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_COLOR); in cec_msg_htng_set_color()
304 msg->msg[msg->len++] = color; in cec_msg_htng_set_color()
307 static inline void cec_ops_htng_set_color(const struct cec_msg *msg, in cec_ops_htng_set_color() argument
310 *color = msg->msg[6]; in cec_ops_htng_set_color()
313 static inline void cec_msg_htng_set_contrast(struct cec_msg *msg, in cec_msg_htng_set_contrast() argument
316 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_CONTRAST); in cec_msg_htng_set_contrast()
317 msg->msg[msg->len++] = contrast; in cec_msg_htng_set_contrast()
320 static inline void cec_ops_htng_set_contrast(const struct cec_msg *msg, in cec_ops_htng_set_contrast() argument
323 *contrast = msg->msg[6]; in cec_ops_htng_set_contrast()
326 static inline void cec_msg_htng_set_sharpness(struct cec_msg *msg, in cec_msg_htng_set_sharpness() argument
329 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_SHARPNESS); in cec_msg_htng_set_sharpness()
330 msg->msg[msg->len++] = sharpness; in cec_msg_htng_set_sharpness()
333 static inline void cec_ops_htng_set_sharpness(const struct cec_msg *msg, in cec_ops_htng_set_sharpness() argument
336 *sharpness = msg->msg[6]; in cec_ops_htng_set_sharpness()
339 static inline void cec_msg_htng_set_hue(struct cec_msg *msg, in cec_msg_htng_set_hue() argument
342 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_HUE); in cec_msg_htng_set_hue()
343 msg->msg[msg->len++] = hue; in cec_msg_htng_set_hue()
346 static inline void cec_ops_htng_set_hue(const struct cec_msg *msg, in cec_ops_htng_set_hue() argument
349 *hue = msg->msg[6]; in cec_ops_htng_set_hue()
352 static inline void cec_msg_htng_set_led_backlight(struct cec_msg *msg, in cec_msg_htng_set_led_backlight() argument
355 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_LED_BACKLIGHT); in cec_msg_htng_set_led_backlight()
356 msg->msg[msg->len++] = led_backlight; in cec_msg_htng_set_led_backlight()
359 static inline void cec_ops_htng_set_led_backlight(const struct cec_msg *msg, in cec_ops_htng_set_led_backlight() argument
362 *led_backlight = msg->msg[6]; in cec_ops_htng_set_led_backlight()
365 static inline void cec_msg_htng_set_tv_osd_control(struct cec_msg *msg, in cec_msg_htng_set_tv_osd_control() argument
368 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_TV_OSD_CONTROL); in cec_msg_htng_set_tv_osd_control()
369 msg->msg[msg->len++] = on; in cec_msg_htng_set_tv_osd_control()
372 static inline void cec_ops_htng_set_tv_osd_control(const struct cec_msg *msg, in cec_ops_htng_set_tv_osd_control() argument
375 *on = msg->msg[6]; in cec_ops_htng_set_tv_osd_control()
378 static inline void cec_msg_htng_set_audio_only_display(struct cec_msg *msg, in cec_msg_htng_set_audio_only_display() argument
381 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_AUDIO_ONLY_DISPLAY); in cec_msg_htng_set_audio_only_display()
382 msg->msg[msg->len++] = on; in cec_msg_htng_set_audio_only_display()
385 static inline void cec_ops_htng_set_audio_only_display(const struct cec_msg *msg, in cec_ops_htng_set_audio_only_display() argument
388 *on = msg->msg[6]; in cec_ops_htng_set_audio_only_display()
391 static inline void cec_msg_htng_set_date(struct cec_msg *msg, in cec_msg_htng_set_date() argument
394 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_DATE); in cec_msg_htng_set_date()
395 memcpy(msg->msg + msg->len, date, 8); in cec_msg_htng_set_date()
396 msg->len += 8; in cec_msg_htng_set_date()
399 static inline void cec_ops_htng_set_date(const struct cec_msg *msg, in cec_ops_htng_set_date() argument
402 memcpy(date, msg->msg + 6, 8); in cec_ops_htng_set_date()
406 static inline void cec_msg_htng_set_date_format(struct cec_msg *msg, in cec_msg_htng_set_date_format() argument
409 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_DATE_FORMAT); in cec_msg_htng_set_date_format()
410 msg->msg[msg->len++] = ddmm; in cec_msg_htng_set_date_format()
413 static inline void cec_ops_htng_set_date_format(const struct cec_msg *msg, in cec_ops_htng_set_date_format() argument
416 *ddmm = msg->msg[6]; in cec_ops_htng_set_date_format()
419 static inline void cec_msg_htng_set_time(struct cec_msg *msg, in cec_msg_htng_set_time() argument
422 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_TIME); in cec_msg_htng_set_time()
423 memcpy(msg->msg + msg->len, time, 6); in cec_msg_htng_set_time()
424 msg->len += 6; in cec_msg_htng_set_time()
427 static inline void cec_ops_htng_set_time(const struct cec_msg *msg, in cec_ops_htng_set_time() argument
430 memcpy(time, msg->msg + 6, 6); in cec_ops_htng_set_time()
434 static inline void cec_msg_htng_set_clk_brightness_standby(struct cec_msg *msg, in cec_msg_htng_set_clk_brightness_standby() argument
437 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_CLK_BRIGHTNESS_STANDBY); in cec_msg_htng_set_clk_brightness_standby()
438 msg->msg[msg->len++] = brightness; in cec_msg_htng_set_clk_brightness_standby()
441 static inline void cec_ops_htng_set_clk_brightness_standby(const struct cec_msg *msg, in cec_ops_htng_set_clk_brightness_standby() argument
444 *brightness = msg->msg[6]; in cec_ops_htng_set_clk_brightness_standby()
447 static inline void cec_msg_htng_set_clk_brightness_on(struct cec_msg *msg, in cec_msg_htng_set_clk_brightness_on() argument
450 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_CLK_BRIGHTNESS_ON); in cec_msg_htng_set_clk_brightness_on()
451 msg->msg[msg->len++] = brightness; in cec_msg_htng_set_clk_brightness_on()
454 static inline void cec_ops_htng_set_clk_brightness_on(const struct cec_msg *msg, in cec_ops_htng_set_clk_brightness_on() argument
457 *brightness = msg->msg[6]; in cec_ops_htng_set_clk_brightness_on()
460 static inline void cec_msg_htng_led_control(struct cec_msg *msg, in cec_msg_htng_led_control() argument
463 cec_msg_htng_init(msg, CEC_MSG_HTNG_LED_CONTROL); in cec_msg_htng_led_control()
464 msg->msg[msg->len++] = htng_led_control; in cec_msg_htng_led_control()
467 static inline void cec_ops_htng_led_control(const struct cec_msg *msg, in cec_ops_htng_led_control() argument
470 *htng_led_control = msg->msg[6]; in cec_ops_htng_led_control()
473 static inline void cec_msg_htng_lock_tv_pwr_button(struct cec_msg *msg, in cec_msg_htng_lock_tv_pwr_button() argument
476 cec_msg_htng_init(msg, CEC_MSG_HTNG_LOCK_TV_PWR_BUTTON); in cec_msg_htng_lock_tv_pwr_button()
477 msg->msg[msg->len++] = on; in cec_msg_htng_lock_tv_pwr_button()
480 static inline void cec_ops_htng_lock_tv_pwr_button(const struct cec_msg *msg, in cec_ops_htng_lock_tv_pwr_button() argument
483 *on = msg->msg[6]; in cec_ops_htng_lock_tv_pwr_button()
486 static inline void cec_msg_htng_lock_tv_vol_buttons(struct cec_msg *msg, in cec_msg_htng_lock_tv_vol_buttons() argument
489 cec_msg_htng_init(msg, CEC_MSG_HTNG_LOCK_TV_VOL_BUTTONS); in cec_msg_htng_lock_tv_vol_buttons()
490 msg->msg[msg->len++] = on; in cec_msg_htng_lock_tv_vol_buttons()
493 static inline void cec_ops_htng_lock_tv_vol_buttons(const struct cec_msg *msg, in cec_ops_htng_lock_tv_vol_buttons() argument
496 *on = msg->msg[6]; in cec_ops_htng_lock_tv_vol_buttons()
499 static inline void cec_msg_htng_lock_tv_chan_buttons(struct cec_msg *msg, in cec_msg_htng_lock_tv_chan_buttons() argument
502 cec_msg_htng_init(msg, CEC_MSG_HTNG_LOCK_TV_CHAN_BUTTONS); in cec_msg_htng_lock_tv_chan_buttons()
503 msg->msg[msg->len++] = on; in cec_msg_htng_lock_tv_chan_buttons()
506 static inline void cec_ops_htng_lock_tv_chan_buttons(const struct cec_msg *msg, in cec_ops_htng_lock_tv_chan_buttons() argument
509 *on = msg->msg[6]; in cec_ops_htng_lock_tv_chan_buttons()
512 static inline void cec_msg_htng_lock_tv_input_buttons(struct cec_msg *msg, in cec_msg_htng_lock_tv_input_buttons() argument
515 cec_msg_htng_init(msg, CEC_MSG_HTNG_LOCK_TV_INPUT_BUTTONS); in cec_msg_htng_lock_tv_input_buttons()
516 msg->msg[msg->len++] = on; in cec_msg_htng_lock_tv_input_buttons()
519 static inline void cec_ops_htng_lock_tv_input_buttons(const struct cec_msg *msg, in cec_ops_htng_lock_tv_input_buttons() argument
522 *on = msg->msg[6]; in cec_ops_htng_lock_tv_input_buttons()
525 static inline void cec_msg_htng_lock_tv_other_buttons(struct cec_msg *msg, in cec_msg_htng_lock_tv_other_buttons() argument
528 cec_msg_htng_init(msg, CEC_MSG_HTNG_LOCK_TV_OTHER_BUTTONS); in cec_msg_htng_lock_tv_other_buttons()
529 msg->msg[msg->len++] = on; in cec_msg_htng_lock_tv_other_buttons()
532 static inline void cec_ops_htng_lock_tv_other_buttons(const struct cec_msg *msg, in cec_ops_htng_lock_tv_other_buttons() argument
535 *on = msg->msg[6]; in cec_ops_htng_lock_tv_other_buttons()
538 static inline void cec_msg_htng_lock_everything(struct cec_msg *msg, in cec_msg_htng_lock_everything() argument
541 cec_msg_htng_init(msg, CEC_MSG_HTNG_LOCK_EVERYTHING); in cec_msg_htng_lock_everything()
542 msg->msg[msg->len++] = on; in cec_msg_htng_lock_everything()
545 static inline void cec_ops_htng_lock_everything(const struct cec_msg *msg, in cec_ops_htng_lock_everything() argument
548 *on = msg->msg[6]; in cec_ops_htng_lock_everything()
551 static inline void cec_msg_htng_lock_everything_but_pwr(struct cec_msg *msg, in cec_msg_htng_lock_everything_but_pwr() argument
554 cec_msg_htng_init(msg, CEC_MSG_HTNG_LOCK_EVERYTHING_BUT_PWR); in cec_msg_htng_lock_everything_but_pwr()
555 msg->msg[msg->len++] = on; in cec_msg_htng_lock_everything_but_pwr()
558 static inline void cec_ops_htng_lock_everything_but_pwr(const struct cec_msg *msg, in cec_ops_htng_lock_everything_but_pwr() argument
561 *on = msg->msg[6]; in cec_ops_htng_lock_everything_but_pwr()
564 static inline void cec_msg_htng_hotel_mode(struct cec_msg *msg, in cec_msg_htng_hotel_mode() argument
567 cec_msg_htng_init(msg, CEC_MSG_HTNG_HOTEL_MODE); in cec_msg_htng_hotel_mode()
568 msg->msg[msg->len++] = on; in cec_msg_htng_hotel_mode()
569 msg->msg[msg->len++] = options; in cec_msg_htng_hotel_mode()
572 static inline void cec_ops_htng_hotel_mode(const struct cec_msg *msg, in cec_ops_htng_hotel_mode() argument
575 *on = msg->msg[6]; in cec_ops_htng_hotel_mode()
576 *options = msg->msg[7]; in cec_ops_htng_hotel_mode()
579 static inline void cec_msg_htng_set_pwr_saving_profile(struct cec_msg *msg, in cec_msg_htng_set_pwr_saving_profile() argument
582 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_PWR_SAVING_PROFILE); in cec_msg_htng_set_pwr_saving_profile()
583 msg->msg[msg->len++] = on; in cec_msg_htng_set_pwr_saving_profile()
584 msg->msg[msg->len++] = val; in cec_msg_htng_set_pwr_saving_profile()
587 static inline void cec_ops_htng_set_pwr_saving_profile(const struct cec_msg *msg, in cec_ops_htng_set_pwr_saving_profile() argument
590 *on = msg->msg[6]; in cec_ops_htng_set_pwr_saving_profile()
591 *val = msg->msg[7]; in cec_ops_htng_set_pwr_saving_profile()
594 static inline void cec_msg_htng_set_sleep_timer(struct cec_msg *msg, in cec_msg_htng_set_sleep_timer() argument
597 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_SLEEP_TIMER); in cec_msg_htng_set_sleep_timer()
598 msg->msg[msg->len++] = minutes; in cec_msg_htng_set_sleep_timer()
601 static inline void cec_ops_htng_set_sleep_timer(const struct cec_msg *msg, in cec_ops_htng_set_sleep_timer() argument
604 *minutes = msg->msg[6]; in cec_ops_htng_set_sleep_timer()
607 static inline void cec_msg_htng_set_wakeup_time(struct cec_msg *msg, in cec_msg_htng_set_wakeup_time() argument
610 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_WAKEUP_TIME); in cec_msg_htng_set_wakeup_time()
611 memcpy(msg->msg + 6, time, 4); in cec_msg_htng_set_wakeup_time()
612 msg->len += 4; in cec_msg_htng_set_wakeup_time()
615 static inline void cec_ops_htng_set_wakeup_time(const struct cec_msg *msg, in cec_ops_htng_set_wakeup_time() argument
618 memcpy(time, msg->msg + 6, 4); in cec_ops_htng_set_wakeup_time()
622 static inline void cec_msg_htng_set_auto_off_time(struct cec_msg *msg, in cec_msg_htng_set_auto_off_time() argument
625 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_AUTO_OFF_TIME); in cec_msg_htng_set_auto_off_time()
626 memcpy(msg->msg + 6, time, 4); in cec_msg_htng_set_auto_off_time()
627 msg->len += 4; in cec_msg_htng_set_auto_off_time()
630 static inline void cec_ops_htng_set_auto_off_time(const struct cec_msg *msg, in cec_ops_htng_set_auto_off_time() argument
633 memcpy(time, msg->msg + 6, 4); in cec_ops_htng_set_auto_off_time()
637 static inline void cec_msg_htng_set_wakeup_src(struct cec_msg *msg, in cec_msg_htng_set_wakeup_src() argument
643 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_WAKEUP_SRC); in cec_msg_htng_set_wakeup_src()
644 msg->msg[msg->len++] = htng_input_src; in cec_msg_htng_set_wakeup_src()
645 msg->msg[msg->len++] = htng_tuner_type; in cec_msg_htng_set_wakeup_src()
647 msg->msg[msg->len++] = major; in cec_msg_htng_set_wakeup_src()
648 msg->msg[msg->len++] = input >> 8; in cec_msg_htng_set_wakeup_src()
649 msg->msg[msg->len++] = input & 0xff; in cec_msg_htng_set_wakeup_src()
651 msg->msg[msg->len++] = 0; in cec_msg_htng_set_wakeup_src()
654 static inline void cec_ops_htng_set_wakeup_src(const struct cec_msg *msg, in cec_ops_htng_set_wakeup_src() argument
660 *htng_input_src = msg->msg[6]; in cec_ops_htng_set_wakeup_src()
661 *htng_tuner_type = msg->msg[7]; in cec_ops_htng_set_wakeup_src()
663 *major = msg->msg[8]; in cec_ops_htng_set_wakeup_src()
664 *input = (msg->msg[9] << 8) | msg->msg[10]; in cec_ops_htng_set_wakeup_src()
667 *input = (msg->msg[8] << 8) | msg->msg[9]; in cec_ops_htng_set_wakeup_src()
671 static inline void cec_msg_htng_set_init_wakeup_vol(struct cec_msg *msg, in cec_msg_htng_set_init_wakeup_vol() argument
675 cec_msg_htng_init(msg, CEC_MSG_HTNG_SET_INIT_WAKEUP_VOL); in cec_msg_htng_set_init_wakeup_vol()
676 msg->msg[msg->len++] = vol; in cec_msg_htng_set_init_wakeup_vol()
677 msg->msg[msg->len++] = minutes; in cec_msg_htng_set_init_wakeup_vol()
680 static inline void cec_ops_htng_set_init_wakeup_vol(const struct cec_msg *msg, in cec_ops_htng_set_init_wakeup_vol() argument
684 *vol = msg->msg[6]; in cec_ops_htng_set_init_wakeup_vol()
685 *minutes = msg->msg[7]; in cec_ops_htng_set_init_wakeup_vol()
688 static inline void cec_msg_htng_clr_all_sleep_wake(struct cec_msg *msg) in cec_msg_htng_clr_all_sleep_wake() argument
690 cec_msg_htng_init(msg, CEC_MSG_HTNG_CLR_ALL_SLEEP_WAKE); in cec_msg_htng_clr_all_sleep_wake()
693 static inline void cec_msg_htng_global_direct_tune_freq(struct cec_msg *msg, in cec_msg_htng_global_direct_tune_freq() argument
703 cec_msg_htng_init(msg, CEC_MSG_HTNG_GLOBAL_DIRECT_TUNE_FREQ); in cec_msg_htng_global_direct_tune_freq()
704 msg->msg[msg->len++] = (htng_chan_type & 7) | in cec_msg_htng_global_direct_tune_freq()
707 msg->msg[msg->len++] = freq >> 8; in cec_msg_htng_global_direct_tune_freq()
708 msg->msg[msg->len++] = freq & 0xff; in cec_msg_htng_global_direct_tune_freq()
709 msg->msg[msg->len++] = service_id >> 8; in cec_msg_htng_global_direct_tune_freq()
710 msg->msg[msg->len++] = service_id & 0xff; in cec_msg_htng_global_direct_tune_freq()
711 msg->msg[msg->len++] = (htng_mod_type & 0xf) | in cec_msg_htng_global_direct_tune_freq()
714 msg->msg[msg->len++] = symbol_rate >> 8; in cec_msg_htng_global_direct_tune_freq()
715 msg->msg[msg->len++] = symbol_rate & 0xff; in cec_msg_htng_global_direct_tune_freq()
719 static inline void cec_ops_htng_global_direct_tune_freq(const struct cec_msg *msg, in cec_ops_htng_global_direct_tune_freq() argument
729 *htng_chan_type = msg->msg[6] & 7; in cec_ops_htng_global_direct_tune_freq()
730 *htng_prog_type = (msg->msg[6] >> 3) & 1; in cec_ops_htng_global_direct_tune_freq()
731 *htng_system_type = (msg->msg[6] >> 4) & 0xf; in cec_ops_htng_global_direct_tune_freq()
732 *freq = (msg->msg[7] << 8) | msg->msg[8]; in cec_ops_htng_global_direct_tune_freq()
733 *service_id = (msg->msg[9] << 8) | msg->msg[10]; in cec_ops_htng_global_direct_tune_freq()
734 *htng_mod_type = msg->msg[11] & 0xf; in cec_ops_htng_global_direct_tune_freq()
735 *htng_symbol_rate = (msg->msg[11] >> 7) & 1; in cec_ops_htng_global_direct_tune_freq()
737 *symbol_rate = (msg->msg[12] << 8) | msg->msg[13]; in cec_ops_htng_global_direct_tune_freq()
742 static inline void cec_msg_htng_global_direct_tune_chan(struct cec_msg *msg, in cec_msg_htng_global_direct_tune_chan() argument
747 cec_msg_htng_init(msg, CEC_MSG_HTNG_GLOBAL_DIRECT_TUNE_CHAN); in cec_msg_htng_global_direct_tune_chan()
748 msg->msg[msg->len++] = (htng_chan_type & 7) | in cec_msg_htng_global_direct_tune_chan()
750 msg->msg[msg->len++] = chan >> 8; in cec_msg_htng_global_direct_tune_chan()
751 msg->msg[msg->len++] = chan & 0xff; in cec_msg_htng_global_direct_tune_chan()
754 static inline void cec_ops_htng_global_direct_tune_chan(const struct cec_msg *msg, in cec_ops_htng_global_direct_tune_chan() argument
759 *htng_chan_type = msg->msg[6] & 7; in cec_ops_htng_global_direct_tune_chan()
760 *htng_prog_type = (msg->msg[6] >> 3) & 1; in cec_ops_htng_global_direct_tune_chan()
761 *chan = (msg->msg[7] << 8) | msg->msg[8]; in cec_ops_htng_global_direct_tune_chan()
764 static inline void cec_msg_htng_global_direct_tune_ext_freq(struct cec_msg *msg, in cec_msg_htng_global_direct_tune_ext_freq() argument
780 cec_msg_htng_init(msg, CEC_MSG_HTNG_GLOBAL_DIRECT_TUNE_EXT_FREQ); in cec_msg_htng_global_direct_tune_ext_freq()
781 msg->msg[msg->len++] = (htng_ext_chan_type & 7) | in cec_msg_htng_global_direct_tune_ext_freq()
784 msg->msg[msg->len++] = freq >> 8; in cec_msg_htng_global_direct_tune_ext_freq()
785 msg->msg[msg->len++] = freq & 0xff; in cec_msg_htng_global_direct_tune_ext_freq()
786 msg->msg[msg->len++] = service_id >> 8; in cec_msg_htng_global_direct_tune_ext_freq()
787 msg->msg[msg->len++] = service_id & 0xff; in cec_msg_htng_global_direct_tune_ext_freq()
788 msg->msg[msg->len++] = (htng_mod_type & 0xf) | in cec_msg_htng_global_direct_tune_ext_freq()
794 msg->msg[msg->len++] = onid >> 8; in cec_msg_htng_global_direct_tune_ext_freq()
795 msg->msg[msg->len++] = onid & 0xff; in cec_msg_htng_global_direct_tune_ext_freq()
798 msg->msg[msg->len++] = nid >> 8; in cec_msg_htng_global_direct_tune_ext_freq()
799 msg->msg[msg->len++] = nid & 0xff; in cec_msg_htng_global_direct_tune_ext_freq()
801 if (msg->len < CEC_MAX_MSG_SIZE && in cec_msg_htng_global_direct_tune_ext_freq()
803 msg->msg[msg->len++] = tsid_plp >> 8; in cec_msg_htng_global_direct_tune_ext_freq()
804 msg->msg[msg->len++] = tsid_plp & 0xff; in cec_msg_htng_global_direct_tune_ext_freq()
806 if (msg->len < CEC_MAX_MSG_SIZE && in cec_msg_htng_global_direct_tune_ext_freq()
808 msg->msg[msg->len++] = symbol_rate >> 8; in cec_msg_htng_global_direct_tune_ext_freq()
809 msg->msg[msg->len++] = symbol_rate & 0xff; in cec_msg_htng_global_direct_tune_ext_freq()
813 static inline void cec_ops_htng_global_direct_tune_ext_freq(const struct cec_msg *msg, in cec_ops_htng_global_direct_tune_ext_freq() argument
831 *htng_ext_chan_type = msg->msg[6] & 7; in cec_ops_htng_global_direct_tune_ext_freq()
832 *htng_prog_type = (msg->msg[6] >> 3) & 1; in cec_ops_htng_global_direct_tune_ext_freq()
833 *htng_system_type = (msg->msg[6] >> 4) & 0xf; in cec_ops_htng_global_direct_tune_ext_freq()
834 *freq = (msg->msg[7] << 8) | msg->msg[8]; in cec_ops_htng_global_direct_tune_ext_freq()
835 *service_id = (msg->msg[9] << 8) | msg->msg[10]; in cec_ops_htng_global_direct_tune_ext_freq()
836 *htng_mod_type = msg->msg[11] & 0xf; in cec_ops_htng_global_direct_tune_ext_freq()
837 *htng_onid = (msg->msg[11] >> 4) & 1; in cec_ops_htng_global_direct_tune_ext_freq()
838 *htng_nid = (msg->msg[11] >> 5) & 1; in cec_ops_htng_global_direct_tune_ext_freq()
839 *htng_tsid_plp = (msg->msg[11] >> 6) & 1; in cec_ops_htng_global_direct_tune_ext_freq()
840 *htng_symbol_rate = (msg->msg[11] >> 7) & 1; in cec_ops_htng_global_direct_tune_ext_freq()
842 *onid = (msg->msg[offset] << 8) | msg->msg[offset + 1]; in cec_ops_htng_global_direct_tune_ext_freq()
848 *nid = (msg->msg[offset] << 8) | msg->msg[offset + 1]; in cec_ops_htng_global_direct_tune_ext_freq()
855 *tsid_plp = (msg->msg[offset] << 8) | msg->msg[offset + 1]; in cec_ops_htng_global_direct_tune_ext_freq()
862 *symbol_rate = (msg->msg[offset] << 8) | msg->msg[offset + 1]; in cec_ops_htng_global_direct_tune_ext_freq()