[Sound-open-firmware] [PATCH v2 2/3] tune: new component for file IO

Liam Girdwood liam.r.girdwood at intel.com
Thu May 10 20:36:42 CEST 2018


On Thu, 2018-05-10 at 09:36 -0700, Ranjani Sridharan wrote:
> > > +           n_min = (n < n_wrap) ? n : n_wrap;
> > > +           while (n_min > 0) {
> > > +                   n -= nch;
> > > +                   n_min -= nch;
> > > +                   /* copy sample per channel */
> > > +                   for (i = 0; i < nch; i++) {
> > > +                           /* read sample from file */
> > > +                           if (fmt == SOF_IPC_FRAME_S32_LE)
> > > +                                   ret = fscanf(cd->fs.rfh,
> > > "%d", dest);
> > 
> > 
> > Why do we do an fscanf() here ?
> 
> The testbench currently only handles txt input files generated using
> octave. My next action item to be able to read raw pcm files as well. 


Ah, ok - so this should be renamed to text_file.c or similar with some
description about this use case in the header.

Thanks

Liam
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the Sound-open-firmware mailing list