aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/audio/CMakeLists.txt4
-rw-r--r--plugins/audio/audio-alsa.c13
-rw-r--r--plugins/radio/CMakeLists.txt4
-rw-r--r--plugins/samples/CMakeLists.txt2
-rw-r--r--plugins/session/CMakeLists.txt3
5 files changed, 21 insertions, 5 deletions
diff --git a/plugins/audio/CMakeLists.txt b/plugins/audio/CMakeLists.txt
index b5adc643..7fa1f75f 100644
--- a/plugins/audio/CMakeLists.txt
+++ b/plugins/audio/CMakeLists.txt
@@ -1,9 +1,9 @@
IF(alsa_FOUND)
- INCLUDE_DIRECTORIES(${include_dirs})
-
ADD_LIBRARY(audio-api MODULE audio-api.c audio-alsa.c)
SET_TARGET_PROPERTIES(audio-api PROPERTIES PREFIX "")
+ TARGET_LINK_LIBRARIES(audio-api ${link_libraries})
+ INCLUDE_DIRECTORIES(${include_dirs})
INSTALL(TARGETS audio-api
LIBRARY DESTINATION ${plugin_install_dir})
diff --git a/plugins/audio/audio-alsa.c b/plugins/audio/audio-alsa.c
index 4ee48045..8e56e52d 100644
--- a/plugins/audio/audio-alsa.c
+++ b/plugins/audio/audio-alsa.c
@@ -58,6 +58,19 @@ PUBLIC unsigned char _alsa_init (const char *name, audioCtxHandleT *ctx) {
snd_mixer_selem_id_set_name (mixer_sid, "Master");
mixer_elm = snd_mixer_find_selem (mixer, mixer_sid);
+ if (!mixer_elm) {
+ /* no "Master" mixer ; we are probably on a board... search ! */
+ for (mixer_elm = snd_mixer_first_elem (mixer); mixer_elm != NULL;
+ mixer_elm = snd_mixer_elem_next (mixer_elm)) {
+ if (snd_mixer_elem_info (mixer_elm) < 0)
+ continue;
+ snd_mixer_selem_get_id (mixer_elm, mixer_sid);
+ if (strstr (snd_mixer_selem_id_get_name (mixer_sid), "Master") ||
+ strstr (snd_mixer_selem_id_get_name (mixer_sid), "Playback"))
+ break;
+ }
+ }
+
if (mixer_elm) {
snd_mixer_selem_get_playback_volume_range (mixer_elm, &vol_min, &vol_max);
snd_mixer_selem_get_playback_volume (mixer_elm, SND_MIXER_SCHN_FRONT_LEFT, &vol);
diff --git a/plugins/radio/CMakeLists.txt b/plugins/radio/CMakeLists.txt
index c7c85411..04d0fa21 100644
--- a/plugins/radio/CMakeLists.txt
+++ b/plugins/radio/CMakeLists.txt
@@ -1,9 +1,9 @@
IF(librtlsdr_FOUND)
- INCLUDE_DIRECTORIES(${include_dirs})
-
ADD_LIBRARY(radio-api MODULE radio-api.c radio-rtlsdr.c)
SET_TARGET_PROPERTIES(radio-api PROPERTIES PREFIX "")
+ TARGET_LINK_LIBRARIES(radio-api ${link_libraries})
+ INCLUDE_DIRECTORIES(${include_dirs})
INSTALL(TARGETS radio-api
LIBRARY DESTINATION ${plugin_install_dir})
diff --git a/plugins/samples/CMakeLists.txt b/plugins/samples/CMakeLists.txt
index ef5b449e..aa22cd24 100644
--- a/plugins/samples/CMakeLists.txt
+++ b/plugins/samples/CMakeLists.txt
@@ -2,10 +2,12 @@ INCLUDE_DIRECTORIES(${include_dirs})
ADD_LIBRARY(helloWorld-api MODULE HelloWorld.c)
SET_TARGET_PROPERTIES(helloWorld-api PROPERTIES PREFIX "")
+TARGET_LINK_LIBRARIES(helloWorld-api ${link_libraries})
INSTALL(TARGETS helloWorld-api
LIBRARY DESTINATION ${plugin_install_dir})
ADD_LIBRARY(samplePost-api MODULE SamplePost.c)
SET_TARGET_PROPERTIES(samplePost-api PROPERTIES PREFIX "")
+TARGET_LINK_LIBRARIES(samplePost-api ${link_libraries})
INSTALL(TARGETS samplePost-api
LIBRARY DESTINATION ${plugin_install_dir})
diff --git a/plugins/session/CMakeLists.txt b/plugins/session/CMakeLists.txt
index ddd185df..ab0596e6 100644
--- a/plugins/session/CMakeLists.txt
+++ b/plugins/session/CMakeLists.txt
@@ -1,6 +1,7 @@
-INCLUDE_DIRECTORIES(${include_dirs})
ADD_LIBRARY(token-api MODULE token-api.c)
SET_TARGET_PROPERTIES(token-api PROPERTIES PREFIX "")
+TARGET_LINK_LIBRARIES(token-api ${link_libraries})
+INCLUDE_DIRECTORIES(${include_dirs})
INSTALL(TARGETS token-api
LIBRARY DESTINATION ${plugin_install_dir})