/*
* Driver for the NXP SAA7164 PCIe bridge
*
* Copyright (c) 2010 Steven Toth <stoth@kernellabs.com>
*
* 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, or
* (at your option) any later version.
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "saa7164.h"
static struct saa7164_tvnorm saa7164_tvnorms[] = {
{
.name = "NTSC-M",
.id = V4L2_STD_NTSC_M,
}, {
.name = "NTSC-JP",
.id = V4L2_STD_NTSC_M_JP,
}
};
static const u32 saa7164_v4l2_ctrls[] = {
0
};
/* Take the encoder configuration from the port struct and
* flush it to the hardware.
*/
static void saa7164_vbi_configure(struct saa7164_port *port)
{
struct saa7164_dev *dev = port->dev;
dprintk(DBGLVL_VBI, "%s()\n", __func__);
port->vbi_params.width = port->width;
port->vbi_params.height = port->height;
port->vbi_params.is_50hz =
(port->encodernorm.id & V4L2_STD_625_50) != 0;
/* Set up the DIF (enable it) for analog mode by default */
saa7164_api_initialize_dif(port);
/* Configure the correct video standard */
#if 0
saa7164_api_configure_dif(port, port->encodernorm.id);
#endif
#if 0
/* Ensure the audio decoder is correct configured */
saa7164_api_set_audio_std(port);
#endif
dprintk(DBGLVL_VBI, "%s() ends\n", __func__);
}
static int saa7164_vbi_buffers_dealloc(struct saa7164_port *port)
{
struct list_head *c, *n, *p, *q, *l, *v;
struct saa7164_dev *dev = port->dev;
struct saa7164_buffer *buf;
struct saa7164_user_buffer