Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8871b201 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (25 commits)
  V4L/DVB (12206): get_dvb_firmware: Correct errors in MPC718 firmware extraction logic
  V4L/DVB (12203): radio-si470x: fix lock imbalance
  V4L/DVB (12202): em28xx, fix lock imbalance
  V4L/DVB (12172): em28xx: Add autodetection code for Silvercrest 1.3 mpix
  V4L/DVB (12171): em28xx: fix webcam usage with different output formats
  V4L/DVB (12169): em28xx-video: fix VIDIOC_G_FMT and VIDIOC_ENUMFMT with webcams
  V4L/DVB (12156): em28xx: Fix tuning for Terratec Cinergy T XS USB (zl10353 version)
  V4L/DVB (12139): em28xx: add other video formats
  V4L/DVB (12138): em28xx: add support for Silvercrest Webcam
  V4L/DVB (12174): mt9v011: let's stick with datasheet values where it works
  V4L/DVB (12173): mt9v011: properly calculate image resolution registers
  V4L/DVB (12137): mt9v011: CodingStyle fixes
  V4L/DVB (12136): mt9v011: Some fixes at the register initialization table
  V4L/DVB (12135): Add a driver for mt9v011 sensor
  V4L/DVB (12166): cx23885: add FIXME comment above set_frontend override
  V4L/DVB (12165): cx23885: override set_frontend to allow rf input path switching on the HVR1275
  V4L/DVB (12148): move V4L2_PIX_FMT_SGRBG8 to the proper place
  V4L/DVB (12182): cx18: Add DVB-T support for Yuan MPC-718 cards with an MT352 or ZL10353
  V4L/DVB (12181): get_dvb_firmware: Add Yuan MPC718 MT352 DVB-T "firmware" extraction
  V4L/DVB (12180): cx18: Update Yuan MPC-718 card entry with better information and guesses
  ...
parents 085ff82c 0a684348
Loading
Loading
Loading
Loading
+52 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ use IO::Handle;
		"tda10046lifeview", "av7110", "dec2000t", "dec2540t",
		"dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
		"or51211", "or51132_qam", "or51132_vsb", "bluebird",
		"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2" );
		"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718" );

# Check args
syntax() if (scalar(@ARGV) != 1);
@@ -381,6 +381,57 @@ sub cx18 {
    $allfiles;
}

sub mpc718 {
    my $archive = 'Yuan MPC718 TV Tuner Card 2.13.10.1016.zip';
    my $url = "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/$archive";
    my $fwfile = "dvb-cx18-mpc718-mt352.fw";
    my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);

    checkstandard();
    wgetfile($archive, $url);
    unzip($archive, $tmpdir);

    my $sourcefile = "$tmpdir/Yuan MPC718 TV Tuner Card 2.13.10.1016/mpc718_32bit/yuanrap.sys";
    my $found = 0;

    open IN, '<', $sourcefile or die "Couldn't open $sourcefile to extract $fwfile data\n";
    binmode IN;
    open OUT, '>', $fwfile;
    binmode OUT;
    {
	# Block scope because we change the line terminator variable $/
	my $prevlen = 0;
	my $currlen;

	# Buried in the data segment are 3 runs of almost identical
	# register-value pairs that end in 0x5d 0x01 which is a "TUNER GO"
	# command for the MT352.
	# Pull out the middle run (because it's easy) of register-value
	# pairs to make the "firmware" file.

	local $/ = "\x5d\x01"; # MT352 "TUNER GO"

	while (<IN>) {
	    $currlen = length($_);
	    if ($prevlen == $currlen && $currlen <= 64) {
		chop; chop; # Get rid of "TUNER GO"
		s/^\0\0//;  # get rid of leading 00 00 if it's there
		printf OUT "$_";
		$found = 1;
		last;
	    }
	    $prevlen = $currlen;
	}
    }
    close OUT;
    close IN;
    if (!$found) {
	unlink $fwfile;
	die "Couldn't find valid register-value sequence in $sourcefile for $fwfile\n";
    }
    $fwfile;
}

sub cx23885 {
    my $url = "http://linuxtv.org/downloads/firmware/";

+1 −0
Original line number Diff line number Diff line
@@ -66,3 +66,4 @@
 68 -> Terratec AV350                           (em2860)        [0ccd:0084]
 69 -> KWorld ATSC 315U HDTV TV Box             (em2882)        [eb1a:a313]
 70 -> Evga inDtube                             (em2882)
 71 -> Silvercrest Webcam 1.3mpix               (em2820/em2840)
+12 −1
Original line number Diff line number Diff line
@@ -1096,8 +1096,19 @@ static int xc2028_set_params(struct dvb_frontend *fe,
	}

	/* All S-code tables need a 200kHz shift */
	if (priv->ctrl.demod)
	if (priv->ctrl.demod) {
		demod = priv->ctrl.demod + 200;
		/*
		 * The DTV7 S-code table needs a 700 kHz shift.
		 * Thanks to Terry Wu <terrywu2009@gmail.com> for reporting this
		 *
		 * DTV7 is only used in Australia.  Germany or Italy may also
		 * use this firmware after initialization, but a tune to a UHF
		 * channel should then cause DTV78 to be used.
		 */
		if (type & DTV7)
			demod += 500;
	}

	return generic_set_freq(fe, p->frequency,
				T_DIGITAL_TV, type, 0, demod);
+1 −0
Original line number Diff line number Diff line
config TTPCI_EEPROM
	tristate
	depends on I2C
	default n

config DVB_AV7110
+2 −3
Original line number Diff line number Diff line
@@ -1200,7 +1200,7 @@ static int si470x_fops_release(struct file *file)
			video_unregister_device(radio->videodev);
			kfree(radio->buffer);
			kfree(radio);
			goto done;
			goto unlock;
		}

		/* stop rds reception */
@@ -1213,9 +1213,8 @@ static int si470x_fops_release(struct file *file)
		retval = si470x_stop(radio);
		usb_autopm_put_interface(radio->intf);
	}

unlock:
	mutex_unlock(&radio->disconnect_lock);

done:
	return retval;
}
Loading