Skip to content

Conversation

@szymon-czapracki
Copy link
Contributor

This changes VOCS set location behavior.
When an RFU location is written, VOCS ignores it.

This issue was found while executing VOCS/SR/SPE/BI-01-C test case.

MariuszSkamra
MariuszSkamra previously approved these changes Oct 6, 2022
Copy link
Contributor

@MariuszSkamra MariuszSkamra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, however would be nice to avoid magic numbers ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this one I guess

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@Thalley Thalley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments; not necessarily anything that needs changing, but responses on them would be nice

@szymon-czapracki szymon-czapracki requested review from Thalley and removed request for Vudentz October 7, 2022 09:42
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the RFU locations is really what we want, we should have that as a define as well (or instead).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Thalley nah, everything that is not defined in enum bt_audio_location can be considered as RFU, thus I'd not define RFU values explicitly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not suggesting that we in audio.h defined the RFU values, but IMO it makes more sense to use a #define for the RFU values instead of a local variable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Thalley I understand now, makes sense indeed :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MariuszSkamra @Thalley I'm not sure if I'm defining this macro now correctly. Is this the proper way?

@szymon-czapracki szymon-czapracki force-pushed the vocs_location_fix branch 2 times, most recently from 0b8caba to ccbc09e Compare January 19, 2023 02:52
This commit changes VOCS set location behavior.
When an RFU location is written, VOCS ignores it.

Signed-off-by: Szymon Czapracki <[email protected]>

#define VALID_VOCS_OPCODE(opcode) ((opcode) == BT_VOCS_OPCODE_SET_OFFSET)

#define BT_AUDIO_LOCATION_RFU (~BT_AUDIO_LOCATION_ANY)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: We should probably avoid using the BT prefix for macros that only exist in specifics source files

Suggested change
#define BT_AUDIO_LOCATION_RFU (~BT_AUDIO_LOCATION_ANY)
#define AUDIO_LOCATION_RFU (~BT_AUDIO_LOCATION_ANY)

The alternative is to move this macro to audio_internal; quite possibly it's something we may use for other modules as well. Either way works :)

@carlescufi carlescufi merged commit 77c8cff into zephyrproject-rtos:main Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants