<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/dvb-frontends/au8522_decoder.c, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-01-11T14:19:03Z</updated>
<entry>
<title>[media] media framework: rename pads init function to media_entity_pads_init()</title>
<updated>2016-01-11T14:19:03Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-12-11T09:44:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab22e77cd3d3073c8cac51b59713ef635678dfbe'/>
<id>urn:sha1:ab22e77cd3d3073c8cac51b59713ef635678dfbe</id>
<content type='text'>
With the MC next gen rework, what's left for media_entity_init()
is to just initialize the PADs. However, certain devices, like
a FLASH led/light doesn't have any input or output PAD.

So, there's no reason why calling media_entity_init() would be
mandatory. Also, despite its name, what this function actually
does is to initialize the PADs data. So, rename it to
media_entity_pads_init() in order to reflect that.

The media entity actual init happens during entity register,
at media_device_register_entity(). We should move init of
num_links and num_backlinks to it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] uapi/media.h: Rename entities types to functions</title>
<updated>2016-01-11T14:19:01Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-12-10T19:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ca72efaeffd0d244c44307abc9d4cb11f8ad475'/>
<id>urn:sha1:4ca72efaeffd0d244c44307abc9d4cb11f8ad475</id>
<content type='text'>
Rename the userspace types from MEDIA_ENT_T_ to MEDIA_ENT_F_
and add the backward compatibility bits.

The changes at the .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_ENT_F_DTV_DEMOD
@@
@@
-MEDIA_ENT_T_DVB_DEMUX
+MEDIA_ENT_F_TS_DEMUX
@@
@@
-MEDIA_ENT_T_DVB_TSOUT
+MEDIA_ENT_F_IO_DTV
@@
@@
-MEDIA_ENT_T_DVB_CA
+MEDIA_ENT_F_DTV_CA
@@
@@
-MEDIA_ENT_T_DVB_NET_DECAP
+MEDIA_ENT_F_DTV_NET_DECAP

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media-entity.h: rename entity.type to entity.function</title>
<updated>2016-01-11T14:19:00Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-09-06T12:33:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e576b76f5470a2f8b2287958a2b9a3dd0f56f10'/>
<id>urn:sha1:0e576b76f5470a2f8b2287958a2b9a3dd0f56f10</id>
<content type='text'>
Entities should have one or more functions. Calling it as a
type proofed to not be correct, as an entity could eventually
have more than one type.

So, rename the field as function.

Please notice that this patch doesn't extend support for
multiple function entities. Such change will happen when
we have real case drivers using it.

No functional changes.

Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media: get rid of unused "extra_links" param on media_entity_init()</title>
<updated>2016-01-11T14:18:39Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-08-06T12:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1809510715c4187fa7338204cac53e30326d5d04'/>
<id>urn:sha1:1809510715c4187fa7338204cac53e30326d5d04</id>
<content type='text'>
Currently, media_entity_init() creates an array with the links,
allocated at init time. It provides a parameter (extra_links)
that would allocate more links than the current needs, but this
is not used by any driver.

As we want to be able to do dynamic link allocation/removal,
we'll need to change the implementation of the links. So,
before doing that, let's first remove that extra unused
parameter, in order to cleanup the interface first.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] au0828: Add support for media controller</title>
<updated>2016-01-11T14:18:39Z</updated>
<author>
<name>Rafael Lourenço de Lima Chehab</name>
</author>
<published>2015-06-09T01:20:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bed6919665072b1e5bad31a013d53798394e097c'/>
<id>urn:sha1:bed6919665072b1e5bad31a013d53798394e097c</id>
<content type='text'>
Add support for analog and dvb tv using media controller.

Signed-off-by: Rafael Lourenço de Lima Chehab &lt;chehabrafael@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] au8522: Avoid memory leak for device config data</title>
<updated>2015-12-21T19:39:32Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-12-21T16:38:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa37763fa4b2545a6d517333aacc98ad757a4ccd'/>
<id>urn:sha1:aa37763fa4b2545a6d517333aacc98ad757a4ccd</id>
<content type='text'>
As reported by kmemleak:

	unreferenced object 0xffff880321e1da40 (size 32):
	  comm "modprobe", pid 3309, jiffies 4295019569 (age 2359.636s)
	  hex dump (first 32 bytes):
	    47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  G...............
	    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
	  backtrace:
	    [&lt;ffffffff82278c8e&gt;] kmemleak_alloc+0x4e/0xb0
	    [&lt;ffffffff8153c08c&gt;] kmem_cache_alloc_trace+0x1ec/0x280
	    [&lt;ffffffffa13a896a&gt;] au8522_probe+0x19a/0xa30 [au8522_decoder]
	    [&lt;ffffffff81de0032&gt;] i2c_device_probe+0x2b2/0x490
	    [&lt;ffffffff81ca7004&gt;] driver_probe_device+0x454/0xd90
	    [&lt;ffffffff81ca7c1b&gt;] __device_attach_driver+0x17b/0x230
	    [&lt;ffffffff81ca15da&gt;] bus_for_each_drv+0x11a/0x1b0
	    [&lt;ffffffff81ca6a4d&gt;] __device_attach+0x1cd/0x2c0
	    [&lt;ffffffff81ca7d43&gt;] device_initial_probe+0x13/0x20
	    [&lt;ffffffff81ca451f&gt;] bus_probe_device+0x1af/0x250
	    [&lt;ffffffff81c9e0f3&gt;] device_add+0x943/0x13b0
	    [&lt;ffffffff81c9eb7a&gt;] device_register+0x1a/0x20
	    [&lt;ffffffff81de8626&gt;] i2c_new_device+0x5d6/0x8f0
	    [&lt;ffffffffa0d88ea4&gt;] v4l2_i2c_new_subdev_board+0x1e4/0x250 [v4l2_common]
	    [&lt;ffffffffa0d88fe7&gt;] v4l2_i2c_new_subdev+0xd7/0x110 [v4l2_common]
	    [&lt;ffffffffa13b2f76&gt;] au0828_card_analog_fe_setup+0x2e6/0x3f0 [au0828]

Checking where the error happens:
	(gdb) list *au8522_probe+0x19a
	0x99a is in au8522_probe (drivers/media/dvb-frontends/au8522_decoder.c:761).
	756			printk(KERN_INFO "au8522_decoder attach existing instance.\n");
	757			break;
	758		}
	759
	760		demod_config = kzalloc(sizeof(struct au8522_config), GFP_KERNEL);
	761		if (demod_config == NULL) {
	762			if (instance == 1)
	763				kfree(state);
	764			return -ENOMEM;
	765		}

Shows that the error path is not being handled properly.

The are actually several issues here:

1) config free should have been calling hybrid_tuner_release_state()
function, by calling au8522_release_state();

2) config is only allocated at the digital part. On the analog one,
it is received from the caller.

A complex logic could be added to address it, however, it is simpler
to just embeed config inside the state.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] dvb-frontends: Drop owner assignment from i2c_driver</title>
<updated>2015-08-11T15:58:20Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2015-07-10T06:19:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04d8be053fbeac656f8db2acb768179be9997b0a'/>
<id>urn:sha1:04d8be053fbeac656f8db2acb768179be9997b0a</id>
<content type='text'>
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] au0828/au8522: Add PAL-M support</title>
<updated>2014-06-19T16:31:37Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2014-06-08T16:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2fd7ce6f2dbf286fd07fb82109599df741b57d3'/>
<id>urn:sha1:f2fd7ce6f2dbf286fd07fb82109599df741b57d3</id>
<content type='text'>
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] au8522: Fix demod analog mode setting</title>
<updated>2014-06-19T16:31:17Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2014-06-08T16:54:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9f5ccc24d1c08705ab5ea2bf0d6166c8e8dc545'/>
<id>urn:sha1:c9f5ccc24d1c08705ab5ea2bf0d6166c8e8dc545</id>
<content type='text'>
There are several issues on the current code:
	1) msleep(1) is actually equivalent to msleep(10);
	2) au8522_video_set() will set reg 0xa4 to the
	   proper value for SIF, CVBS or S-Video. No need
	   to force it to CVBS;
	3) Let's not hardcode 0x9d for CBS on audio_set.

Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] au8522: cleanup s-video settings at setup_decoder_defaults()</title>
<updated>2014-06-19T16:27:06Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2014-06-08T16:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65c8820912d9469de75e5c607cefda92f11e3d2f'/>
<id>urn:sha1:65c8820912d9469de75e5c607cefda92f11e3d2f</id>
<content type='text'>
setup_decoder_defaults() doesn't really care about the input
port. All it needs to know is if the input port is s-video or
not.

As the caller function already knows that, just pass a boolean
instead.

Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</content>
</entry>
</feed>
