aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Sarbu <florin.sarbu@windriver.com>2014-10-08 17:30:09 +0300
committerHolger Behrens <holger.behrens@windriver.com>2014-10-17 17:29:14 +0200
commitb9d43a0e99d5d71ec19c319c1a4b29a707948b05 (patch)
treea4ce447e1b93aaa3ef52144e8bcb2b3f05f2bb59
parent6ea1356c6cc4961bdd7343001ec354e4c5acc42c (diff)
downloadmeta-ivi-b9d43a0e99d5d71ec19c319c1a4b29a707948b05.tar.gz
meta-ivi-b9d43a0e99d5d71ec19c319c1a4b29a707948b05.tar.bz2
meta-ivi-b9d43a0e99d5d71ec19c319c1a4b29a707948b05.zip
audiomanager: Fix volume bug
Updates into the sql db are done using mainVolume instead of volume Signed-off-by: Florin Sarbu <florin.sarbu@windriver.com> Signed-off-by: Holger Behrens <holger.behrens@windriver.com>
-rw-r--r--meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager/sqlite_database_handler_change_mainVolume_to_volume.patch48
-rw-r--r--meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager_6.1.bbappend1
2 files changed, 49 insertions, 0 deletions
diff --git a/meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager/sqlite_database_handler_change_mainVolume_to_volume.patch b/meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager/sqlite_database_handler_change_mainVolume_to_volume.patch
new file mode 100644
index 0000000..29ac0d6
--- /dev/null
+++ b/meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager/sqlite_database_handler_change_mainVolume_to_volume.patch
@@ -0,0 +1,48 @@
+Index: git/AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp
+===================================================================
+--- git.orig/AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp 2014-10-08 17:22:09.030662124 +0300
++++ git/AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp 2014-10-08 17:22:44.000000000 +0300
+@@ -363,14 +363,14 @@
+
+ if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
+ {
+- command = "UPDATE " + std::string(SINK_TABLE) + " SET name=?, domainID=?, sinkClassID=?, volume=?, visible=?, availability=?, availabilityReason=?, muteState=?, mainVolume=?, reserved=? WHERE sinkID=" + i2s(sqlite3_column_int(query, 0));
++ command = "UPDATE " + std::string(SINK_TABLE) + " SET name=?, domainID=?, sinkClassID=?, volume=?, visible=?, availability=?, availabilityReason=?, muteState=?, volume=?, reserved=? WHERE sinkID=" + i2s(sqlite3_column_int(query, 0));
+ }
+ else if (eCode == SQLITE_DONE)
+ {
+ //if sinkID is zero and the first Static Sink was already entered, the ID is created
+ if (sinkData.sinkID == 0 && !mFirstStaticSink && !existSinkName(sinkData.name))
+ {
+- command = "INSERT INTO " + std::string(SINK_TABLE) + "(name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, mainVolume, reserved) VALUES (?,?,?,?,?,?,?,?,?,?)";
++ command = "INSERT INTO " + std::string(SINK_TABLE) + "(name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, volume, reserved) VALUES (?,?,?,?,?,?,?,?,?,?)";
+ }
+ else
+ {
+@@ -380,7 +380,7 @@
+ MY_SQLITE_FINALIZE(query)
+ return (E_ALREADY_EXISTS);
+ }
+- command = "INSERT INTO " + std::string(SINK_TABLE) + "(name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, mainVolume, reserved, sinkID) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
++ command = "INSERT INTO " + std::string(SINK_TABLE) + "(name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, volume, reserved, sinkID) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
+ }
+ }
+ else
+@@ -1088,7 +1088,7 @@
+ {
+ return (E_NON_EXISTENT);
+ }
+- command = "UPDATE " + std::string(SINK_TABLE) + " SET mainVolume=? WHERE sinkID=" + i2s(sinkID);
++ command = "UPDATE " + std::string(SINK_TABLE) + " SET volume=? WHERE sinkID=" + i2s(sinkID);
+ MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
+ MY_SQLITE_BIND_INT(query, 1, mainVolume)
+ if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
+@@ -2794,7 +2794,7 @@
+ int eCode = 0;
+ am_SinkType_s temp;
+
+- std::string command = "SELECT name, sinkID, availability, availabilityReason, muteState, mainVolume, sinkClassID FROM " + std::string(SINK_TABLE) + " WHERE visible=1 AND reserved=0";
++ std::string command = "SELECT name, sinkID, availability, availabilityReason, muteState, volume, sinkClassID FROM " + std::string(SINK_TABLE) + " WHERE visible=1 AND reserved=0";
+ MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
+
+ while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
diff --git a/meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager_6.1.bbappend b/meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager_6.1.bbappend
index 9d27bf5..2277041 100644
--- a/meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager_6.1.bbappend
+++ b/meta-ivi-demo/recipes-multimedia/audiomanager/audiomanager_6.1.bbappend
@@ -2,6 +2,7 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
SRC_URI_append = " file://0001-Porting-Pulse-Routing-Interface-from-AM-v1.x-to-AM-v.patch \
file://0001-Porting-Pulse-Control-Interface-from-AM-v1.x-to-AM-v.patch \
+ file://sqlite_database_handler_change_mainVolume_to_volume.patch \
"
EXTRA_OECMAKE += "-DWITH_PULSE_ROUTING_PLUGIN=ON -DWITH_PULSE_CONTROL_PLUGIN=ON -DWITH_ENABLED_IPC=DBUS -DWITH_DATABASE_STORAGE=ON"