linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* generic_buffer and 24 bits samples
@ 2016-04-14 15:28 Gregor Boirie
  2016-04-14 16:00 ` Lars-Peter Clausen
  0 siblings, 1 reply; 7+ messages in thread
From: Gregor Boirie @ 2016-04-14 15:28 UTC (permalink / raw)
  To: linux-iio@vger.kernel.org

Greetings,

I'm trying to use an st_pressure based sensor to sample pressure
data using generic_buffer tool. However it seems that it does not
support data packed onto 24 bits samples.
st_pressure driver defines scan_type for my device as:
<code>
/* ... */
     .scan_type = {
         .sign = 'u',
         .realbits = 24,
         .storagebits = 24,
         .endianness = IIO_LE,
     },
</code>

What is the proper way to make this work ? Using 32 bits storagebits
field ? Enhance generic_buffer to support 24 bits samples ? Anything
else ??

It seems iio_compute_scan_bytes consider sample data as a simple byte
stream. So I'm wondering what are the alignment constraints for sample
start address ? Should they be aligned onto their natural "word"
boundaries, i.e. 16 bits for u16, 32 bits for u32, etc... ? And for
24 bits samples ?

Regards.
Grégor

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-15 14:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-14 15:28 generic_buffer and 24 bits samples Gregor Boirie
2016-04-14 16:00 ` Lars-Peter Clausen
2016-04-15  9:56   ` Crestez Dan Leonard
2016-04-15 10:31     ` Lars-Peter Clausen
2016-04-15 13:06       ` Crestez Dan Leonard
2016-04-15 14:35         ` Gregor Boirie
2016-04-15 14:44           ` Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).