<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hardware_replicant_libsamsung-ipc/include, branch main</title>
<subtitle>external/libsamsung-ipc
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/'/>
<entry>
<title>Add ipc_client_type_string</title>
<updated>2021-09-01T13:41:48+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2021-03-10T17:45:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=119a54a4c1fa321c8f82dc31aa66a24db244ba03'/>
<id>119a54a4c1fa321c8f82dc31aa66a24db244ba03</id>
<content type='text'>
When working on applications using libsamsung-ipc, we sometimes
have functions that have an ipc client type argument and that
work for all 3 ipc client types, or want to refactorize the
code to do that in order to make the code more clean and generic.

However in these cases, these functions often needed to output
some error message or tell users what is going on through
logging prints, and the code ends up being way cleaner if there
is a generic function to get the name of the ipc client type.

In many cases it makes sense not to use the full
IPC_CLIENT_TYPE_&lt;type&gt; name but only the &lt;name&gt; type in these
messages, so because it's easier to add IPC_CLIENT_TYPE_ to the
&lt;type&gt; than removing it, it makes sense to only return the string
associated to the type (like "FMT", "RFS" or "DUMMY".

The least significant number of the library version was also
bumped as we are adding a new function, but the applications that
were built against older libsamsung-ipc revisions should still work.

However applications that depends on this ipc_client_type_string
will not work with previous versions of libsamsung-ipc.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When working on applications using libsamsung-ipc, we sometimes
have functions that have an ipc client type argument and that
work for all 3 ipc client types, or want to refactorize the
code to do that in order to make the code more clean and generic.

However in these cases, these functions often needed to output
some error message or tell users what is going on through
logging prints, and the code ends up being way cleaner if there
is a generic function to get the name of the ipc client type.

In many cases it makes sense not to use the full
IPC_CLIENT_TYPE_&lt;type&gt; name but only the &lt;name&gt; type in these
messages, so because it's easier to add IPC_CLIENT_TYPE_ to the
&lt;type&gt; than removing it, it makes sense to only return the string
associated to the type (like "FMT", "RFS" or "DUMMY".

The least significant number of the library version was also
bumped as we are adding a new function, but the applications that
were built against older libsamsung-ipc revisions should still work.

However applications that depends on this ipc_client_type_string
will not work with previous versions of libsamsung-ipc.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samsung-ipc/utils: add data_read and data_write</title>
<updated>2021-02-16T12:39:13+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2021-02-16T12:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=f72c03f81c6d2cbf5510838a8ae0c99a11f43048'/>
<id>f72c03f81c6d2cbf5510838a8ae0c99a11f43048</id>
<content type='text'>
These wrappers are meant to handle the case where read or writes
handles a smaller number of bytes than requested.

This way that handling doesn't need to be duplicated everywhere
in libsamsung-ipc.

Having access to the ipc_client struct could enable future
logging of read and writes without having to change any of the
code already using data_read and data_write.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These wrappers are meant to handle the case where read or writes
handles a smaller number of bytes than requested.

This way that handling doesn't need to be duplicated everywhere
in libsamsung-ipc.

Having access to the ipc_client struct could enable future
logging of read and writes without having to change any of the
code already using data_read and data_write.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipc_utils: add ipc_group_string</title>
<updated>2021-02-01T17:51:36+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2021-01-21T09:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=5a643dd89e2636cea19d9642c3a205d2d20250ec'/>
<id>5a643dd89e2636cea19d9642c3a205d2d20250ec</id>
<content type='text'>
While ipc_group_string is not used by libsamsung-ipc (yet),
it's still a good idea to add it as tools and applications using
libsamsung-ipc can then use it to display the group of a command.

It's also a better idea to have it in libsamsung-ipc than in
each tool using it as libsamsung-ipc centralizes the knowledge
about the samsung-ipc protocol, so if new groups appear at some
point, the ipc_group_string function could be updated along the way.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While ipc_group_string is not used by libsamsung-ipc (yet),
it's still a good idea to add it as tools and applications using
libsamsung-ipc can then use it to display the group of a command.

It's also a better idea to have it in libsamsung-ipc than in
each tool using it as libsamsung-ipc centralizes the knowledge
about the samsung-ipc protocol, so if new groups appear at some
point, the ipc_group_string function could be updated along the way.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>include: samsung-ipc.h: fix missing off_t definition</title>
<updated>2021-02-01T17:49:11+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2021-01-28T17:03:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=1bfa8812baf86268113de44c1aec2a4a4742ad35'/>
<id>1bfa8812baf86268113de44c1aec2a4a4742ad35</id>
<content type='text'>
Including samsung-ipc.h in a file without other includes results
in a compilation error:
    .../include/samsung-ipc.h:161:1: error: unknown type name ‘off_t’
       161 | off_t file_data_size(struct ipc_client *client, [...]
           | ^~~~~

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Including samsung-ipc.h in a file without other includes results
in a compilation error:
    .../include/samsung-ipc.h:161:1: error: unknown type name ‘off_t’
       161 | off_t file_data_size(struct ipc_client *client, [...]
           | ^~~~~

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>include: samsung-ipc.h: fix missing size_t definition</title>
<updated>2021-02-01T17:47:36+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2021-01-28T17:00:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=4e08ce0a985b7246e868cb4ea2e0283fde83c5f2'/>
<id>4e08ce0a985b7246e868cb4ea2e0283fde83c5f2</id>
<content type='text'>
Including samsung-ipc.h in a file without other includes results
in a compilation error:
    .../include/samsung-ipc.h:51:2: error: unknown type name ‘size_t’
        51 |  size_t size;
           |  ^~~~~~
    .../include/samsung-ipc.h:77:7: error: unknown type name ‘size_t’
        77 |       size_t size),
           |       ^~~~~~
    .../include/samsung-ipc.h:26:1: note: ‘size_t’ is defined in header
                                   ‘&lt;stddef.h&gt;’;
				   did you forget to ‘#include &lt;stddef.h&gt;’?
        25 | #include &lt;sys/time.h&gt;
       +++ |+#include &lt;stddef.h&gt;
        26 |

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Including samsung-ipc.h in a file without other includes results
in a compilation error:
    .../include/samsung-ipc.h:51:2: error: unknown type name ‘size_t’
        51 |  size_t size;
           |  ^~~~~~
    .../include/samsung-ipc.h:77:7: error: unknown type name ‘size_t’
        77 |       size_t size),
           |       ^~~~~~
    .../include/samsung-ipc.h:26:1: note: ‘size_t’ is defined in header
                                   ‘&lt;stddef.h&gt;’;
				   did you forget to ‘#include &lt;stddef.h&gt;’?
        25 | #include &lt;sys/time.h&gt;
       +++ |+#include &lt;stddef.h&gt;
        26 |

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>include: samsung-ipc.h: move include inside the #ifdef/#endif guards</title>
<updated>2021-02-01T17:29:01+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2021-01-28T16:55:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=a8b18ea10bddf8be4526fd101112f41b93df55cd'/>
<id>a8b18ea10bddf8be4526fd101112f41b93df55cd</id>
<content type='text'>
This separates more what is part of the header and what is not
so things are more clear to the people reading the code.

In addition, having all includes statements inside the #ifdef #endif
header guards avoids issues with the inclusion of headers that are
missing such guards. This can happen with headers imported from vendor
kernels.

So while headers imported from vendor kernels are typically not
included in the headers exported by libsamsung-ipc, it's still good
to have a consistent code style between exported and non exported
headers.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This separates more what is part of the header and what is not
so things are more clear to the people reading the code.

In addition, having all includes statements inside the #ifdef #endif
header guards avoids issues with the inclusion of headers that are
missing such guards. This can happen with headers imported from vendor
kernels.

So while headers imported from vendor kernels are typically not
included in the headers exported by libsamsung-ipc, it's still good
to have a consistent code style between exported and non exported
headers.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samsung-ipc/utils: Add file_data_size</title>
<updated>2020-11-03T16:07:22+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2020-10-11T22:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=dd7cbaad6f008a03261411912b71011eb43cfa14'/>
<id>dd7cbaad6f008a03261411912b71011eb43cfa14</id>
<content type='text'>
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>includes: svc.h: switch to Linux code style</title>
<updated>2020-06-27T16:41:16+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2020-04-04T17:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=7aa458254b0757ed4a497d4f7db62dbc89d35f8a'/>
<id>7aa458254b0757ed4a497d4f7db62dbc89d35f8a</id>
<content type='text'>
This contains no functional changes.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
Reviewed-by: Joonas Kylmälä &lt;joonas.kylmala@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This contains no functional changes.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
Reviewed-by: Joonas Kylmälä &lt;joonas.kylmala@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>includes: ss.h: switch to Linux code style</title>
<updated>2020-06-27T16:41:11+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2020-04-04T17:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=77ad081b207f0756eafa66eb0d989eae5cbc4459'/>
<id>77ad081b207f0756eafa66eb0d989eae5cbc4459</id>
<content type='text'>
This contains no functional changes.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
Reviewed-by: Joonas Kylmälä &lt;joonas.kylmala@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This contains no functional changes.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
Reviewed-by: Joonas Kylmälä &lt;joonas.kylmala@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>includes: snd.h: switch to Linux code style</title>
<updated>2020-06-27T16:41:02+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2020-04-04T17:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=38d1700ad7b98e50b56ca3b8eb3c181ccaa1c8ae'/>
<id>38d1700ad7b98e50b56ca3b8eb3c181ccaa1c8ae</id>
<content type='text'>
This contains no functional changes.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
Reviewed-by: Joonas Kylmälä &lt;joonas.kylmala@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This contains no functional changes.

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
Reviewed-by: Joonas Kylmälä &lt;joonas.kylmala@iki.fi&gt;
</pre>
</div>
</content>
</entry>
</feed>
