<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/radio, branch linux-5.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-05-13T09:02:19Z</updated>
<entry>
<title>media: make RADIO_ADAPTERS tristate</title>
<updated>2022-05-13T09:02:19Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2022-04-20T06:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=215d49a41709610b9e82a49b27269cfaff1ef0b6'/>
<id>urn:sha1:215d49a41709610b9e82a49b27269cfaff1ef0b6</id>
<content type='text'>
Fix build errors when RADIO_TEA575X=y, VIDEO_BT848=m, and VIDEO_DEV=m.

The build errors occur due to [in drivers/media/Makefile]:
obj-$(CONFIG_VIDEO_DEV) += radio/
so the (would be) builtin tea575x.o is not being built.

This is also due to drivers/media/radio/Kconfig declaring a bool
Kconfig symbol (RADIO_ADAPTERS) that depends on a tristate (VIDEO_DEV),
so when VIDEO_DEV=m, RADIO_ADAPTERS becomes =y, and then the drivers
that depend on RADIO_ADPATERS can be configured as builtin (=y) or
as loadable modules (=m).

Fix this by converting RADIO_ADAPTERS to a tristate symbol instead
of a bool symbol.

Fixes these build errors:

ERROR: modpost: "snd_tea575x_hw_init" [drivers/media/pci/bt8xx/bttv.ko] undefined!
ERROR: modpost: "snd_tea575x_set_freq" [drivers/media/pci/bt8xx/bttv.ko] undefined!
ERROR: modpost: "snd_tea575x_s_hw_freq_seek" [drivers/media/pci/bt8xx/bttv.ko] undefined!
ERROR: modpost: "snd_tea575x_enum_freq_bands" [drivers/media/pci/bt8xx/bttv.ko] undefined!
ERROR: modpost: "snd_tea575x_g_tuner" [drivers/media/pci/bt8xx/bttv.ko] undefined!

Link: lore.kernel.org/r/202204191711.IKJJFjgU-lkp@intel.com

Fixes: 9958d30f38b9 ("media: Kconfig: cleanup VIDEO_DEV dependencies")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: v4l: ioctl: Set bus_info in v4l_querycap()</title>
<updated>2022-04-24T07:07:08Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2022-01-22T13:23:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2d8b6917f3bcfb3190eb80567fea71a9b59dbd3'/>
<id>urn:sha1:f2d8b6917f3bcfb3190eb80567fea71a9b59dbd3</id>
<content type='text'>
The bus_info field is set by most drivers based on the type of the device
bus as well as the name of the device. Do this in v4l_querycap() so
drivers don't need to. This keeps compatibility with non-default and silly
bus_info.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: media/*/Kconfig: sort entries</title>
<updated>2022-03-18T04:58:35Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2022-03-14T10:01:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6cdc31b2d7095af3d39f001b0d4e367a6f32664e'/>
<id>urn:sha1:6cdc31b2d7095af3d39f001b0d4e367a6f32664e</id>
<content type='text'>
Currently, the idems inside media Kconfig are out of order.
Sort them using the script below:

&lt;script&gt;
use strict;
use warnings;

my %config;
my @source;
my $out;

sub flush_config()
{
	if (scalar %config) {
		for my $c (sort keys %config) {
			$out .= $config{$c} . "\n";
		}
		%config = ();
	}

	return if (!scalar @source);

	$out .= "\n";
	for my $s (sort @source) {
		$out .= $s;
	}
	$out .= "\n";

	@source = ();
}

sub sort_kconfig($)
{
	my $fname = shift;
	my $cur_config = "";

	@source = ();
	$out = "";
	%config = ();

	open IN, $fname or die;
	while (&lt;IN&gt;) {
		if (m/^config\s+(.*)/) {
			$cur_config = $1;
			$config{$cur_config} .= $_;
		} elsif (m/^source\s+(.*)/) {
			push @source, $_;
		} elsif (m/^\s+/) {
			if ($cur_config eq "") {
				$out .= $_;
			} else {
				$config{$cur_config} .= $_;
			}
		} else {
			flush_config();
			$cur_config = "";
			$out .= $_;
		}
	}
	close IN or die;

	flush_config();

	$out =~ s/\n\n+/\n\n/g;
	$out =~ s/\n+$/\n/;

	open OUT, "&gt;$fname";
	print OUT $out;
	close OUT;
}

for my $fname(@ARGV) {
	sort_kconfig $fname
}
&lt;/script&gt;

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: Kconfig: cleanup VIDEO_DEV dependencies</title>
<updated>2022-03-18T04:58:35Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2022-03-13T06:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9958d30f38b96fb763a10d44d18ddad39127d5f4'/>
<id>urn:sha1:9958d30f38b96fb763a10d44d18ddad39127d5f4</id>
<content type='text'>
media Kconfig has two entries associated to V4L API:
VIDEO_DEV and VIDEO_V4L2.

On Kernel 2.6.x, there were two V4L APIs, each one with its own flag.
VIDEO_DEV were meant to:
	1) enable Video4Linux and make its Kconfig options to appear;
	2) it makes the Kernel build the V4L core.

while VIDEO_V4L2 where used to distinguish between drivers that
implement the newer API and drivers that implemented the former one.

With time, such meaning changed, specially after the removal of
all V4L version 1 drivers.

At the current implementation, VIDEO_DEV only does (1): it enables
the media options related to V4L, that now has:

	menu "Video4Linux options"
		visible if VIDEO_DEV

	source "drivers/media/v4l2-core/Kconfig"
	endmenu

but it doesn't affect anymore the V4L core drivers.

The rationale is that the V4L2 core has a "soft" dependency
at the I2C bus, and now requires to select a number of other
Kconfig options:

	config VIDEO_V4L2
		tristate
		depends on (I2C || I2C=n) &amp;&amp; VIDEO_DEV
		select RATIONAL
		select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE
		default (I2C || I2C=n) &amp;&amp; VIDEO_DEV

In the past, merging them would be tricky, but it seems that it is now
possible to merge those symbols, in order to simplify V4L dependencies.

Let's keep VIDEO_DEV, as this one is used on some make *defconfig
configurations.

Suggested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Jacopo Mondi &lt;jacopo@jmondi.org&gt;
Reviewed-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt; # for meson-vdec &amp; meson-ge2d
Acked-by: Andrzej Pietrasiewicz &lt;andrzejtp2010@gmail.com&gt;
Acked-by: Łukasz Stelmach &lt;l.stelmach@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: Makefiles: sort entries where it fits</title>
<updated>2022-03-14T08:42:59Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2022-03-09T13:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c89357a7a0f17c6198bb28614913fb1eb284615'/>
<id>urn:sha1:5c89357a7a0f17c6198bb28614913fb1eb284615</id>
<content type='text'>
Alphabetically sort entries at the Makefiles per group,
in ASCII order, e. g., using the output of:

	$ LC_ALL=C sort Makefile |grep obj-y
	...
	$ LC_ALL=C sort Makefile |grep obj.*CONFIG
	...

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: wl128x: use time_is_before_jiffies() instead of open coding it</title>
<updated>2022-02-22T08:41:12Z</updated>
<author>
<name>Wang Qing</name>
</author>
<published>2022-02-15T01:55:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d613750ea3c0844760d05b15411b0804d2e7134d'/>
<id>urn:sha1:d613750ea3c0844760d05b15411b0804d2e7134d</id>
<content type='text'>
Use the helper function time_is_{before,after}_jiffies() to improve
code readability.

Signed-off-by: Wang Qing &lt;wangqing@vivo.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: media/radio: make array probe_ports static const</title>
<updated>2022-01-23T20:18:43Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2022-01-09T21:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2bea838824412bf689703a25531603a9074516bc'/>
<id>urn:sha1:2bea838824412bf689703a25531603a9074516bc</id>
<content type='text'>
Don't populate the read-only array probe_ports on the stack but
instead it static const. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: si470x-i2c: fix possible memory leak in si470x_i2c_probe()</title>
<updated>2021-11-30T11:00:53Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2021-10-15T09:58:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef054e345ed8c79ce1121a3599b5a2dfd78e57a0'/>
<id>urn:sha1:ef054e345ed8c79ce1121a3599b5a2dfd78e57a0</id>
<content type='text'>
n the 'radio-&gt;hdl.error' error handling, ctrl handler allocated by
v4l2_ctrl_new_std() does not released, and caused memory leak as
follows:

unreferenced object 0xffff888033d54200 (size 256):
  comm "i2c-si470x-19", pid 909, jiffies 4294914203 (age 8.072s)
  hex dump (first 32 bytes):
    e8 69 11 03 80 88 ff ff 00 46 d5 33 80 88 ff ff  .i.......F.3....
    10 42 d5 33 80 88 ff ff 10 42 d5 33 80 88 ff ff  .B.3.....B.3....
  backtrace:
    [&lt;00000000086bd4ed&gt;] __kmalloc_node+0x1eb/0x360
    [&lt;00000000bdb68871&gt;] kvmalloc_node+0x66/0x120
    [&lt;00000000fac74e4c&gt;] v4l2_ctrl_new+0x7b9/0x1c60 [videodev]
    [&lt;00000000693bf940&gt;] v4l2_ctrl_new_std+0x19b/0x270 [videodev]
    [&lt;00000000c0cb91bc&gt;] si470x_i2c_probe+0x2d3/0x9a0 [radio_si470x_i2c]
    [&lt;0000000056a6f01f&gt;] i2c_device_probe+0x4d8/0xbe0

Fix the error handling path to avoid memory leak.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Fixes: 8c081b6f9a9b ("media: radio: Critical v4l2 registration...")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: radio-si476x: drop a container_of() abstraction macro</title>
<updated>2021-11-29T12:23:14Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2021-11-24T11:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3fb246476f8c0556747301ba7497f135068225a8'/>
<id>urn:sha1:3fb246476f8c0556747301ba7497f135068225a8</id>
<content type='text'>
This isn't used anywhere. So, drop it.

Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: si470x: consolidate multiple printk's</title>
<updated>2021-11-29T12:23:14Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2021-11-29T11:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5aa19c9fd775a11a56db2380e3b451d42c50e8e'/>
<id>urn:sha1:d5aa19c9fd775a11a56db2380e3b451d42c50e8e</id>
<content type='text'>
When the version warning is given, multiple dev_warn() are
called. Consolidate the ones that could be merged altogether.

Suggested-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
</feed>
