Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / pci / bktr / bktr_tuner.h
blobd1de0e8aa675963cb6b02fecd12f65f33f7e12ee
1 /* $SourceForge: bktr_tuner.h,v 1.3 2003/03/11 23:11:28 thomasklausner Exp $ */
3 /* $NetBSD: bktr_tuner.h,v 1.1.1.2 2003/03/12 00:02:40 wiz Exp $ */
4 /* $FreeBSD: src/sys/dev/bktr/bktr_tuner.h,v 1.1 1999/09/26 22:06:20 roger Exp$ */
6 /*
7 * This is part of the Driver for Video Capture Cards (Frame grabbers)
8 * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879
9 * chipset.
10 * Copyright Roger Hardiman and Amancio Hasty.
12 * bktr_tuner : This deals with controlling the tuner fitted to TV cards.
17 * 1. Redistributions of source code must retain the
18 * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman
19 * All rights reserved.
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. All advertising materials mentioning features or use of this software
30 * must display the following acknowledgement:
31 * This product includes software developed by Amancio Hasty and
32 * Roger Hardiman
33 * 4. The name of the author may not be used to endorse or promote products
34 * derived from this software without specific prior written permission.
36 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
37 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
40 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
41 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
42 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
44 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
45 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46 * POSSIBILITY OF SUCH DAMAGE.
49 /* Definitions for Tuners */
51 #define NO_TUNER 0
52 #define TEMIC_NTSC 1
53 #define TEMIC_PAL 2
54 #define TEMIC_SECAM 3
55 #define PHILIPS_NTSC 4
56 #define PHILIPS_PAL 5
57 #define PHILIPS_SECAM 6
58 #define TEMIC_PALI 7
59 #define PHILIPS_PALI 8
60 #define PHILIPS_FR1236_NTSC 9 /* These have FM radio support */
61 #define PHILIPS_FR1216_PAL 10 /* These have FM radio support */
62 #define PHILIPS_FR1236_SECAM 11 /* These have FM radio support */
63 #define ALPS_TSCH5 12
64 #define ALPS_TSBH1 13
65 #define Bt848_MAX_TUNER 14
67 /* experimental code for Automatic Frequency Control */
68 #define TUNER_AFC
71 * Fill in the tuner entries in the bktr_softc based on the selected tuner
72 * type (from the list of tuners above)
74 void select_tuner(bktr_ptr_t bktr, int tuner_type);
78 * The Channel Set maps TV channels eg Ch 36, Ch 51, onto frequencies
79 * and is country specific.
81 int tuner_getchnlset(struct bktr_chnlset *chnlset);
84 * tv_channel sets the tuner to channel 'n' using the current Channel Set
85 * tv_freq sets the tuner to a specific frequency for TV or for FM Radio
86 * get_tuner_status can be used to get the signal strength.
88 #define TV_FREQUENCY 0
89 #define FM_RADIO_FREQUENCY 1
90 int tv_channel(bktr_ptr_t bktr, int channel);
91 int tv_freq(bktr_ptr_t bktr, int frequency, int type);
92 int get_tuner_status(bktr_ptr_t bktr);
94 #if defined(TUNER_AFC)
95 int do_afc(bktr_ptr_t bktr, int addr, int frequency);
96 #endif /* TUNER_AFC */
100 * This is for start-up convenience only, NOT mandatory.
102 #if !defined(DEFAULT_CHNLSET)
103 #define DEFAULT_CHNLSET CHNLSET_WEUROPE
104 #endif