Skip to content

Conversation

@gastmaier
Copy link
Contributor

!important: In case #1344 does not revert iio_buffer_params. In case #1344 does not revert iio_buffer_params.

8291539 ("task: Implement iio_buffer_params struct and make CMA selectable at runtime") implemented iio_buffer_params, replacing idx with a struct. In the python binding, the change broke usage since dropped optional idx with required params. Define the struct in python, defaulting .idx to 0 and .dma_allocator = IIO_DMA_ALLOCATOR_SYSTEM, and make optional, to restore compatibility with legacy code (idx was hardly set).

PR Description

  • Please replace this comment with a summary of your changes, and add any context
    necessary to understand them. List any dependencies required for this change.
  • To check the checkboxes below, insert a 'x' between square brackets (without
    any space), or simply check them after publishing the PR.
  • If you changes include a breaking change, please specify dependent PRs in the
    description and try to push all related PRs simultaneously.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have commented new code, particularly complex or unclear areas
  • I have checked that I did not introduce new warnings or errors (CI output)
  • I have checked that components that use libiio did not get broken
  • I have updated the documentation accordingly (GitHub Pages, READMEs, etc)

8291539 ("task: Implement iio_buffer_params struct and make CMA selectable at runtime")
implemented iio_buffer_params, replacing idx with a struct. In the
python binding, the change broke usage since dropped optional idx with
required params. Define the struct in python, defaulting .idx to 0 and
.dma_allocator = IIO_DMA_ALLOCATOR_SYSTEM, and make optional, to restore
compatibility with legacy code (idx was hardly set).
In case #1344 does not revert iio_buffer_params.

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
@nunojsa
Copy link
Contributor

nunojsa commented Nov 13, 2025

In case #1344 does not revert iio_buffer_params.

I'm fairly sure the revert is to be merged 😅

@gastmaier
Copy link
Contributor Author

still useful to see the shortcoming of removing the default/optional ... and the implementation, since there is another similar TODO in the file

@gastmaier
Copy link
Contributor Author

Revert was merged, so this is not relevant anymore

@gastmaier gastmaier closed this Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants