28 lines
1.0 KiB
C++
28 lines
1.0 KiB
C++
/*
|
|
* Avrcp.hpp
|
|
* Bluetooth AVRCP (Audio/Video Remote Control Profile) -- minimal Target role
|
|
* Copyright (c) 2026 Daniel Hammer
|
|
*/
|
|
|
|
#pragma once
|
|
#include <cstdint>
|
|
|
|
namespace Drivers::USB::Bluetooth::Avrcp {
|
|
|
|
// Process an AVCTP packet arriving on an AVRCP control channel (PSM 0x0017).
|
|
// Implements a minimal AVRCP Target: unit/subunit info, honest rejection of
|
|
// unimplemented pass-through controls, capabilities, one-shot absolute-
|
|
// volume notification, and absolute-volume control. Runs
|
|
// from the ACL receive path (DrainEvents, top-level) -- sending is safe
|
|
// there, blocking waits are not (none are used).
|
|
void ProcessAvctp(uint16_t localCid, const uint8_t* data, uint16_t len);
|
|
|
|
// Complete an outstanding EVENT_VOLUME_CHANGED registration. AVRCP
|
|
// notifications are one-shot: after CHANGED the controller registers again.
|
|
void NotifyVolumeChanged(int percent);
|
|
|
|
// Drop registrations tied to a channel that L2CAP has torn down.
|
|
void OnChannelClosed(uint16_t localCid);
|
|
|
|
}
|