275b2e283b
This is the logic that supports switching modes via e.g., echo radio > /sys/class/pvrusb2/sn-*/ctl_input/cur_val. To do the mode switching we need to: a) broadcast AUDC_SET_RADIO and b) issue the CX2341X_ENC_MUTE_VIDEO command to the encoder. The first is done by adding a new pvr2_i2c_op and having it trigger on input change, the second by adding this command in pvr2_encoder_start() and requesting an encoder restart on input change by setting stale_subsys_mask appropriately. The clues about AUDC_SET_RADIO and CX2341X_ENC_MUTE_VIDEO were kindly provided by Hans Verkuil on the pvrusb2 mailing list. The idea to implement mode switching this way (on input change) is due to Mike Isely. Why AUDC_SET_RADIO/VIDIOC_S_STD are used for switching? I can 't be sure, but I think this can be traced to a cornell student being the first to implement radio support in ivtv "as a different standard". I think the rest just evolved from there (it 's in the ivtv ML archives). Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
49 lines
1.6 KiB
C
49 lines
1.6 KiB
C
/*
|
|
*
|
|
* $Id$
|
|
*
|
|
* Copyright (C) 2005 Mike Isely <isely@pobox.com>
|
|
* Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
*/
|
|
|
|
#ifndef __PVRUSB2_CMD_V4L2_H
|
|
#define __PVRUSB2_CMD_V4L2_H
|
|
|
|
#include "pvrusb2-i2c-core.h"
|
|
|
|
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_standard;
|
|
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_radio;
|
|
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_bcsh;
|
|
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_volume;
|
|
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_frequency;
|
|
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_size;
|
|
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_log;
|
|
|
|
void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *,int);
|
|
|
|
#endif /* __PVRUSB2_CMD_V4L2_H */
|
|
|
|
/*
|
|
Stuff for Emacs to see, in order to encourage consistent editing style:
|
|
*** Local Variables: ***
|
|
*** mode: c ***
|
|
*** fill-column: 70 ***
|
|
*** tab-width: 8 ***
|
|
*** c-basic-offset: 8 ***
|
|
*** End: ***
|
|
*/
|