Add support for device and direction parameters