mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-19 20:44:44 -04:00
Audio devices are created in the audio subsystem and it is not possible to send a device to bt service upon creation. Introduce hookable audio device factory to allow sharing bluetooth audio device. Move audio devices from bsp to audio allowing removal of unwanted bsp -> audio dependency. Remove Bluetooth proxy device which turned out to be a dead end. Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
31 lines
1.2 KiB
C++
31 lines
1.2 KiB
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "Profile.hpp"
|
|
|
|
namespace audio
|
|
{
|
|
class ProfileRoutingBluetoothHSP : public Profile
|
|
{
|
|
public:
|
|
ProfileRoutingBluetoothHSP(Volume volume, Gain gain)
|
|
: Profile(
|
|
"Routing Bluetooth HSP",
|
|
Type::RoutingBluetoothHSP,
|
|
AudioDevice::Format{.sampleRate_Hz = 8000,
|
|
.bitWidth = 16,
|
|
.flags = static_cast<uint32_t>(
|
|
AudioDevice::Flags::InputLeft) | // microphone use left audio channel
|
|
static_cast<uint32_t>(AudioDevice::Flags::OutputMono),
|
|
.outputVolume = static_cast<float>(volume),
|
|
.inputGain = static_cast<float>(gain),
|
|
.inputPath = AudioDevice::InputPath::None,
|
|
.outputPath = AudioDevice::OutputPath::None},
|
|
AudioDevice::Type::Bluetooth)
|
|
{}
|
|
};
|
|
|
|
} // namespace audio
|