Skip to content

Calling poll() with iio_buffer_get_poll_fd() hangs with certain profiles #1364

@pfeatherstone

Description

@pfeatherstone

I'm using a Bytepipe x9002 with a Yocto Linux image and meta-adi. I'm also using a CMOS build. I'm building a software application where I want to use poll() on the file descriptor returned by iio_buffer_get_poll_fd() on an RX buffer to wait on incoming data, leaving my application room to do other stuff in the background, then call iio_buffer_refill() to read the data. I've had some success with this when using profiles where both RX and TX use a common sample rate and are fairly low, i.e. < 1Msps. When i use a profile where RX rate is 20Msps and TX rate is < 2Msps, a call to poll() will indefinitely hang. I've tried setting the buffer in both blocking and non-blocking mode, it makes no difference.

If i do a synchronous read, i.e. buffer is in blocking mode and just call iio_buffer_refill() it works. The problem is when i call poll().
My profile is:

250311FddRx15MHz20MspsNCO9926kHzTx31p25kHz1250kspsMCSCmosApi68p13p7.bin.txt
250311FddRx15MHz20MspsNCO9926kHzTx31p25kHz1250kspsMCSCmosApi68p13p7.json.txt
250311FddRx15MHz20MspsNCO9926kHzTx31p25kHz1250kspsMCSCmosApi68p13p7.taxidi.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions