mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (348 commits) [media] pctv452e: Remove bogus code [media] adv7175: Make use of media bus pixel codes [media] media: vb2: fix incorrect return value [media] em28xx: implement VIDIOC_ENUM_FRAMESIZES [media] cx23885: Stop the risc video fifo before reconfiguring it [media] cx23885: Avoid incorrect error handling and reporting [media] cx23885: Avoid stopping the risc engine during buffer timeout [media] cx23885: Removed a spurious function cx23885_set_scale() [media] cx23885: v4l2 api compliance, set the audioset field correctly [media] cx23885: hook the audio selection functions into the main driver [media] cx23885: add generic functions for dealing with audio input selection [media] cx23885: fixes related to maximum number of inputs and range checking [media] cx23885: Initial support for the MPX-885 mini-card [media] cx25840: Ensure AUDIO6 and AUDIO7 trigger line-in baseband use [media] cx23885: Enable audio line in support from the back panel [media] cx23885: Allow the audio mux config to be specified on a per input basis [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputs [media] cx23885: Name an internal i2c part and declare a bitfield by name [media] cx23885: Ensure VBI buffers timeout quickly - bugfix for vbi hangs during streaming [media] cx23885: remove channel dump diagnostics when a vbi buffer times out ... Fix up trivial conflicts in drivers/misc/altera-stapl/altera.c (header file rename vs add)
This commit is contained in:
@@ -352,6 +352,7 @@ typedef enum fe_delivery_system {
|
||||
SYS_CMMB,
|
||||
SYS_DAB,
|
||||
SYS_DVBT2,
|
||||
SYS_TURBO,
|
||||
} fe_delivery_system_t;
|
||||
</programlisting>
|
||||
</section>
|
||||
@@ -809,6 +810,8 @@ typedef enum fe_hierarchy {
|
||||
<listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-SYMBOL-RATE"><constant>DTV_SYMBOL_RATE</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem>
|
||||
</itemizedlist>
|
||||
<para>Future implementations might add those two missing parameters:</para>
|
||||
<itemizedlist mark='opencircle'>
|
||||
@@ -818,25 +821,18 @@ typedef enum fe_hierarchy {
|
||||
</section>
|
||||
<section id="dvbs2-params">
|
||||
<title>DVB-S2 delivery system</title>
|
||||
<para>The following parameters are valid for DVB-S2:</para>
|
||||
<para>In addition to all parameters valid for DVB-S, DVB-S2 supports the following parameters:</para>
|
||||
<itemizedlist mark='opencircle'>
|
||||
<listitem><para><link linkend="DTV-API-VERSION"><constant>DTV_API_VERSION</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-DELIVERY-SYSTEM"><constant>DTV_DELIVERY_SYSTEM</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-TUNE"><constant>DTV_TUNE</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-CLEAR"><constant>DTV_CLEAR</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-FREQUENCY"><constant>DTV_FREQUENCY</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-SYMBOL-RATE"><constant>DTV_SYMBOL_RATE</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-PILOT"><constant>DTV_PILOT</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-ROLLOFF"><constant>DTV_ROLLOFF</constant></link></para></listitem>
|
||||
</itemizedlist>
|
||||
<para>Future implementations might add those two missing parameters:</para>
|
||||
</section>
|
||||
<section id="turbo-params">
|
||||
<title>Turbo code delivery system</title>
|
||||
<para>In addition to all parameters valid for DVB-S, turbo code supports the following parameters:</para>
|
||||
<itemizedlist mark='opencircle'>
|
||||
<listitem><para><link linkend="DTV-DISEQC-MASTER"><constant>DTV_DISEQC_MASTER</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-DISEQC-SLAVE-REPLY"><constant>DTV_DISEQC_SLAVE_REPLY</constant></link></para></listitem>
|
||||
<listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id="isdbs-params">
|
||||
|
||||
@@ -205,7 +205,7 @@ a partial path like:</para>
|
||||
additional include file <emphasis
|
||||
role="tt">linux/dvb/version.h</emphasis> exists, which defines the
|
||||
constant <emphasis role="tt">DVB_API_VERSION</emphasis>. This document
|
||||
describes <emphasis role="tt">DVB_API_VERSION 3</emphasis>.
|
||||
describes <emphasis role="tt">DVB_API_VERSION 5.4</emphasis>.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
@@ -2370,6 +2370,14 @@ that used it. It was originally scheduled for removal in 2.6.35.
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
<section>
|
||||
<title>V4L2 in Linux 3.2</title>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>V4L2_CTRL_FLAG_VOLATILE was added to signal volatile controls to userspace.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
|
||||
<section id="other">
|
||||
<title>Relation of V4L2 to other Linux multimedia APIs</title>
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
|
||||
<para>When satisfied with the try results, applications can set the active
|
||||
formats by setting the <structfield>which</structfield> argument to
|
||||
<constant>V4L2_SUBDEV_FORMAT_TRY</constant>. Active formats are changed
|
||||
<constant>V4L2_SUBDEV_FORMAT_ACTIVE</constant>. Active formats are changed
|
||||
exactly as try formats by drivers. To avoid modifying the hardware state
|
||||
during format negotiation, applications should negotiate try formats first
|
||||
and then modify the active settings using the try formats returned during
|
||||
|
||||
@@ -127,6 +127,13 @@ structs, ioctls) must be noted in more detail in the history chapter
|
||||
(compat.xml), along with the possible impact on existing drivers and
|
||||
applications. -->
|
||||
|
||||
<revision>
|
||||
<revnumber>3.2</revnumber>
|
||||
<date>2011-08-26</date>
|
||||
<authorinitials>hv</authorinitials>
|
||||
<revremark>Added V4L2_CTRL_FLAG_VOLATILE.</revremark>
|
||||
</revision>
|
||||
|
||||
<revision>
|
||||
<revnumber>3.1</revnumber>
|
||||
<date>2011-06-27</date>
|
||||
@@ -410,7 +417,7 @@ and discussions on the V4L mailing list.</revremark>
|
||||
</partinfo>
|
||||
|
||||
<title>Video for Linux Two API Specification</title>
|
||||
<subtitle>Revision 3.1</subtitle>
|
||||
<subtitle>Revision 3.2</subtitle>
|
||||
|
||||
<chapter id="common">
|
||||
&sub-common;
|
||||
|
||||
@@ -86,6 +86,12 @@
|
||||
<entry>Event data for event V4L2_EVENT_CTRL.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry></entry>
|
||||
<entry>&v4l2-event-frame-sync;</entry>
|
||||
<entry><structfield>frame</structfield></entry>
|
||||
<entry>Event data for event V4L2_EVENT_FRAME_SYNC.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry></entry>
|
||||
<entry>__u8</entry>
|
||||
@@ -135,6 +141,129 @@
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table frame="none" pgwide="1" id="v4l2-event-vsync">
|
||||
<title>struct <structname>v4l2_event_vsync</structname></title>
|
||||
<tgroup cols="3">
|
||||
&cs-str;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry>__u8</entry>
|
||||
<entry><structfield>field</structfield></entry>
|
||||
<entry>The upcoming field. See &v4l2-field;.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table frame="none" pgwide="1" id="v4l2-event-ctrl">
|
||||
<title>struct <structname>v4l2_event_ctrl</structname></title>
|
||||
<tgroup cols="4">
|
||||
&cs-str;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>changes</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>A bitmask that tells what has changed. See <xref linkend="changes-flags" />.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>type</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The type of the control. See &v4l2-ctrl-type;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>union (anonymous)</entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry></entry>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>value</structfield></entry>
|
||||
<entry>The 32-bit value of the control for 32-bit control types.
|
||||
This is 0 for string controls since the value of a string
|
||||
cannot be passed using &VIDIOC-DQEVENT;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry></entry>
|
||||
<entry>__s64</entry>
|
||||
<entry><structfield>value64</structfield></entry>
|
||||
<entry>The 64-bit value of the control for 64-bit control types.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>flags</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The control flags. See <xref linkend="control-flags" />.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>minimum</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The minimum value of the control. See &v4l2-queryctrl;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>maximum</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The maximum value of the control. See &v4l2-queryctrl;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>step</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The step value of the control. See &v4l2-queryctrl;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>default_value</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The default value value of the control. See &v4l2-queryctrl;.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table frame="none" pgwide="1" id="v4l2-event-frame-sync">
|
||||
<title>struct <structname>v4l2_event_frame_sync</structname></title>
|
||||
<tgroup cols="3">
|
||||
&cs-str;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>frame_sequence</structfield></entry>
|
||||
<entry>
|
||||
The sequence number of the frame being received.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table pgwide="1" frame="none" id="changes-flags">
|
||||
<title>Changes</title>
|
||||
<tgroup cols="3">
|
||||
&cs-def;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_CTRL_CH_VALUE</constant></entry>
|
||||
<entry>0x0001</entry>
|
||||
<entry>This control event was triggered because the value of the control
|
||||
changed. Special case: if a button control is pressed, then this
|
||||
event is sent as well, even though there is not explicit value
|
||||
associated with a button control.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_CTRL_CH_FLAGS</constant></entry>
|
||||
<entry>0x0002</entry>
|
||||
<entry>This control event was triggered because the control flags
|
||||
changed.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
&return-value;
|
||||
|
||||
@@ -406,6 +406,15 @@ flag is typically present for relative controls or action controls where
|
||||
writing a value will cause the device to carry out a given action
|
||||
(⪚ motor control) but no meaningful value can be returned.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_CTRL_FLAG_VOLATILE</constant></entry>
|
||||
<entry>0x0080</entry>
|
||||
<entry>This control is volatile, which means that the value of the control
|
||||
changes continuously. A typical example would be the current gain value if the device
|
||||
is in auto-gain mode. In such a case the hardware calculates the gain value based on
|
||||
the lighting conditions which can change over time. Note that setting a new value for
|
||||
a volatile control will have no effect. The new value will just be ignored.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
@@ -138,6 +138,22 @@
|
||||
field of the oldest event.</para>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_FRAME_SYNC</constant></entry>
|
||||
<entry>4</entry>
|
||||
<entry>
|
||||
<para>Triggered immediately when the reception of a
|
||||
frame has begun. This event has a
|
||||
&v4l2-event-frame-sync; associated with it.</para>
|
||||
|
||||
<para>If the hardware needs to be stopped in the case of a
|
||||
buffer underrun it might not be able to generate this event.
|
||||
In such cases the <structfield>frame_sequence</structfield>
|
||||
field in &v4l2-event-frame-sync; will not be incremented. This
|
||||
causes two consecutive frame sequence numbers to have n times
|
||||
frame interval in between them.</para>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry>
|
||||
<entry>0x08000000</entry>
|
||||
@@ -183,113 +199,6 @@
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table frame="none" pgwide="1" id="v4l2-event-vsync">
|
||||
<title>struct <structname>v4l2_event_vsync</structname></title>
|
||||
<tgroup cols="3">
|
||||
&cs-str;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry>__u8</entry>
|
||||
<entry><structfield>field</structfield></entry>
|
||||
<entry>The upcoming field. See &v4l2-field;.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table frame="none" pgwide="1" id="v4l2-event-ctrl">
|
||||
<title>struct <structname>v4l2_event_ctrl</structname></title>
|
||||
<tgroup cols="4">
|
||||
&cs-str;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>changes</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>A bitmask that tells what has changed. See <xref linkend="changes-flags" />.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>type</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The type of the control. See &v4l2-ctrl-type;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>union (anonymous)</entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry></entry>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>value</structfield></entry>
|
||||
<entry>The 32-bit value of the control for 32-bit control types.
|
||||
This is 0 for string controls since the value of a string
|
||||
cannot be passed using &VIDIOC-DQEVENT;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry></entry>
|
||||
<entry>__s64</entry>
|
||||
<entry><structfield>value64</structfield></entry>
|
||||
<entry>The 64-bit value of the control for 64-bit control types.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>flags</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The control flags. See <xref linkend="control-flags" />.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>minimum</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The minimum value of the control. See &v4l2-queryctrl;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>maximum</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The maximum value of the control. See &v4l2-queryctrl;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>step</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The step value of the control. See &v4l2-queryctrl;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__s32</entry>
|
||||
<entry><structfield>default_value</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>The default value value of the control. See &v4l2-queryctrl;.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table pgwide="1" frame="none" id="changes-flags">
|
||||
<title>Changes</title>
|
||||
<tgroup cols="3">
|
||||
&cs-def;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_CTRL_CH_VALUE</constant></entry>
|
||||
<entry>0x0001</entry>
|
||||
<entry>This control event was triggered because the value of the control
|
||||
changed. Special case: if a button control is pressed, then this
|
||||
event is sent as well, even though there is not explicit value
|
||||
associated with a button control.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_CTRL_CH_FLAGS</constant></entry>
|
||||
<entry>0x0002</entry>
|
||||
<entry>This control event was triggered because the control flags
|
||||
changed.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
&return-value;
|
||||
|
||||
@@ -27,7 +27,8 @@ use IO::Handle;
|
||||
"or51211", "or51132_qam", "or51132_vsb", "bluebird",
|
||||
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
|
||||
"af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395",
|
||||
"lme2510c_s7395_old", "drxk", "drxk_terratec_h5");
|
||||
"lme2510c_s7395_old", "drxk", "drxk_terratec_h5", "tda10071",
|
||||
"it9135" );
|
||||
|
||||
# Check args
|
||||
syntax() if (scalar(@ARGV) != 1);
|
||||
@@ -575,19 +576,10 @@ sub ngene {
|
||||
}
|
||||
|
||||
sub az6027{
|
||||
my $file = "AZ6027_Linux_Driver.tar.gz";
|
||||
my $url = "http://linux.terratec.de/files/$file";
|
||||
my $firmware = "dvb-usb-az6027-03.fw";
|
||||
my $url = "http://linux.terratec.de/files/TERRATEC_S7/$firmware";
|
||||
|
||||
wgetfile($file, $url);
|
||||
|
||||
#untar
|
||||
if( system("tar xzvf $file $firmware")){
|
||||
die "failed to untar firmware";
|
||||
}
|
||||
if( system("rm $file")){
|
||||
die ("unable to remove unnecessary files");
|
||||
}
|
||||
wgetfile($firmware, $url);
|
||||
|
||||
$firmware;
|
||||
}
|
||||
@@ -665,6 +657,41 @@ sub drxk_terratec_h5 {
|
||||
"$fwfile"
|
||||
}
|
||||
|
||||
sub it9135 {
|
||||
my $url = "http://kworld.server261.com/kworld/CD/ITE_TiVme/V1.00/";
|
||||
my $zipfile = "Driver_V10.323.1.0412.100412.zip";
|
||||
my $hash = "79b597dc648698ed6820845c0c9d0d37";
|
||||
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0);
|
||||
my $drvfile = "Driver_V10.323.1.0412.100412/Data/x86/IT9135BDA.sys";
|
||||
my $fwfile = "dvb-usb-it9137-01.fw";
|
||||
|
||||
checkstandard();
|
||||
|
||||
wgetfile($zipfile, $url . $zipfile);
|
||||
verify($zipfile, $hash);
|
||||
unzip($zipfile, $tmpdir);
|
||||
extract("$tmpdir/$drvfile", 69632, 5731, "$fwfile");
|
||||
|
||||
"$fwfile"
|
||||
}
|
||||
|
||||
sub tda10071 {
|
||||
my $sourcefile = "PCTV_460e_reference.zip";
|
||||
my $url = "ftp://ftp.pctvsystems.com/TV/driver/PCTV%2070e%2080e%20100e%20320e%20330e%20800e/";
|
||||
my $hash = "4403de903bf2593464c8d74bbc200a57";
|
||||
my $fwfile = "dvb-fe-tda10071.fw";
|
||||
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
|
||||
|
||||
checkstandard();
|
||||
|
||||
wgetfile($sourcefile, $url . $sourcefile);
|
||||
verify($sourcefile, $hash);
|
||||
unzip($sourcefile, $tmpdir);
|
||||
extract("$tmpdir/PCTV\ 70e\ 80e\ 100e\ 320e\ 330e\ 800e/32\ bit/emOEM.sys", 0x67d38, 40504, $fwfile);
|
||||
|
||||
"$fwfile";
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Utilities
|
||||
|
||||
|
||||
9
Documentation/dvb/it9137.txt
Normal file
9
Documentation/dvb/it9137.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
To extract firmware for Kworld UB499-2T (id 1b80:e409) you need to copy the
|
||||
following file(s) to this directory.
|
||||
|
||||
IT9135BDA.sys Dated Mon 22 Mar 2010 02:20:08 GMT
|
||||
|
||||
extract using dd
|
||||
dd if=IT9135BDA.sys ibs=1 skip=69632 count=5731 of=dvb-usb-it9137-01.fw
|
||||
|
||||
copy to default firmware location.
|
||||
@@ -495,29 +495,6 @@ Who: Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: Support for UVCIOC_CTRL_ADD in the uvcvideo driver
|
||||
When: 3.2
|
||||
Why: The information passed to the driver by this ioctl is now queried
|
||||
dynamically from the device.
|
||||
Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: Support for UVCIOC_CTRL_MAP_OLD in the uvcvideo driver
|
||||
When: 3.2
|
||||
Why: Used only by applications compiled against older driver versions.
|
||||
Superseded by UVCIOC_CTRL_MAP which supports V4L2 menu controls.
|
||||
Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: Support for UVCIOC_CTRL_GET and UVCIOC_CTRL_SET in the uvcvideo driver
|
||||
When: 3.2
|
||||
Why: Superseded by the UVCIOC_CTRL_QUERY ioctl.
|
||||
Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: Support for driver specific ioctls in the pwc driver (everything
|
||||
defined in media/pwc-ioctl.h)
|
||||
When: 3.3
|
||||
|
||||
@@ -8,6 +8,7 @@ xxxx vend:prod
|
||||
----
|
||||
spca501 0000:0000 MystFromOri Unknown Camera
|
||||
spca508 0130:0130 Clone Digital Webcam 11043
|
||||
zc3xx 03f0:1b07 HP Premium Starter Cam
|
||||
m5602 0402:5602 ALi Video Camera Controller
|
||||
spca501 040a:0002 Kodak DVC-325
|
||||
spca500 040a:0300 Kodak EZ200
|
||||
@@ -190,6 +191,7 @@ ov519 05a9:0519 OV519 Microphone
|
||||
ov519 05a9:0530 OmniVision
|
||||
ov519 05a9:2800 OmniVision SuperCAM
|
||||
ov519 05a9:4519 Webcam Classic
|
||||
ov534_9 05a9:8065 OmniVision test kit ov538+ov9712
|
||||
ov519 05a9:8519 OmniVision
|
||||
ov519 05a9:a511 D-Link USB Digital Video Camera
|
||||
ov519 05a9:a518 D-Link DSB-C310 Webcam
|
||||
@@ -199,6 +201,8 @@ gl860 05e3:0503 Genesys Logic PC Camera
|
||||
gl860 05e3:f191 Genesys Logic PC Camera
|
||||
spca561 060b:a001 Maxell Compact Pc PM3
|
||||
zc3xx 0698:2003 CTX M730V built in
|
||||
topro 06a2:0003 TP6800 PC Camera, CmoX CX0342 webcam
|
||||
topro 06a2:6810 Creative Qmax
|
||||
nw80x 06a5:0000 Typhoon Webcam 100 USB
|
||||
nw80x 06a5:d001 Divio based webcams
|
||||
nw80x 06a5:d800 Divio Chicony TwinkleCam, Trust SpaceCam
|
||||
|
||||
@@ -70,10 +70,11 @@ Events
|
||||
The OMAP 3 ISP driver does support the V4L2 event interface on CCDC and
|
||||
statistics (AEWB, AF and histogram) subdevs.
|
||||
|
||||
The CCDC subdev produces V4L2_EVENT_OMAP3ISP_HS_VS type event on HS_VS
|
||||
interrupt which is used to signal frame start. The event is triggered exactly
|
||||
when the reception of the first line of the frame starts in the CCDC module.
|
||||
The event can be subscribed on the CCDC subdev.
|
||||
The CCDC subdev produces V4L2_EVENT_FRAME_SYNC type event on HS_VS
|
||||
interrupt which is used to signal frame start. Earlier version of this
|
||||
driver used V4L2_EVENT_OMAP3ISP_HS_VS for this purpose. The event is
|
||||
triggered exactly when the reception of the first line of the frame starts
|
||||
in the CCDC module. The event can be subscribed on the CCDC subdev.
|
||||
|
||||
(When using parallel interface one must pay account to correct configuration
|
||||
of the VS signal polarity. This is automatically correct when using the serial
|
||||
|
||||
@@ -285,11 +285,11 @@ implement g_volatile_ctrl like this:
|
||||
Note that you use the 'new value' union as well in g_volatile_ctrl. In general
|
||||
controls that need to implement g_volatile_ctrl are read-only controls.
|
||||
|
||||
To mark a control as volatile you have to set the is_volatile flag:
|
||||
To mark a control as volatile you have to set V4L2_CTRL_FLAG_VOLATILE:
|
||||
|
||||
ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...);
|
||||
if (ctrl)
|
||||
ctrl->is_volatile = 1;
|
||||
ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE;
|
||||
|
||||
For try/s_ctrl the new values (i.e. as passed by the user) are filled in and
|
||||
you can modify them in try_ctrl or set them in s_ctrl. The 'cur' union
|
||||
@@ -367,8 +367,7 @@ Driver specific controls can be created using v4l2_ctrl_new_custom():
|
||||
The last argument is the priv pointer which can be set to driver-specific
|
||||
private data.
|
||||
|
||||
The v4l2_ctrl_config struct also has fields to set the is_private and is_volatile
|
||||
flags.
|
||||
The v4l2_ctrl_config struct also has a field to set the is_private flag.
|
||||
|
||||
If the name field is not set, then the framework will assume this is a standard
|
||||
control and will fill in the name, type and flags fields accordingly.
|
||||
@@ -496,18 +495,20 @@ Handling autogain/gain-type Controls with Auto Clusters
|
||||
|
||||
A common type of control cluster is one that handles 'auto-foo/foo'-type
|
||||
controls. Typical examples are autogain/gain, autoexposure/exposure,
|
||||
autowhitebalance/red balance/blue balance. In all cases you have one controls
|
||||
autowhitebalance/red balance/blue balance. In all cases you have one control
|
||||
that determines whether another control is handled automatically by the hardware,
|
||||
or whether it is under manual control from the user.
|
||||
|
||||
If the cluster is in automatic mode, then the manual controls should be
|
||||
marked inactive. When the volatile controls are read the g_volatile_ctrl
|
||||
operation should return the value that the hardware's automatic mode set up
|
||||
automatically.
|
||||
marked inactive and volatile. When the volatile controls are read the
|
||||
g_volatile_ctrl operation should return the value that the hardware's automatic
|
||||
mode set up automatically.
|
||||
|
||||
If the cluster is put in manual mode, then the manual controls should become
|
||||
active again and the is_volatile flag should be ignored (so g_volatile_ctrl is
|
||||
no longer called while in manual mode).
|
||||
active again and the volatile flag is cleared (so g_volatile_ctrl is no longer
|
||||
called while in manual mode). In addition just before switching to manual mode
|
||||
the current values as determined by the auto mode are copied as the new manual
|
||||
values.
|
||||
|
||||
Finally the V4L2_CTRL_FLAG_UPDATE should be set for the auto control since
|
||||
changing that control affects the control flags of the manual controls.
|
||||
@@ -520,7 +521,11 @@ void v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls,
|
||||
|
||||
The first two arguments are identical to v4l2_ctrl_cluster. The third argument
|
||||
tells the framework which value switches the cluster into manual mode. The
|
||||
last argument will optionally set the is_volatile flag for the non-auto controls.
|
||||
last argument will optionally set V4L2_CTRL_FLAG_VOLATILE for the non-auto controls.
|
||||
If it is false, then the manual controls are never volatile. You would typically
|
||||
use that if the hardware does not give you the option to read back to values as
|
||||
determined by the auto mode (e.g. if autogain is on, the hardware doesn't allow
|
||||
you to obtain the current gain value).
|
||||
|
||||
The first control of the cluster is assumed to be the 'auto' control.
|
||||
|
||||
@@ -681,16 +686,6 @@ if there are no controls at all.
|
||||
count if nothing was done yet. If it is less than count then only the controls
|
||||
up to error_idx-1 were successfully applied.
|
||||
|
||||
3) When attempting to read a button control the framework will return -EACCES
|
||||
instead of -EINVAL as stated in the spec. It seems to make more sense since
|
||||
button controls are write-only controls.
|
||||
|
||||
4) Attempting to write to a read-only control will return -EACCES instead of
|
||||
-EINVAL as the spec says.
|
||||
|
||||
5) The spec does not mention what should happen when you try to set/get a
|
||||
control class controls. The framework will return -EACCES.
|
||||
|
||||
|
||||
Proposals for Extensions
|
||||
========================
|
||||
@@ -703,9 +698,3 @@ decimal. Useful for e.g. video_mute_yuv.
|
||||
2) It is possible to mark in the controls array which controls have been
|
||||
successfully written and which failed by for example adding a bit to the
|
||||
control ID. Not sure if it is worth the effort, though.
|
||||
|
||||
3) Trying to set volatile inactive controls should result in -EACCESS.
|
||||
|
||||
4) Add a new flag to mark volatile controls. Any application that wants
|
||||
to store the state of the controls can then skip volatile inactive controls.
|
||||
Currently it is not possible to detect such controls.
|
||||
|
||||
18
MAINTAINERS
18
MAINTAINERS
@@ -1085,6 +1085,24 @@ F: arch/arm/plat-s5p/dev-fimc*
|
||||
F: arch/arm/plat-samsung/include/plat/*fimc*
|
||||
F: drivers/media/video/s5p-fimc/
|
||||
|
||||
ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
|
||||
M: Kyungmin Park <kyungmin.park@samsung.com>
|
||||
M: Kamil Debski <k.debski@samsung.com>
|
||||
L: linux-arm-kernel@lists.infradead.org
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: arch/arm/plat-s5p/dev-mfc.c
|
||||
F: drivers/media/video/s5p-mfc/
|
||||
|
||||
ARM/SAMSUNG S5P SERIES TV SUBSYSTEM SUPPORT
|
||||
M: Kyungmin Park <kyungmin.park@samsung.com>
|
||||
M: Tomasz Stanislawski <t.stanislaws@samsung.com>
|
||||
L: linux-arm-kernel@lists.infradead.org
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: arch/arm/plat-s5p/dev-tv.c
|
||||
F: drivers/media/video/s5p-tv/
|
||||
|
||||
ARM/SHMOBILE ARM ARCHITECTURE
|
||||
M: Paul Mundt <lethal@linux-sh.org>
|
||||
M: Magnus Damm <magnus.damm@gmail.com>
|
||||
|
||||
@@ -217,22 +217,6 @@ config INPUT_ATLAS_BTNS
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called atlas_btns.
|
||||
|
||||
config INPUT_ATI_REMOTE
|
||||
tristate "ATI / X10 USB RF remote control"
|
||||
depends on USB_ARCH_HAS_HCD
|
||||
select USB
|
||||
help
|
||||
Say Y here if you want to use an ATI or X10 "Lola" USB remote control.
|
||||
These are RF remotes with USB receivers.
|
||||
The ATI remote comes with many of ATI's All-In-Wonder video cards.
|
||||
The X10 "Lola" remote is available at:
|
||||
<http://www.x10.com/products/lola_sg1.htm>
|
||||
This driver provides mouse pointer, left and right mouse buttons,
|
||||
and maps all the other remote buttons to keypress events.
|
||||
|
||||
To compile this driver as a module, choose M here: the module will be
|
||||
called ati_remote.
|
||||
|
||||
config INPUT_ATI_REMOTE2
|
||||
tristate "ATI / Philips USB RF remote control"
|
||||
depends on USB_ARCH_HAS_HCD
|
||||
|
||||
@@ -13,7 +13,6 @@ obj-$(CONFIG_INPUT_ADXL34X) += adxl34x.o
|
||||
obj-$(CONFIG_INPUT_ADXL34X_I2C) += adxl34x-i2c.o
|
||||
obj-$(CONFIG_INPUT_ADXL34X_SPI) += adxl34x-spi.o
|
||||
obj-$(CONFIG_INPUT_APANEL) += apanel.o
|
||||
obj-$(CONFIG_INPUT_ATI_REMOTE) += ati_remote.o
|
||||
obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o
|
||||
obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o
|
||||
obj-$(CONFIG_INPUT_BFIN_ROTARY) += bfin_rotary.o
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <media/saa7146.h>
|
||||
|
||||
LIST_HEAD(saa7146_devices);
|
||||
@@ -35,10 +37,9 @@ static void dump_registers(struct saa7146_dev* dev)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
INFO((" @ %li jiffies:\n",jiffies));
|
||||
for(i = 0; i <= 0x148; i+=4) {
|
||||
printk("0x%03x: 0x%08x\n",i,saa7146_read(dev,i));
|
||||
}
|
||||
pr_info(" @ %li jiffies:\n", jiffies);
|
||||
for (i = 0; i <= 0x148; i += 4)
|
||||
pr_info("0x%03x: 0x%08x\n", i, saa7146_read(dev, i));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -72,9 +73,8 @@ static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
|
||||
if (saa7146_read(dev, MC2) & 2)
|
||||
break;
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: %s timed out while waiting for "
|
||||
"registers getting programmed\n",
|
||||
dev->name, __func__);
|
||||
pr_err("%s: %s timed out while waiting for registers getting programmed\n",
|
||||
dev->name, __func__);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
msleep(1);
|
||||
@@ -88,8 +88,8 @@ static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
|
||||
break;
|
||||
saa7146_read(dev, MC2);
|
||||
if (err) {
|
||||
DEB_S(("%s: %s timed out while waiting for transfer "
|
||||
"completion\n", dev->name, __func__));
|
||||
DEB_S("%s: %s timed out while waiting for transfer completion\n",
|
||||
dev->name, __func__);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
msleep(1);
|
||||
@@ -109,9 +109,8 @@ static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
|
||||
if (saa7146_read(dev, MC2) & 2)
|
||||
break;
|
||||
if (!loops--) {
|
||||
printk(KERN_ERR "%s: %s timed out while waiting for "
|
||||
"registers getting programmed\n",
|
||||
dev->name, __func__);
|
||||
pr_err("%s: %s timed out while waiting for registers getting programmed\n",
|
||||
dev->name, __func__);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
udelay(1);
|
||||
@@ -124,8 +123,8 @@ static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
|
||||
break;
|
||||
saa7146_read(dev, MC2);
|
||||
if (!loops--) {
|
||||
DEB_S(("%s: %s timed out while waiting for transfer "
|
||||
"completion\n", dev->name, __func__));
|
||||
DEB_S("%s: %s timed out while waiting for transfer completion\n",
|
||||
dev->name, __func__);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
udelay(5);
|
||||
@@ -264,7 +263,9 @@ int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt
|
||||
ptr = pt->cpu;
|
||||
for (i = 0; i < sglen; i++, list++) {
|
||||
/*
|
||||
printk("i:%d, adr:0x%08x, len:%d, offset:%d\n", i,sg_dma_address(list), sg_dma_len(list), list->offset);
|
||||
pr_debug("i:%d, adr:0x%08x, len:%d, offset:%d\n",
|
||||
i, sg_dma_address(list), sg_dma_len(list),
|
||||
list->offset);
|
||||
*/
|
||||
for (p = 0; p * 4096 < list->length; p++, ptr++) {
|
||||
*ptr = cpu_to_le32(sg_dma_address(list) + p * 4096);
|
||||
@@ -281,9 +282,9 @@ int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt
|
||||
|
||||
/*
|
||||
ptr = pt->cpu;
|
||||
printk("offset: %d\n",pt->offset);
|
||||
pr_debug("offset: %d\n", pt->offset);
|
||||
for(i=0;i<5;i++) {
|
||||
printk("ptr1 %d: 0x%08x\n",i,ptr[i]);
|
||||
pr_debug("ptr1 %d: 0x%08x\n", i, ptr[i]);
|
||||
}
|
||||
*/
|
||||
return 0;
|
||||
@@ -314,7 +315,7 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
|
||||
}
|
||||
}
|
||||
if (0 != (isr & (MASK_27))) {
|
||||
DEB_INT(("irq: RPS0 (0x%08x).\n",isr));
|
||||
DEB_INT("irq: RPS0 (0x%08x)\n", isr);
|
||||
if (dev->vv_data && dev->vv_callback)
|
||||
dev->vv_callback(dev,isr);
|
||||
isr &= ~MASK_27;
|
||||
@@ -333,14 +334,15 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
|
||||
} else {
|
||||
u32 psr = saa7146_read(dev, PSR);
|
||||
u32 ssr = saa7146_read(dev, SSR);
|
||||
printk(KERN_WARNING "%s: unexpected i2c irq: isr %08x psr %08x ssr %08x\n",
|
||||
dev->name, isr, psr, ssr);
|
||||
pr_warn("%s: unexpected i2c irq: isr %08x psr %08x ssr %08x\n",
|
||||
dev->name, isr, psr, ssr);
|
||||
}
|
||||
isr &= ~(MASK_16|MASK_17);
|
||||
}
|
||||
if( 0 != isr ) {
|
||||
ERR(("warning: interrupt enabled, but not handled properly.(0x%08x)\n",isr));
|
||||
ERR(("disabling interrupt source(s)!\n"));
|
||||
ERR("warning: interrupt enabled, but not handled properly.(0x%08x)\n",
|
||||
isr);
|
||||
ERR("disabling interrupt source(s)!\n");
|
||||
SAA7146_IER_DISABLE(dev,isr);
|
||||
}
|
||||
saa7146_write(dev, ISR, ack_isr);
|
||||
@@ -360,15 +362,15 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
|
||||
/* clear out mem for sure */
|
||||
dev = kzalloc(sizeof(struct saa7146_dev), GFP_KERNEL);
|
||||
if (!dev) {
|
||||
ERR(("out of memory.\n"));
|
||||
ERR("out of memory\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
DEB_EE(("pci:%p\n",pci));
|
||||
DEB_EE("pci:%p\n", pci);
|
||||
|
||||
err = pci_enable_device(pci);
|
||||
if (err < 0) {
|
||||
ERR(("pci_enable_device() failed.\n"));
|
||||
ERR("pci_enable_device() failed\n");
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
@@ -389,7 +391,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
|
||||
dev->mem = ioremap(pci_resource_start(pci, 0),
|
||||
pci_resource_len(pci, 0));
|
||||
if (!dev->mem) {
|
||||
ERR(("ioremap() failed.\n"));
|
||||
ERR("ioremap() failed\n");
|
||||
err = -ENODEV;
|
||||
goto err_release;
|
||||
}
|
||||
@@ -414,7 +416,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
|
||||
err = request_irq(pci->irq, interrupt_hw, IRQF_SHARED | IRQF_DISABLED,
|
||||
dev->name, dev);
|
||||
if (err < 0) {
|
||||
ERR(("request_irq() failed.\n"));
|
||||
ERR("request_irq() failed\n");
|
||||
goto err_unmap;
|
||||
}
|
||||
|
||||
@@ -444,7 +446,9 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
|
||||
/* create a nice device name */
|
||||
sprintf(dev->name, "saa7146 (%d)", saa7146_num);
|
||||
|
||||
INFO(("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x).\n", dev->mem, dev->revision, pci->irq, pci->subsystem_vendor, pci->subsystem_device));
|
||||
pr_info("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x)\n",
|
||||
dev->mem, dev->revision, pci->irq,
|
||||
pci->subsystem_vendor, pci->subsystem_device);
|
||||
dev->ext = ext;
|
||||
|
||||
mutex_init(&dev->v4l2_lock);
|
||||
@@ -464,12 +468,12 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
|
||||
err = -ENODEV;
|
||||
|
||||
if (ext->probe && ext->probe(dev)) {
|
||||
DEB_D(("ext->probe() failed for %p. skipping device.\n",dev));
|
||||
DEB_D("ext->probe() failed for %p. skipping device.\n", dev);
|
||||
goto err_free_i2c;
|
||||
}
|
||||
|
||||
if (ext->attach(dev, pci_ext)) {
|
||||
DEB_D(("ext->attach() failed for %p. skipping device.\n",dev));
|
||||
DEB_D("ext->attach() failed for %p. skipping device.\n", dev);
|
||||
goto err_free_i2c;
|
||||
}
|
||||
/* V4L extensions will set the pci drvdata to the v4l2_device in the
|
||||
@@ -521,7 +525,7 @@ static void saa7146_remove_one(struct pci_dev *pdev)
|
||||
{ NULL, 0 }
|
||||
}, *p;
|
||||
|
||||
DEB_EE(("dev:%p\n",dev));
|
||||
DEB_EE("dev:%p\n", dev);
|
||||
|
||||
dev->ext->detach(dev);
|
||||
/* Zero the PCI drvdata after use. */
|
||||
@@ -552,21 +556,21 @@ static void saa7146_remove_one(struct pci_dev *pdev)
|
||||
|
||||
int saa7146_register_extension(struct saa7146_extension* ext)
|
||||
{
|
||||
DEB_EE(("ext:%p\n",ext));
|
||||
DEB_EE("ext:%p\n", ext);
|
||||
|
||||
ext->driver.name = ext->name;
|
||||
ext->driver.id_table = ext->pci_tbl;
|
||||
ext->driver.probe = saa7146_init_one;
|
||||
ext->driver.remove = saa7146_remove_one;
|
||||
|
||||
printk("saa7146: register extension '%s'.\n",ext->name);
|
||||
pr_info("register extension '%s'\n", ext->name);
|
||||
return pci_register_driver(&ext->driver);
|
||||
}
|
||||
|
||||
int saa7146_unregister_extension(struct saa7146_extension* ext)
|
||||
{
|
||||
DEB_EE(("ext:%p\n",ext));
|
||||
printk("saa7146: unregister extension '%s'.\n",ext->name);
|
||||
DEB_EE("ext:%p\n", ext);
|
||||
pr_info("unregister extension '%s'\n", ext->name);
|
||||
pci_unregister_driver(&ext->driver);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <media/saa7146_vv.h>
|
||||
|
||||
/****************************************************************************/
|
||||
@@ -9,21 +11,23 @@ int saa7146_res_get(struct saa7146_fh *fh, unsigned int bit)
|
||||
struct saa7146_vv *vv = dev->vv_data;
|
||||
|
||||
if (fh->resources & bit) {
|
||||
DEB_D(("already allocated! want: 0x%02x, cur:0x%02x\n",bit,vv->resources));
|
||||
DEB_D("already allocated! want: 0x%02x, cur:0x%02x\n",
|
||||
bit, vv->resources);
|
||||
/* have it already allocated */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* is it free? */
|
||||
if (vv->resources & bit) {
|
||||
DEB_D(("locked! vv->resources:0x%02x, we want:0x%02x\n",vv->resources,bit));
|
||||
DEB_D("locked! vv->resources:0x%02x, we want:0x%02x\n",
|
||||
vv->resources, bit);
|
||||
/* no, someone else uses it */
|
||||
return 0;
|
||||
}
|
||||
/* it's free, grab it */
|
||||
fh->resources |= bit;
|
||||
fh->resources |= bit;
|
||||
vv->resources |= bit;
|
||||
DEB_D(("res: get 0x%02x, cur:0x%02x\n",bit,vv->resources));
|
||||
DEB_D("res: get 0x%02x, cur:0x%02x\n", bit, vv->resources);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -34,9 +38,9 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits)
|
||||
|
||||
BUG_ON((fh->resources & bits) != bits);
|
||||
|
||||
fh->resources &= ~bits;
|
||||
fh->resources &= ~bits;
|
||||
vv->resources &= ~bits;
|
||||
DEB_D(("res: put 0x%02x, cur:0x%02x\n",bits,vv->resources));
|
||||
DEB_D("res: put 0x%02x, cur:0x%02x\n", bits, vv->resources);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +51,7 @@ void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
|
||||
struct saa7146_buf *buf)
|
||||
{
|
||||
struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
|
||||
DEB_EE(("dev:%p, buf:%p\n",dev,buf));
|
||||
DEB_EE("dev:%p, buf:%p\n", dev, buf);
|
||||
|
||||
BUG_ON(in_interrupt());
|
||||
|
||||
@@ -66,18 +70,19 @@ int saa7146_buffer_queue(struct saa7146_dev *dev,
|
||||
struct saa7146_buf *buf)
|
||||
{
|
||||
assert_spin_locked(&dev->slock);
|
||||
DEB_EE(("dev:%p, dmaq:%p, buf:%p\n", dev, q, buf));
|
||||
DEB_EE("dev:%p, dmaq:%p, buf:%p\n", dev, q, buf);
|
||||
|
||||
BUG_ON(!q);
|
||||
|
||||
if (NULL == q->curr) {
|
||||
q->curr = buf;
|
||||
DEB_D(("immediately activating buffer %p\n", buf));
|
||||
DEB_D("immediately activating buffer %p\n", buf);
|
||||
buf->activate(dev,buf,NULL);
|
||||
} else {
|
||||
list_add_tail(&buf->vb.queue,&q->queue);
|
||||
buf->vb.state = VIDEOBUF_QUEUED;
|
||||
DEB_D(("adding buffer %p to queue. (active buffer present)\n", buf));
|
||||
DEB_D("adding buffer %p to queue. (active buffer present)\n",
|
||||
buf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -87,14 +92,14 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
|
||||
int state)
|
||||
{
|
||||
assert_spin_locked(&dev->slock);
|
||||
DEB_EE(("dev:%p, dmaq:%p, state:%d\n", dev, q, state));
|
||||
DEB_EE(("q->curr:%p\n",q->curr));
|
||||
DEB_EE("dev:%p, dmaq:%p, state:%d\n", dev, q, state);
|
||||
DEB_EE("q->curr:%p\n", q->curr);
|
||||
|
||||
BUG_ON(!q->curr);
|
||||
|
||||
/* finish current buffer */
|
||||
if (NULL == q->curr) {
|
||||
DEB_D(("aiii. no current buffer\n"));
|
||||
DEB_D("aiii. no current buffer\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -112,7 +117,7 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
|
||||
|
||||
BUG_ON(!q);
|
||||
|
||||
DEB_INT(("dev:%p, dmaq:%p, vbi:%d\n", dev, q, vbi));
|
||||
DEB_INT("dev:%p, dmaq:%p, vbi:%d\n", dev, q, vbi);
|
||||
|
||||
assert_spin_locked(&dev->slock);
|
||||
if (!list_empty(&q->queue)) {
|
||||
@@ -122,10 +127,11 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
|
||||
if (!list_empty(&q->queue))
|
||||
next = list_entry(q->queue.next,struct saa7146_buf, vb.queue);
|
||||
q->curr = buf;
|
||||
DEB_INT(("next buffer: buf:%p, prev:%p, next:%p\n", buf, q->queue.prev,q->queue.next));
|
||||
DEB_INT("next buffer: buf:%p, prev:%p, next:%p\n",
|
||||
buf, q->queue.prev, q->queue.next);
|
||||
buf->activate(dev,buf,next);
|
||||
} else {
|
||||
DEB_INT(("no next buffer. stopping.\n"));
|
||||
DEB_INT("no next buffer. stopping.\n");
|
||||
if( 0 != vbi ) {
|
||||
/* turn off video-dma3 */
|
||||
saa7146_write(dev,MC1, MASK_20);
|
||||
@@ -162,11 +168,11 @@ void saa7146_buffer_timeout(unsigned long data)
|
||||
struct saa7146_dev *dev = q->dev;
|
||||
unsigned long flags;
|
||||
|
||||
DEB_EE(("dev:%p, dmaq:%p\n", dev, q));
|
||||
DEB_EE("dev:%p, dmaq:%p\n", dev, q);
|
||||
|
||||
spin_lock_irqsave(&dev->slock,flags);
|
||||
if (q->curr) {
|
||||
DEB_D(("timeout on %p\n", q->curr));
|
||||
DEB_D("timeout on %p\n", q->curr);
|
||||
saa7146_buffer_finish(dev,q,VIDEOBUF_ERROR);
|
||||
}
|
||||
|
||||
@@ -194,12 +200,12 @@ static int fops_open(struct file *file)
|
||||
|
||||
enum v4l2_buf_type type;
|
||||
|
||||
DEB_EE(("file:%p, dev:%s\n", file, video_device_node_name(vdev)));
|
||||
DEB_EE("file:%p, dev:%s\n", file, video_device_node_name(vdev));
|
||||
|
||||
if (mutex_lock_interruptible(&saa7146_devices_lock))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
DEB_D(("using: %p\n",dev));
|
||||
DEB_D("using: %p\n", dev);
|
||||
|
||||
type = vdev->vfl_type == VFL_TYPE_GRABBER
|
||||
? V4L2_BUF_TYPE_VIDEO_CAPTURE
|
||||
@@ -207,7 +213,7 @@ static int fops_open(struct file *file)
|
||||
|
||||
/* check if an extension is registered */
|
||||
if( NULL == dev->ext ) {
|
||||
DEB_S(("no extension registered for this device.\n"));
|
||||
DEB_S("no extension registered for this device\n");
|
||||
result = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
@@ -215,7 +221,7 @@ static int fops_open(struct file *file)
|
||||
/* allocate per open data */
|
||||
fh = kzalloc(sizeof(*fh),GFP_KERNEL);
|
||||
if (NULL == fh) {
|
||||
DEB_S(("cannot allocate memory for per open data.\n"));
|
||||
DEB_S("cannot allocate memory for per open data\n");
|
||||
result = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
@@ -225,13 +231,13 @@ static int fops_open(struct file *file)
|
||||
fh->type = type;
|
||||
|
||||
if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
|
||||
DEB_S(("initializing vbi...\n"));
|
||||
DEB_S("initializing vbi...\n");
|
||||
if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
|
||||
result = saa7146_vbi_uops.open(dev,file);
|
||||
if (dev->ext_vv_data->vbi_fops.open)
|
||||
dev->ext_vv_data->vbi_fops.open(file);
|
||||
} else {
|
||||
DEB_S(("initializing video...\n"));
|
||||
DEB_S("initializing video...\n");
|
||||
result = saa7146_video_uops.open(dev,file);
|
||||
}
|
||||
|
||||
@@ -259,7 +265,7 @@ static int fops_release(struct file *file)
|
||||
struct saa7146_fh *fh = file->private_data;
|
||||
struct saa7146_dev *dev = fh->dev;
|
||||
|
||||
DEB_EE(("file:%p\n", file));
|
||||
DEB_EE("file:%p\n", file);
|
||||
|
||||
if (mutex_lock_interruptible(&saa7146_devices_lock))
|
||||
return -ERESTARTSYS;
|
||||
@@ -289,12 +295,14 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma)
|
||||
|
||||
switch (fh->type) {
|
||||
case V4L2_BUF_TYPE_VIDEO_CAPTURE: {
|
||||
DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, vma:%p\n",file, vma));
|
||||
DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, vma:%p\n",
|
||||
file, vma);
|
||||
q = &fh->video_q;
|
||||
break;
|
||||
}
|
||||
case V4L2_BUF_TYPE_VBI_CAPTURE: {
|
||||
DEB_EE(("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, vma:%p\n",file, vma));
|
||||
DEB_EE("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, vma:%p\n",
|
||||
file, vma);
|
||||
q = &fh->vbi_q;
|
||||
break;
|
||||
}
|
||||
@@ -312,14 +320,14 @@ static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait)
|
||||
struct videobuf_buffer *buf = NULL;
|
||||
struct videobuf_queue *q;
|
||||
|
||||
DEB_EE(("file:%p, poll:%p\n",file, wait));
|
||||
DEB_EE("file:%p, poll:%p\n", file, wait);
|
||||
|
||||
if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) {
|
||||
if( 0 == fh->vbi_q.streaming )
|
||||
return videobuf_poll_stream(file, &fh->vbi_q, wait);
|
||||
q = &fh->vbi_q;
|
||||
} else {
|
||||
DEB_D(("using video queue.\n"));
|
||||
DEB_D("using video queue\n");
|
||||
q = &fh->video_q;
|
||||
}
|
||||
|
||||
@@ -327,17 +335,17 @@ static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait)
|
||||
buf = list_entry(q->stream.next, struct videobuf_buffer, stream);
|
||||
|
||||
if (!buf) {
|
||||
DEB_D(("buf == NULL!\n"));
|
||||
DEB_D("buf == NULL!\n");
|
||||
return POLLERR;
|
||||
}
|
||||
|
||||
poll_wait(file, &buf->done, wait);
|
||||
if (buf->state == VIDEOBUF_DONE || buf->state == VIDEOBUF_ERROR) {
|
||||
DEB_D(("poll succeeded!\n"));
|
||||
DEB_D("poll succeeded!\n");
|
||||
return POLLIN|POLLRDNORM;
|
||||
}
|
||||
|
||||
DEB_D(("nothing to poll for, buf->state:%d\n",buf->state));
|
||||
DEB_D("nothing to poll for, buf->state:%d\n", buf->state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -346,18 +354,20 @@ static ssize_t fops_read(struct file *file, char __user *data, size_t count, lof
|
||||
struct saa7146_fh *fh = file->private_data;
|
||||
|
||||
switch (fh->type) {
|
||||
case V4L2_BUF_TYPE_VIDEO_CAPTURE: {
|
||||
// DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%lun", file, data, (unsigned long)count));
|
||||
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
|
||||
/*
|
||||
DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%lun",
|
||||
file, data, (unsigned long)count);
|
||||
*/
|
||||
return saa7146_video_uops.read(file,data,count,ppos);
|
||||
}
|
||||
case V4L2_BUF_TYPE_VBI_CAPTURE: {
|
||||
// DEB_EE(("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, data:%p, count:%lu\n", file, data, (unsigned long)count));
|
||||
case V4L2_BUF_TYPE_VBI_CAPTURE:
|
||||
/*
|
||||
DEB_EE("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, data:%p, count:%lu\n",
|
||||
file, data, (unsigned long)count);
|
||||
*/
|
||||
if (fh->dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
|
||||
return saa7146_vbi_uops.read(file,data,count,ppos);
|
||||
else
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
return -EINVAL;
|
||||
default:
|
||||
BUG();
|
||||
return 0;
|
||||
@@ -398,22 +408,22 @@ static void vv_callback(struct saa7146_dev *dev, unsigned long status)
|
||||
{
|
||||
u32 isr = status;
|
||||
|
||||
DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status));
|
||||
DEB_INT("dev:%p, isr:0x%08x\n", dev, (u32)status);
|
||||
|
||||
if (0 != (isr & (MASK_27))) {
|
||||
DEB_INT(("irq: RPS0 (0x%08x).\n",isr));
|
||||
DEB_INT("irq: RPS0 (0x%08x)\n", isr);
|
||||
saa7146_video_uops.irq_done(dev,isr);
|
||||
}
|
||||
|
||||
if (0 != (isr & (MASK_28))) {
|
||||
u32 mc2 = saa7146_read(dev, MC2);
|
||||
if( 0 != (mc2 & MASK_15)) {
|
||||
DEB_INT(("irq: RPS1 vbi workaround (0x%08x).\n",isr));
|
||||
DEB_INT("irq: RPS1 vbi workaround (0x%08x)\n", isr);
|
||||
wake_up(&dev->vv_data->vbi_wq);
|
||||
saa7146_write(dev,MC2, MASK_31);
|
||||
return;
|
||||
}
|
||||
DEB_INT(("irq: RPS1 (0x%08x).\n",isr));
|
||||
DEB_INT("irq: RPS1 (0x%08x)\n", isr);
|
||||
saa7146_vbi_uops.irq_done(dev,isr);
|
||||
}
|
||||
}
|
||||
@@ -429,13 +439,13 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
|
||||
|
||||
vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL);
|
||||
if (vv == NULL) {
|
||||
ERR(("out of memory. aborting.\n"));
|
||||
ERR("out of memory. aborting.\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ext_vv->ops = saa7146_video_ioctl_ops;
|
||||
ext_vv->core_ops = &saa7146_video_ioctl_ops;
|
||||
|
||||
DEB_EE(("dev:%p\n",dev));
|
||||
DEB_EE("dev:%p\n", dev);
|
||||
|
||||
/* set default values for video parts of the saa7146 */
|
||||
saa7146_write(dev, BCS_CTRL, 0x80400040);
|
||||
@@ -450,7 +460,7 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
|
||||
|
||||
vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
|
||||
if( NULL == vv->d_clipping.cpu_addr ) {
|
||||
ERR(("out of memory. aborting.\n"));
|
||||
ERR("out of memory. aborting.\n");
|
||||
kfree(vv);
|
||||
return -1;
|
||||
}
|
||||
@@ -471,7 +481,7 @@ int saa7146_vv_release(struct saa7146_dev* dev)
|
||||
{
|
||||
struct saa7146_vv *vv = dev->vv_data;
|
||||
|
||||
DEB_EE(("dev:%p\n",dev));
|
||||
DEB_EE("dev:%p\n", dev);
|
||||
|
||||
v4l2_device_unregister(&dev->v4l2_dev);
|
||||
pci_free_consistent(dev->pci, SAA7146_CLIPPING_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
|
||||
@@ -490,7 +500,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
|
||||
int err;
|
||||
int i;
|
||||
|
||||
DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type));
|
||||
DEB_EE("dev:%p, name:'%s', type:%d\n", dev, name, type);
|
||||
|
||||
// released by vfd->release
|
||||
vfd = video_device_alloc();
|
||||
@@ -509,13 +519,13 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
|
||||
|
||||
err = video_register_device(vfd, type, -1);
|
||||
if (err < 0) {
|
||||
ERR(("cannot register v4l2 device. skipping.\n"));
|
||||
ERR("cannot register v4l2 device. skipping.\n");
|
||||
video_device_release(vfd);
|
||||
return err;
|
||||
}
|
||||
|
||||
INFO(("%s: registered device %s [v4l2]\n",
|
||||
dev->name, video_device_node_name(vfd)));
|
||||
pr_info("%s: registered device %s [v4l2]\n",
|
||||
dev->name, video_device_node_name(vfd));
|
||||
|
||||
*vid = vfd;
|
||||
return 0;
|
||||
@@ -524,7 +534,7 @@ EXPORT_SYMBOL_GPL(saa7146_register_device);
|
||||
|
||||
int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev)
|
||||
{
|
||||
DEB_EE(("dev:%p\n",dev));
|
||||
DEB_EE("dev:%p\n", dev);
|
||||
|
||||
video_unregister_device(*vid);
|
||||
*vid = NULL;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user