4 * This is part of the Driver for Video Capture Cards (Frame grabbers)
5 * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879
7 * Copyright Roger Hardiman and Amancio Hasty.
9 * bktr_tuner : This deals with controlling the tuner fitted to TV cards.
14 * SPDX-License-Identifier: BSD-4-Clause
16 * 1. Redistributions of source code must retain the
17 * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman
18 * All rights reserved.
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions
23 * 1. Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in the
27 * documentation and/or other materials provided with the distribution.
28 * 3. All advertising materials mentioning features or use of this software
29 * must display the following acknowledgement:
30 * This product includes software developed by Amancio Hasty and
32 * 4. The name of the author may not be used to endorse or promote products
33 * derived from this software without specific prior written permission.
35 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
36 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
37 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
39 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
40 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
41 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
43 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
44 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45 * POSSIBILITY OF SUCH DAMAGE.
48 /* Definitions for Tuners */
54 #define PHILIPS_NTSC 4
56 #define PHILIPS_SECAM 6
58 #define PHILIPS_PALI 8
59 #define PHILIPS_FR1236_NTSC 9 /* These have FM radio support */
60 #define PHILIPS_FR1216_PAL 10 /* These have FM radio support */
61 #define PHILIPS_FR1236_SECAM 11 /* These have FM radio support */
64 #define TUNER_MT2032 14
65 #define LG_TPI8PSB12P_PAL 15
66 #define PHILIPS_FI1216 16
67 #define Bt848_MAX_TUNER 17
69 /* experimental code for Automatic Frequency Control */
73 * Fill in the tuner entries in the bktr_softc based on the selected tuner
74 * type (from the list of tuners above)
76 void select_tuner( bktr_ptr_t bktr, int tuner_type );
79 * The Channel Set maps TV channels eg Ch 36, Ch 51, onto frequencies
80 * and is country specific.
82 int tuner_getchnlset( struct bktr_chnlset *chnlset );
85 * tv_channel sets the tuner to channel 'n' using the current Channel Set
86 * tv_freq sets the tuner to a specific frequency for TV or for FM Radio
87 * get_tuner_status can be used to get the signal strength.
89 #define TV_FREQUENCY 0
90 #define FM_RADIO_FREQUENCY 1
91 int tv_channel( bktr_ptr_t bktr, int channel );
92 int tv_freq( bktr_ptr_t bktr, int frequency, int type );
93 int get_tuner_status( bktr_ptr_t bktr );
95 #if defined( TUNER_AFC )
96 int do_afc( bktr_ptr_t bktr, int addr, int frequency );
97 #endif /* TUNER_AFC */
99 int mt2032_init(bktr_ptr_t bktr);
102 * This is for start-up convenience only, NOT mandatory.
104 #if !defined( DEFAULT_CHNLSET )
105 #define DEFAULT_CHNLSET CHNLSET_WEUROPE