<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/media/rc/rc-loopback.c, branch v3.9.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[media] rc-core: add separate defines for protocol bitmaps and numbers</title>
<updated>2012-10-27T13:49:51+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2012-10-11T22:11:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c003ab1bedf028db15b0185b683d5c387204e8f5'/>
<id>c003ab1bedf028db15b0185b683d5c387204e8f5</id>
<content type='text'>
The RC_TYPE_* defines are currently used both where a single protocol is
expected and where a bitmap of protocols is expected.

Functions like rc_keydown() and functions which add/remove entries to the
keytable want a single protocol. Future userspace APIs would also
benefit from numeric protocols (rather than bitmap ones). Keytables are
smaller if they can use a small(ish) integer rather than a bitmap.

Other functions or struct members (e.g. allowed_protos,
enabled_protocols, etc) accept multiple protocols and need a bitmap.

Using different types reduces the risk of programmer error. Using a
protocol enum whereever possible also makes for a more future-proof
user-space API as we don't need to worry about a sufficient number of
bits being available (e.g. in structs used for ioctl() calls).

The use of both a number and a corresponding bit is dalso one in e.g.
the input subsystem as well (see all the references to set/clear bit when
changing keytables for example).

This patch separate the different usages in preparation for
upcoming patches.

Where a single protocol is expected, enum rc_type is used; where one or more
protocol(s) are expected, something like u64 is used.

The patch has been rewritten so that the format of the sysfs "protocols"
file is no longer altered (at the loss of some detail). The file itself
should probably be deprecated in the future though.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Cc: Andy Walls &lt;awalls@md.metrocast.net&gt;
Cc: Maxim Levitsky &lt;maximlevitsky@gmail.com&gt;
Cc: Antti Palosaari &lt;crope@iki.fi&gt;
Cc: Mike Isely &lt;isely@pobox.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The RC_TYPE_* defines are currently used both where a single protocol is
expected and where a bitmap of protocols is expected.

Functions like rc_keydown() and functions which add/remove entries to the
keytable want a single protocol. Future userspace APIs would also
benefit from numeric protocols (rather than bitmap ones). Keytables are
smaller if they can use a small(ish) integer rather than a bitmap.

Other functions or struct members (e.g. allowed_protos,
enabled_protocols, etc) accept multiple protocols and need a bitmap.

Using different types reduces the risk of programmer error. Using a
protocol enum whereever possible also makes for a more future-proof
user-space API as we don't need to worry about a sufficient number of
bits being available (e.g. in structs used for ioctl() calls).

The use of both a number and a corresponding bit is dalso one in e.g.
the input subsystem as well (see all the references to set/clear bit when
changing keytables for example).

This patch separate the different usages in preparation for
upcoming patches.

Where a single protocol is expected, enum rc_type is used; where one or more
protocol(s) are expected, something like u64 is used.

The patch has been rewritten so that the format of the sysfs "protocols"
file is no longer altered (at the loss of some detail). The file itself
should probably be deprecated in the future though.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Cc: Andy Walls &lt;awalls@md.metrocast.net&gt;
Cc: Maxim Levitsky &lt;maximlevitsky@gmail.com&gt;
Cc: Antti Palosaari &lt;crope@iki.fi&gt;
Cc: Mike Isely &lt;isely@pobox.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] rc-core: move timeout and checks to lirc</title>
<updated>2012-08-13T22:59:41+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2011-04-28T14:14:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f8e00d5fa86fbc4462647da162152d4e74db784c'/>
<id>f8e00d5fa86fbc4462647da162152d4e74db784c</id>
<content type='text'>
The lirc TX functionality expects the process which writes (TX) data to
the lirc dev to sleep until the actual data has been transmitted by the
hardware.

Since the same timeout calculation is duplicated in more than one driver
(and would have to be duplicated in even more drivers as they gain TX
support), it makes sense to move this timeout calculation to the lirc
layer instead.

At the same time, centralize some of the sanity checks.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Cc: Jarod Wilson &lt;jwilson@redhat.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The lirc TX functionality expects the process which writes (TX) data to
the lirc dev to sleep until the actual data has been transmitted by the
hardware.

Since the same timeout calculation is duplicated in more than one driver
(and would have to be duplicated in even more drivers as they gain TX
support), it makes sense to move this timeout calculation to the lirc
layer instead.

At the same time, centralize some of the sanity checks.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Cc: Jarod Wilson &lt;jwilson@redhat.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] rc-loopback: remove duplicate line</title>
<updated>2012-05-20T19:06:06+00:00</updated>
<author>
<name>Michel Machado</name>
<email>michel@digirati.com.br</email>
</author>
<published>2012-05-18T12:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e243c3c4f7305310a283cd2f762f889a48dad90a'/>
<id>e243c3c4f7305310a283cd2f762f889a48dad90a</id>
<content type='text'>
This patch just removes the second assignment "rc-&gt;priv = &amp;loopdev;"
that happens a fews lines after the first one.

Signed-off-by: Michel Machado &lt;michel@digirati.com.br&gt;
CC: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
CC: "David Härdeman" &lt;david@hardeman.nu&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch just removes the second assignment "rc-&gt;priv = &amp;loopdev;"
that happens a fews lines after the first one.

Signed-off-by: Michel Machado &lt;michel@digirati.com.br&gt;
CC: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
CC: "David Härdeman" &lt;david@hardeman.nu&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] rc-core: lirc use unsigned int</title>
<updated>2011-07-27T20:52:59+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2011-04-28T15:13:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5588dc2b025fd8b2188142b8d59efe562bd57d80'/>
<id>5588dc2b025fd8b2188142b8d59efe562bd57d80</id>
<content type='text'>
Durations can never be negative, so it makes sense to consistently use
unsigned int for LIRC transmission. Contrary to the initial impression,
this shouldn't actually change the userspace API.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Durations can never be negative, so it makes sense to consistently use
unsigned int for LIRC transmission. Contrary to the initial impression,
this shouldn't actually change the userspace API.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] rc-core: add trailing silence in rc-loopback tx</title>
<updated>2011-05-20T12:29:53+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2011-04-28T15:13:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=08ffff9fa410916f1847aff831206465cefa924f'/>
<id>08ffff9fa410916f1847aff831206465cefa924f</id>
<content type='text'>
If an IR command is sent (using the LIRC userspace) to rc-loopback
which doesn't include a trailing space, the result is that the message
won't be completely decoded. In addition, "leftovers" from a previous
transmission can be left until the next one. Fix this by faking a long
silence after the end of TX data.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If an IR command is sent (using the LIRC userspace) to rc-loopback
which doesn't include a trailing space, the result is that the message
won't be completely decoded. In addition, "leftovers" from a previous
transmission can be left until the next one. Fix this by faking a long
silence after the end of TX data.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] rc-core: add loopback driver</title>
<updated>2010-12-29T10:16:58+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2010-11-25T21:36:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=801c73c04ad57689dc9b47baf62cbb23f954d987'/>
<id>801c73c04ad57689dc9b47baf62cbb23f954d987</id>
<content type='text'>
This patch adds a loopback driver to rc-core which I've found useful for
running scripted tests of different parts of rc-core without having to
fiddle with real hardware.

Basically it emulates hardware with a learning and a non-learning
receiver and two transmitters (which correspond to the two
receivers). TX data that is sent is fed back as input on the
corresponding receiver, which allows for debugging of IR decoders,
keymaps, etc.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a loopback driver to rc-core which I've found useful for
running scripted tests of different parts of rc-core without having to
fiddle with real hardware.

Basically it emulates hardware with a learning and a non-learning
receiver and two transmitters (which correspond to the two
receivers). TX data that is sent is fed back as input on the
corresponding receiver, which allows for debugging of IR decoders,
keymaps, etc.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
