- BT_ASSERT_PRE(is_default,
- "You can only set a default clock value as of this version.");
- return bt_clock_value_set_set_clock_value(&stream_end->cv_set,
- clock_class, raw_value, is_default);
+ BT_ASSERT_PRE(se_notif->stream->class->default_clock_class,
+ "Notification's stream class has no default clock class: "
+ "%![notif-]+n, %![sc-]+S", notif, se_notif->stream->class);
+
+ if (!se_notif->default_cv) {
+ se_notif->default_cv = bt_clock_value_create(
+ se_notif->stream->class->default_clock_class);
+ if (!se_notif->default_cv) {
+ ret = -1;
+ goto end;
+ }
+ }
+
+ bt_clock_value_set_value_inline(se_notif->default_cv, value_cycles);
+ BT_LIB_LOGV("Set notification's default clock value: %![notif-]+n, "
+ "value=%" PRIu64, value_cycles);
+
+end:
+ return ret;