From 6af92a8a76832cf833fa231caab7e3cb0e16ac08 Mon Sep 17 00:00:00 2001 From: Manuel Weichselbaumer Date: Mon, 11 Mar 2024 22:56:34 +0100 Subject: [PATCH] Release v0.9.0 --- .gitmodules | 6 - CMakeLists.txt | 16 +- README.md | 15 +- bluebricated/CMakeLists.txt | 29 ---- bluebricated/src/Controller.cpp | 32 ---- bluebricated/src/Controller.h | 20 --- bluebricated/src/audio/Controller.cpp | 69 -------- bluebricated/src/audio/Controller.h | 53 ------ bluebricated/src/bluetooth/AudioSinkAgent.cpp | 68 -------- bluebricated/src/bluetooth/AudioSinkAgent.h | 41 ----- bluebricated/src/bluetooth/Controller.cpp | 151 ------------------ bluebricated/src/bluetooth/Controller.h | 54 ------- bluebricated/src/main.cpp | 33 ---- cornrowd/CMakeLists.txt | 2 +- cornrowd/src/Controller.cpp | 14 +- cornrowd/src/Controller.h | 4 +- cornrowd/src/bluetooth/CMakeLists.txt | 5 +- cornrowd/src/bluetooth/Controller.h | 1 + cornrowd/src/config/CMakeLists.txt | 2 +- cornrowd/src/config/ConfigManager.cpp | 10 +- cornrowd/src/config/ConfigManager.h | 4 +- debian/changelog | 6 + debian/control | 2 - thirdparty/bluez-qt | 1 - thirdparty/libcornrow | 2 +- thirdparty/qtzeroprops | 1 - 26 files changed, 37 insertions(+), 604 deletions(-) delete mode 100644 bluebricated/CMakeLists.txt delete mode 100644 bluebricated/src/Controller.cpp delete mode 100644 bluebricated/src/Controller.h delete mode 100644 bluebricated/src/audio/Controller.cpp delete mode 100644 bluebricated/src/audio/Controller.h delete mode 100644 bluebricated/src/bluetooth/AudioSinkAgent.cpp delete mode 100644 bluebricated/src/bluetooth/AudioSinkAgent.h delete mode 100644 bluebricated/src/bluetooth/Controller.cpp delete mode 100644 bluebricated/src/bluetooth/Controller.h delete mode 100644 bluebricated/src/main.cpp delete mode 160000 thirdparty/bluez-qt delete mode 160000 thirdparty/qtzeroprops diff --git a/.gitmodules b/.gitmodules index 4e48d51..07e190d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ [submodule "thirdparty/libcornrow"] path = thirdparty/libcornrow url = https://github.com/mincequi/libcornrow -[submodule "thirdparty/bluez-qt"] - path = thirdparty/bluez-qt - url = https://github.com/mincequi/bluez-qt.git -[submodule "thirdparty/qtzeroprops"] - path = thirdparty/qtzeroprops - url = https://github.com/mincequi/qtzeroprops.git diff --git a/CMakeLists.txt b/CMakeLists.txt index facc7dc..c35bec2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ set(CMAKE_CXX_STANDARD 17) # -Werror \ -find_package(Qt5 COMPONENTS Core Network WebSockets REQUIRED) +find_package(Qt5 REQUIRED COMPONENTS Core Network) # Add thirdparty libs add_subdirectory(thirdparty/libcornrow) -add_subdirectory(thirdparty/qtzeroprops) +#add_subdirectory(thirdparty/qtzeroprops) # Add internal libs add_subdirectory(common) @@ -26,20 +26,10 @@ add_subdirectory(cornrowd) #add_subdirectory(net) #add_subdirectory(bluebricated) -# Replace install() to do-nothing macro. -macro(install) -endmacro() -add_subdirectory(thirdparty/bluez-qt) -# Restore original install() behavior. -# @TODO(mawe): restoring original install() does not work. So, add subdirs above this section, that have an install target. -macro(install) - _install(${ARGN}) -endmacro() - # Mandatory debian variables SET(CPACK_GENERATOR "DEB") SET(CPACK_PACKAGE_CONTACT "mincequi@web.de") -SET(CPACK_PACKAGE_VERSION "0.1.0") +SET(CPACK_PACKAGE_VERSION "0.9.0") SET(CPACK_PACKAGE_DESCRIPTION "Bluetooth audio player") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "This daemon accepts and plays audio from any Bluetooth source and turns your linux PC into a Bluetooth speaker.") #CPACK_SYSTEM_NAME -> CMAKE_SYSTEM_NAME diff --git a/README.md b/README.md index ccb1f25..ed894ab 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,16 @@ Cornrow is an audio sink daemon for Bluetooth and Airplay streams. It is designe It is made for Debian based environments and compatible with Ubuntu and Debian. This means that this service runs as a dedicated user and can be cleanly installed and removed using Debian package management. **Note:** for Debian Buster and Ubuntu Bionic (18.04) please use cornrow **v0.8.0**. -for Debian Bullseye and Ubuntu Focal (20.04) and later, please use cornrow **v0.8.1**. - -The daemon has a built-in equalizer which can be remote controlled via this app: -[corocomo](https://play.google.com/store/apps/details?id=org.cornrow.corocomo) -![alt text](https://github.com/mincequi/cornrow/blob/master/data/screenshot_1.png) - - +For Debian Bullseye and Ubuntu Focal (20.04) and later, please use cornrow **v0.8.1**. +For Debian Bookworm and later, please use cornrow **v0.9.0**. ## Installation (binary) Compiled debian/ubuntu packages are available for [armhf](https://github.com/mincequi/cornrow/releases/download/v0.8.1/cornrowd_0.8.1_armhf.deb) and [amd64](https://github.com/mincequi/cornrow/releases/download/v0.6.0/cornrowd_0.6.0_amd64.deb). ``` -wget https://github.com/mincequi/cornrow/releases/download/v0.8.1/cornrowd_0.8.1_armhf.deb +wget https://github.com/mincequi/cornrow/releases/download/v0.9.0/cornrowd_0.9.0_armhf.deb sudo apt update -sudo apt install ./cornrowd_0.8.1_armhf.deb +sudo apt install ./cornrowd_0.9.0_armhf.deb sudo systemctl unmask cornrowd.service # unmask service sudo systemctl start cornrowd.service # start-up service. You should now be able to connect any bluetooth audio device. sudo systemctl enable cornrowd.service # start-up service on each reboot. @@ -36,8 +31,6 @@ sudo apt install \ fakeroot \ libtool \ cmake \ - extra-cmake-modules \ - portaudio19-dev \ libasio-dev \ libasound2-dev \ libavahi-compat-libdnssd-dev \ diff --git a/bluebricated/CMakeLists.txt b/bluebricated/CMakeLists.txt deleted file mode 100644 index 79d7813..0000000 --- a/bluebricated/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -project(bluebricated) - -set(CMAKE_AUTOMOC ON) - -find_package(Qt5 CONFIG REQUIRED Bluetooth Core DBus) - -add_executable(${PROJECT_NAME} - src/Controller.cpp - src/main.cpp - src/audio/Controller.cpp - src/bluetooth/AudioSinkAgent.cpp - src/bluetooth/Controller.cpp - ../cornrowd/src/audio/Converter.cpp - ../cornrowd/src/audio/FileDescriptorSource.cpp - ../cornrowd/src/audio/Pipeline.cpp - ../cornrowd/src/audio/CoroPipeline.cpp -) - -target_link_libraries(${PROJECT_NAME} - audio - gstreamermm-dsp - KF5BluezQt - Qt5::Bluetooth - Qt5::DBus -) - -install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION bin -) diff --git a/bluebricated/src/Controller.cpp b/bluebricated/src/Controller.cpp deleted file mode 100644 index 2b6a393..0000000 --- a/bluebricated/src/Controller.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "Controller.h" - -#include - -#include "audio/Controller.h" -#include "bluetooth/Controller.h" - -Controller::Controller(QObject *parent) - : QObject(parent) -{ - // Create objects - m_bluetooth = new bluetooth::Controller(this); - m_audio = new audio::Controller(this); - - connect(m_bluetooth, &bluetooth::Controller::transportChanged, this, &Controller::onTransportChanged); - connect(m_bluetooth, &bluetooth::Controller::volumeChanged, this, &Controller::onVolumeChanged); -} - -Controller::~Controller() -{ -} - -void Controller::onTransportChanged(int fd, uint16_t blockSize) -{ - qDebug() << __func__ << "> fd:" << fd << ", blockSize: " << blockSize; - m_audio->setTransport(fd, blockSize, 44100); -} - -void Controller::onVolumeChanged(float volume) -{ - m_audio->setVolume(volume); -} diff --git a/bluebricated/src/Controller.h b/bluebricated/src/Controller.h deleted file mode 100644 index bebea11..0000000 --- a/bluebricated/src/Controller.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include "audio/Controller.h" -#include "bluetooth/Controller.h" - -class Controller : public QObject -{ - Q_OBJECT - -public: - Controller(QObject* parent = nullptr); - ~Controller(); - -private: - void onTransportChanged(int fd, uint16_t blockSize); - void onVolumeChanged(float volume); - - audio::Controller* m_audio; - bluetooth::Controller* m_bluetooth; -}; diff --git a/bluebricated/src/audio/Controller.cpp b/bluebricated/src/audio/Controller.cpp deleted file mode 100644 index d7b0d5a..0000000 --- a/bluebricated/src/audio/Controller.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2018 Manuel Weichselbaumer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "Controller.h" - -#include - -#include "../../cornrowd/src/audio/CoroPipeline.h" -#include "../../cornrowd/src/audio/FileDescriptorSource.h" -#include "../../cornrowd/src/audio/Pipeline.h" - -namespace audio -{ - -Controller::Controller(QObject *parent) - : QObject(parent) -{ - // Init gstreamermm-dsp - coro::init(); - - m_coroPipeline = new CoroPipeline(); -} - -Controller::~Controller() -{ - delete m_coroPipeline; -} - -void Controller::setTransport(int fd, uint16_t blockSize, int rate) -{ - // Stop pipeline (in any case). - //m_pipeline->stop(); - if (m_fdSource) { - delete m_fdSource; - m_fdSource = nullptr; - } - - if (fd < 0) { - return; - } - - m_fd = fd; - m_blockSize = blockSize; - m_rate = rate; - - m_fdSource = new FileDescriptorSource(fd, blockSize, m_coroPipeline); -} - -void Controller::setVolume(float volume) -{ - // @TODO(mawe): enable volume on CoroPipeline - //m_coroPipeline->setVolume(volume); -} - -} // namespace audio diff --git a/bluebricated/src/audio/Controller.h b/bluebricated/src/audio/Controller.h deleted file mode 100644 index d01c47d..0000000 --- a/bluebricated/src/audio/Controller.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2018 Manuel Weichselbaumer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include - -class CoroPipeline; -class FileDescriptorSource; - -namespace audio -{ - -class Controller : public QObject -{ - Q_OBJECT - -public: - explicit Controller(QObject* parent = nullptr); - ~Controller(); - - void setTransport(int fd, uint16_t blockSize, int rate); - - void setVolume(float volume); - -private: - void updatePipeline(); - - CoroPipeline* m_coroPipeline = nullptr; - - std::string m_transport; - int m_fd = -1; - uint16_t m_blockSize = 0; - int m_rate = 44100; - - FileDescriptorSource* m_fdSource = nullptr; -}; - -} // namespace audio diff --git a/bluebricated/src/bluetooth/AudioSinkAgent.cpp b/bluebricated/src/bluetooth/AudioSinkAgent.cpp deleted file mode 100644 index 022c4f4..0000000 --- a/bluebricated/src/bluetooth/AudioSinkAgent.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2018 Manuel Weichselbaumer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "AudioSinkAgent.h" - -#include -#include - -#include - -namespace bluetooth -{ - -using namespace BluezQt; - -class AudioSinkAgentPrivate -{ -public: - QStringList allowedUuids; -}; - -AudioSinkAgent::AudioSinkAgent(const QStringList &uuids, QObject *parent) - : Agent(parent) - , d(new AudioSinkAgentPrivate) -{ - d->allowedUuids = uuids; -} - -AudioSinkAgent::~AudioSinkAgent() -{ - delete d; -} - -QDBusObjectPath AudioSinkAgent::objectPath() const -{ - return QDBusObjectPath("/Agent/FifoAgent"); -} - -Agent::Capability AudioSinkAgent::capability() const -{ - return Agent::NoInputNoOutput; -} - -void AudioSinkAgent::authorizeService(DevicePtr device, const QString &uuid, const Request<> &request) -{ - if (!d->allowedUuids.contains(uuid)) { - request.reject(); - } else { - qDebug() << "Accepted service:" << uuid << "from" << device->friendlyName(); - request.accept(); - } -} - -} // namespace bluetooth diff --git a/bluebricated/src/bluetooth/AudioSinkAgent.h b/bluebricated/src/bluetooth/AudioSinkAgent.h deleted file mode 100644 index 8698c17..0000000 --- a/bluebricated/src/bluetooth/AudioSinkAgent.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2018 Manuel Weichselbaumer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include - -namespace bluetooth -{ - -class AudioSinkAgent : public BluezQt::Agent -{ - Q_OBJECT - -public: - explicit AudioSinkAgent(const QStringList &uuids, QObject *parent = nullptr); - ~AudioSinkAgent() override; - -private: - QDBusObjectPath objectPath() const override; - Capability capability() const override; - void authorizeService(BluezQt::DevicePtr device, const QString &uuid, const BluezQt::Request<> &request) override; - - class AudioSinkAgentPrivate *const d = nullptr; -}; - -} // namespace bluetooth diff --git a/bluebricated/src/bluetooth/Controller.cpp b/bluebricated/src/bluetooth/Controller.cpp deleted file mode 100644 index e2dd021..0000000 --- a/bluebricated/src/bluetooth/Controller.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2018 Manuel Weichselbaumer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "Controller.h" - -#include "AudioSinkAgent.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace std::placeholders; - -namespace bluetooth -{ - -using namespace BluezQt; - -Controller::Controller(QObject *parent) - : QObject(parent) -{ - // - QBluetoothLocalDevice localDevice; - localDevice.setHostMode(QBluetoothLocalDevice::HostDiscoverable); - - // Init BluezQt - m_manager = new Manager(this); - InitManagerJob* initJob = m_manager->init(); - initJob->exec(); - if (initJob->error()) { - qWarning() << "Error initializing bluetooth manager:" << initJob->errorText(); - return; - } - - AudioSinkAgent* agent = new AudioSinkAgent({Services::AdvancedAudioDistribution, Services::AudioVideoRemoteControl}, this); - m_manager->registerAgent(agent); - m_manager->requestDefaultAgent(agent); - - MediaEndpoint* sbcSink = new MediaEndpoint({MediaEndpoint::Role::AudioSink, MediaEndpoint::Codec::Sbc}, m_manager); - m_manager->usableAdapter()->media()->registerEndpoint(sbcSink); - connect(m_manager, &Manager::deviceChanged, [this](DevicePtr device) { - qDebug() << "Bluetooth device changed>" << device; - connect(device.data(), &Device::mediaTransportChanged, this, &Controller::onTransportChanged); - }); - - for (auto adapter : m_manager->adapters()) { - adapter->setDiscoverableTimeout(0); - adapter->setPairableTimeout(0); - adapter->setDiscoverable(true); - adapter->setPairable(true); - } -} - -Controller::~Controller() -{ -} - -void Controller::onTransportChanged(MediaTransportPtr transport) -{ - qDebug() << __func__ << ">" << transport.data(); - - if (m_transport == transport) { - return; - } - - if (m_transport) { - disconnect(m_transport.data(), &MediaTransport::stateChanged, this, &Controller::onTransportStateChanged); - disconnect(m_transport.data(), &MediaTransport::volumeChanged, this, &Controller::onTransportVolumeChanged); - } - - m_transport = transport; - if (!m_transport) { - emit transportChanged(-1, 0); - return; - } - - connect(m_transport.data(), &MediaTransport::stateChanged, this, &Controller::onTransportStateChanged); - connect(m_transport.data(), &MediaTransport::volumeChanged, this, &Controller::onTransportVolumeChanged); -} - -void Controller::onTransportStateChanged(BluezQt::MediaTransport::State state) -{ - qDebug() << "Transport state:" << state; - - switch (state) { - case MediaTransport::State::Idle: - // Bluez already releases transport. No need to do manually. - //m_transport->release(); - emit transportChanged(-1, 0); - break; - case MediaTransport::State::Pending: { - //QCoreApplication::processEvents(); - auto *call = m_transport->tryAcquire(); - connect(call, &PendingCall::finished, [this, call]() { - emit transportChanged(::dup(call->valueAt<0>().fileDescriptor()), call->valueAt<1>()); - }); - break; - } - case MediaTransport::State::Active: - break; - } -} - -void Controller::onTransportVolumeChanged(uint16_t volume) -{ - qDebug() << __func__ << "> transport volume:" << volume; - - if (volume == 0) { - emit volumeChanged(0.0f); - return; - } - - static const float factor = 4.0; // 127 - 7 -> 0dB - -30dB - //static const float factor = 2.6666; // 127 - 7 -> 0dB - -45dB - emit volumeChanged(pow(10.0f, (volume-127)/(factor*20.0f))); -} - -} // namespace bluetooth diff --git a/bluebricated/src/bluetooth/Controller.h b/bluebricated/src/bluetooth/Controller.h deleted file mode 100644 index 4efe29e..0000000 --- a/bluebricated/src/bluetooth/Controller.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2018 Manuel Weichselbaumer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include - -#include -#include - -#include -#include - -namespace bluetooth -{ - -class Controller : public QObject -{ - Q_OBJECT - -public: - explicit Controller(QObject *parent = nullptr); - ~Controller(); - -signals: - void transportChanged(int fd, uint16_t blockSize); - void volumeChanged(float volume); - -private: - void onTransportChanged(BluezQt::MediaTransportPtr transport); - void onTransportStateChanged(BluezQt::MediaTransport::State state); - void onTransportVolumeChanged(uint16_t volume); - - BluezQt::Manager* m_manager = nullptr; - BluezQt::MediaTransportPtr m_transport = nullptr; - - QDBusUnixFileDescriptor m_fd; -}; - -} // namespace bluetooth diff --git a/bluebricated/src/main.cpp b/bluebricated/src/main.cpp deleted file mode 100644 index 68d265b..0000000 --- a/bluebricated/src/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2018 Manuel Weichselbaumer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "Controller.h" - -#include -#include - -int main(int argc, char **argv) -{ - QCoreApplication a(argc, argv); - - new Controller(&a); - - qDebug() << "Waiting for bluetooth audio source to connect. Ctrl + C to cancel..."; - - return a.exec(); -} - diff --git a/cornrowd/CMakeLists.txt b/cornrowd/CMakeLists.txt index c2bebca..5a225a4 100644 --- a/cornrowd/CMakeLists.txt +++ b/cornrowd/CMakeLists.txt @@ -19,7 +19,7 @@ target_link_libraries(${PROJECT_NAME} audio bluetooth config - qtzeroprops + #qtzeroprops ) install(TARGETS ${PROJECT_NAME} diff --git a/cornrowd/src/Controller.cpp b/cornrowd/src/Controller.cpp index cd68f28..37148b4 100644 --- a/cornrowd/src/Controller.cpp +++ b/cornrowd/src/Controller.cpp @@ -2,9 +2,9 @@ #include "Config.h" #include "config/ConfigManager.h" -#include -#include -#include +//#include +//#include +//#include #include @@ -13,15 +13,15 @@ Controller::Controller(const Config& config, QObject *parent) { // Remote services m_bluetoothService = new bluetooth::Controller(this); - m_zpServer = new QtZeroProps::QZeroPropsServer(this); - m_zpService = m_zpServer->startService( { "_cornrow._tcp" } ); + //m_zpServer = new QtZeroProps::QZeroPropsServer(this); + //m_zpService = m_zpServer->startService( { "_cornrow._tcp" } ); m_audio = new audio::AudioManager(config.pipelineConfig(), this); - m_config = new config::ConfigManager(m_audio, m_bluetoothService, m_zpService, this); + m_config = new config::ConfigManager(m_audio, m_bluetoothService, /*m_zpService,*/ this); connect(m_bluetoothService, &bluetooth::Controller::transportChanged, this, &Controller::onTransportChanged); connect(m_bluetoothService, &bluetooth::Controller::volumeChanged, this, &Controller::onVolumeChanged); - connect(m_zpServer, &QtZeroProps::QZeroPropsServer::clientDisconnected, this, &Controller::onClientDisconnected); + //connect(m_zpServer, &QtZeroProps::QZeroPropsServer::clientDisconnected, this, &Controller::onClientDisconnected); } Controller::~Controller() diff --git a/cornrowd/src/Controller.h b/cornrowd/src/Controller.h index d682b85..b837421 100644 --- a/cornrowd/src/Controller.h +++ b/cornrowd/src/Controller.h @@ -25,7 +25,7 @@ class Controller : public QObject { audio::AudioManager* m_audio; bluetooth::Controller* m_bluetoothService; - QtZeroProps::QZeroPropsServer* m_zpServer; - QtZeroProps::QZeroPropsService* m_zpService; + //QtZeroProps::QZeroPropsServer* m_zpServer; + //QtZeroProps::QZeroPropsService* m_zpService; config::ConfigManager* m_config; }; diff --git a/cornrowd/src/bluetooth/CMakeLists.txt b/cornrowd/src/bluetooth/CMakeLists.txt index fa45fa7..3175733 100644 --- a/cornrowd/src/bluetooth/CMakeLists.txt +++ b/cornrowd/src/bluetooth/CMakeLists.txt @@ -1,4 +1,5 @@ -find_package(Qt5Bluetooth REQUIRED) +find_package(Qt5 REQUIRED DBus Bluetooth) +find_package(KF5BluezQt) add_library(bluetooth STATIC AudioSinkAgent.cpp @@ -8,7 +9,7 @@ add_library(bluetooth STATIC target_link_libraries(bluetooth common cornrow - KF5BluezQt Qt5::Bluetooth Qt5::DBus + KF5::BluezQt ) diff --git a/cornrowd/src/bluetooth/Controller.h b/cornrowd/src/bluetooth/Controller.h index ccb7a96..2866b79 100644 --- a/cornrowd/src/bluetooth/Controller.h +++ b/cornrowd/src/bluetooth/Controller.h @@ -30,6 +30,7 @@ class QDBusObjectPath; namespace BluezQt { +class GattApplication; class GattCharacteristic; class LEAdvertisement; } diff --git a/cornrowd/src/config/CMakeLists.txt b/cornrowd/src/config/CMakeLists.txt index 5c9778d..3ce7cfe 100644 --- a/cornrowd/src/config/CMakeLists.txt +++ b/cornrowd/src/config/CMakeLists.txt @@ -7,5 +7,5 @@ target_link_libraries(config audio bluetooth common - qtzeroprops + #qtzeroprops ) diff --git a/cornrowd/src/config/ConfigManager.cpp b/cornrowd/src/config/ConfigManager.cpp index b931b88..6afd9fd 100644 --- a/cornrowd/src/config/ConfigManager.cpp +++ b/cornrowd/src/config/ConfigManager.cpp @@ -23,7 +23,7 @@ #include "../bluetooth/Controller.h" #include -#include +//#include #include @@ -33,12 +33,12 @@ namespace config { ConfigManager::ConfigManager(audio::AudioManager* audio, bluetooth::Controller* bluetooth, - QtZeroProps::QZeroPropsService* zpService, + //QtZeroProps::QZeroPropsService* zpService, QObject* parent) : QObject(parent), m_audio(audio), - m_bluetooth(bluetooth), - m_zpService(zpService) { + m_bluetooth(bluetooth) + /*m_zpService(zpService)*/ { // On start-up we read config from disk std::vector filters = m_persistence.readConfig(); std::vector peqFilters, auxFilters; @@ -56,6 +56,7 @@ ConfigManager::ConfigManager(audio::AudioManager* audio, m_bluetooth->setReadFiltersCallback(std::bind(&audio::AudioManager::filters, m_audio, _1)); connect(m_bluetooth, &bluetooth::Controller::filtersWritten, m_audio, &audio::AudioManager::setFilters); + /* m_zpService->setProperty(QUuid(common::ble::peqCharacteristicUuid.c_str()), m_converter.filtersToBle(peqFilters)); m_zpService->setProperty(QUuid(common::ble::auxCharacteristicUuid.c_str()), m_converter.filtersToBle(auxFilters)); @@ -70,6 +71,7 @@ ConfigManager::ConfigManager(audio::AudioManager* audio, LOG_F(WARNING, "Unknown uuid: %s", name.toUuid().toByteArray().toStdString().c_str()); } }); + */ m_bluetooth->setReadIoCapsCallback(std::bind(&audio::AudioManager::ioCaps, m_audio)); m_bluetooth->setReadIoConfCallback(std::bind(&audio::AudioManager::ioConf, m_audio)); diff --git a/cornrowd/src/config/ConfigManager.h b/cornrowd/src/config/ConfigManager.h index 23cd93f..5d1064c 100644 --- a/cornrowd/src/config/ConfigManager.h +++ b/cornrowd/src/config/ConfigManager.h @@ -45,7 +45,7 @@ class ConfigManager : public QObject { public: explicit ConfigManager(audio::AudioManager* audio, bluetooth::Controller* bluetooth, - QtZeroProps::QZeroPropsService* zpService, + //QtZeroProps::QZeroPropsService* zpService, QObject* parent = nullptr); ~ConfigManager(); @@ -54,7 +54,7 @@ class ConfigManager : public QObject { private: audio::AudioManager* m_audio = nullptr; bluetooth::Controller* m_bluetooth = nullptr; - QtZeroProps::QZeroPropsService* m_zpService = nullptr; + //QtZeroProps::QZeroPropsService* m_zpService = nullptr; Persistence m_persistence; diff --git a/debian/changelog b/debian/changelog index e7fbcb6..3ec1e83 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cornrowd (0.9.0) bookworm; urgency=medium + + * Add bookworm package + + -- Manuel Weichselbaumer Mon, 12 Mar 2024 20:00:00 +0100 + cornrowd (0.8.1) bullseye; urgency=medium * Add bullseye package diff --git a/debian/control b/debian/control index 31d2592..7354d2f 100644 --- a/debian/control +++ b/debian/control @@ -10,8 +10,6 @@ Build-Depends: libboost-dev, libtool, pkg-config, -#bluezqt deps - extra-cmake-modules, #bluetooth le deps qtconnectivity5-dev (>= 5.7), Standards-Version: 3.9.8 diff --git a/thirdparty/bluez-qt b/thirdparty/bluez-qt deleted file mode 160000 index 32e5d02..0000000 --- a/thirdparty/bluez-qt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 32e5d0219cfcb390f6255fa192d0752e604e9740 diff --git a/thirdparty/libcornrow b/thirdparty/libcornrow index c628803..e99329e 160000 --- a/thirdparty/libcornrow +++ b/thirdparty/libcornrow @@ -1 +1 @@ -Subproject commit c62880386d7a59681c370dab9ffb996dcb21a216 +Subproject commit e99329e28fdbeec692a177d7ad298a2c3b136d4f diff --git a/thirdparty/qtzeroprops b/thirdparty/qtzeroprops deleted file mode 160000 index 55d90d8..0000000 --- a/thirdparty/qtzeroprops +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 55d90d8aeeb6aa1012331d4c2ae3546002d858e4