diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 17:39:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 17:39:09 -0400 |
commit | e317234975cb7463b8ca21a93bb6862d9dcf113f (patch) | |
tree | 4446fa3a21364f3cba23a22aa2a94027f169d8df /drivers/media/radio/radio-isa.h | |
parent | f37ab0fba271e43edab0e3ae9fe644fcda455402 (diff) | |
parent | 7483d45f0aee3afc0646d185cabd4af9f6cab58c (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- V4L2 API additions to better support JPEG compression control
- media API additions to properly support MPEG decoders
- V4L2 API additions for image crop/scaling
- a few other V4L2 API DocBook fixes/improvements
- two new DVB frontend drivers: m88rs2000 and rtl2830
- two new DVB drivers: az6007 and rtl28xxu
- a framework for ISA drivers, that removed lots of common code found
at the ISA radio drivers
- a new FM transmitter driver (radio-keene)
- a GPIO-based IR receiver driver
- a new sensor driver: mt9m032
- some new video drivers: adv7183, blackfin, mx2_emmaprp, sii9234_drv,
vs6624
- several new board additions, driver fixes, improvements and cleanups.
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (295 commits)
[media] update CARDLIST.em28xx
[media] partially reverts changeset fa5527c
[media] stb0899: fix the limits for signal strength values
[media] em28xx: support for 2304:0242 PCTV QuatroStick (510e)
[media] em28xx: support for 2013:0251 PCTV QuatroStick nano (520e)
[media] -EINVAL -> -ENOTTY
[media] gspca - sn9c20x: Cleanup source
[media] gspca - sn9c20x: Simplify register write for capture start/stop
[media] gspca - sn9c20x: Add automatic JPEG compression mechanism
[media] gspca - sn9c20x: Greater delay in case of sensor no response
[media] gspca - sn9c20x: Optimize the code of write sequences
[media] gspca - sn9c20x: Add the JPEG compression quality control
[media] gspca - sn9c20x: Add a delay after Omnivision sensor reset
[media] gspca - sn9c20x: Propagate USB errors to higher level
[media] gspca - sn9c20x: Use the new video control mechanism
[media] gspca - sn9c20x: Fix loss of frame start
[media] gspca - zc3xx: Lack of register 08 value for sensor cs2102k
[media] gspca - ov534_9: Add brightness to OmniVision 5621 sensor
[media] gspca - zc3xx: Add V4L2_CID_JPEG_COMPRESSION_QUALITY control support
[media] pvrusb2: fix 7MHz & 8MHz DVB-T tuner support for HVR1900 rev D1F5
...
Diffstat (limited to 'drivers/media/radio/radio-isa.h')
-rw-r--r-- | drivers/media/radio/radio-isa.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-isa.h b/drivers/media/radio/radio-isa.h new file mode 100644 index 000000000000..8a0ea84d86de --- /dev/null +++ b/drivers/media/radio/radio-isa.h | |||
@@ -0,0 +1,105 @@ | |||
1 | /* | ||
2 | * Framework for ISA radio drivers. | ||
3 | * This takes care of all the V4L2 scaffolding, allowing the ISA drivers | ||
4 | * to concentrate on the actual hardware operation. | ||
5 | * | ||
6 | * Copyright (C) 2012 Hans Verkuil <hans.verkuil@cisco.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
20 | * 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef _RADIO_ISA_H_ | ||
24 | #define _RADIO_ISA_H_ | ||
25 | |||
26 | #include <linux/isa.h> | ||
27 | #include <linux/videodev2.h> | ||
28 | #include <media/v4l2-device.h> | ||
29 | #include <media/v4l2-ctrls.h> | ||
30 | |||
31 | struct radio_isa_driver; | ||
32 | struct radio_isa_ops; | ||
33 | |||
34 | /* Core structure for radio ISA cards */ | ||
35 | struct radio_isa_card { | ||
36 | const struct radio_isa_driver *drv; | ||
37 | struct v4l2_device v4l2_dev; | ||
38 | struct v4l2_ctrl_handler hdl; | ||
39 | struct video_device vdev; | ||
40 | struct mutex lock; | ||
41 | const struct radio_isa_ops *ops; | ||
42 | struct { /* mute/volume cluster */ | ||
43 | struct v4l2_ctrl *mute; | ||
44 | struct v4l2_ctrl *volume; | ||
45 | }; | ||
46 | /* I/O port */ | ||
47 | int io; | ||
48 | |||
49 | /* Card is in stereo audio mode */ | ||
50 | bool stereo; | ||
51 | /* Current frequency */ | ||
52 | u32 freq; | ||
53 | }; | ||
54 | |||
55 | struct radio_isa_ops { | ||
56 | /* Allocate and initialize a radio_isa_card struct */ | ||
57 | struct radio_isa_card *(*alloc)(void); | ||
58 | /* Probe whether a card is present at the given port */ | ||
59 | bool (*probe)(struct radio_isa_card *isa, int io); | ||
60 | /* Special card initialization can be done here, this is called after | ||
61 | * the standard controls are registered, but before they are setup, | ||
62 | * thus allowing drivers to add their own controls here. */ | ||
63 | int (*init)(struct radio_isa_card *isa); | ||
64 | /* Set mute and volume. */ | ||
65 | int (*s_mute_volume)(struct radio_isa_card *isa, bool mute, int volume); | ||
66 | /* Set frequency */ | ||
67 | int (*s_frequency)(struct radio_isa_card *isa, u32 freq); | ||
68 | /* Set stereo/mono audio mode */ | ||
69 | int (*s_stereo)(struct radio_isa_card *isa, bool stereo); | ||
70 | /* Get rxsubchans value for VIDIOC_G_TUNER */ | ||
71 | u32 (*g_rxsubchans)(struct radio_isa_card *isa); | ||
72 | /* Get the signal strength for VIDIOC_G_TUNER */ | ||
73 | u32 (*g_signal)(struct radio_isa_card *isa); | ||
74 | }; | ||
75 | |||
76 | /* Top level structure needed to instantiate the cards */ | ||
77 | struct radio_isa_driver { | ||
78 | struct isa_driver driver; | ||
79 | const struct radio_isa_ops *ops; | ||
80 | /* The module_param_array with the specified I/O ports */ | ||
81 | int *io_params; | ||
82 | /* The module_param_array with the radio_nr values */ | ||
83 | int *radio_nr_params; | ||
84 | /* Whether we should probe for possible cards */ | ||
85 | bool probe; | ||
86 | /* The list of possible I/O ports */ | ||
87 | const int *io_ports; | ||
88 | /* The size of that list */ | ||
89 | int num_of_io_ports; | ||
90 | /* The region size to request */ | ||
91 | unsigned region_size; | ||
92 | /* The name of the card */ | ||
93 | const char *card; | ||
94 | /* Card can capture stereo audio */ | ||
95 | bool has_stereo; | ||
96 | /* The maximum volume for the volume control. If 0, then there | ||
97 | is no volume control possible. */ | ||
98 | int max_volume; | ||
99 | }; | ||
100 | |||
101 | int radio_isa_match(struct device *pdev, unsigned int dev); | ||
102 | int radio_isa_probe(struct device *pdev, unsigned int dev); | ||
103 | int radio_isa_remove(struct device *pdev, unsigned int dev); | ||
104 | |||
105 | #endif | ||