diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-23 10:54:30 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-23 10:54:30 +0200 |
commit | d0dae04c2ae6e4219e0ebac205dd05fa7e9427cf (patch) | |
tree | 80c6fc84f56afedc4fb02a097ae3e464bd792828 /HAL-afb/HAL-interface | |
parent | 606ccd2405a55eab4c909160c951c083bccd825d (diff) |
Format: remove blank space at EOL
Change-Id: I786ac8d5be68bdf09d5bb6c883959d6e1963c1fe
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'HAL-afb/HAL-interface')
-rw-r--r-- | HAL-afb/HAL-interface/CMakeLists.txt | 4 | ||||
-rw-r--r-- | HAL-afb/HAL-interface/hal-interface.c | 10 | ||||
-rw-r--r-- | HAL-afb/HAL-interface/hal-volramp.c | 12 | ||||
-rw-r--r-- | HAL-afb/HAL-interface/hal-volume.c | 6 |
4 files changed, 16 insertions, 16 deletions
diff --git a/HAL-afb/HAL-interface/CMakeLists.txt b/HAL-afb/HAL-interface/CMakeLists.txt index 37d82de..bbe2e94 100644 --- a/HAL-afb/HAL-interface/CMakeLists.txt +++ b/HAL-afb/HAL-interface/CMakeLists.txt @@ -20,7 +20,7 @@ # Add target to project dependency list PROJECT_TARGET_ADD(hal-interface) - # Define targets + # Define targets ADD_LIBRARY(${TARGET_NAME} STATIC hal-volume.c hal-volramp.c hal-interface.c) # Library properties @@ -30,7 +30,7 @@ PROJECT_TARGET_ADD(hal-interface) TARGET_LINK_LIBRARIES(${TARGET_NAME} audio-common ) - + # Define target includes TARGET_INCLUDE_DIRECTORIES(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/HAL-afb/HAL-interface/hal-interface.c b/HAL-afb/HAL-interface/hal-interface.c index 0abe67e..ad5eabb 100644 --- a/HAL-afb/HAL-interface/hal-interface.c +++ b/HAL-afb/HAL-interface/hal-interface.c @@ -13,10 +13,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * reference: + * + * reference: * amixer contents; amixer controls; - * http://www.tldp.org/HOWTO/Alsa-sound-6.html + * http://www.tldp.org/HOWTO/Alsa-sound-6.html */ #define _GNU_SOURCE // needed for vasprintf #include <string.h> @@ -553,7 +553,7 @@ PUBLIC int halServiceInit(const char *apiPrefix, alsaHalSndCardT *alsaHalSndCard } } - // Make sure response is valid + // Make sure response is valid json_object_object_get_ex(responseJ, "response", &ctlsJ); if (json_object_get_type(ctlsJ) != json_type_array) { AFB_ERROR("Response Invalid JSON array ctls Response='%s'", json_object_get_string(responseJ)); @@ -587,7 +587,7 @@ OnErrorExit: }; -// This receive all event this binding subscribe to +// This receive all event this binding subscribe to PUBLIC void halServiceEvent(const char *evtname, json_object *eventJ) { int numid; diff --git a/HAL-afb/HAL-interface/hal-volramp.c b/HAL-afb/HAL-interface/hal-volramp.c index eb39aae..60e91d6 100644 --- a/HAL-afb/HAL-interface/hal-volramp.c +++ b/HAL-afb/HAL-interface/hal-volramp.c @@ -13,7 +13,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * */ #define _GNU_SOURCE // needed for vasprintf @@ -36,14 +36,14 @@ STATIC int RampTimerCB(sd_event_source* source, uint64_t timer, void* handle) { if (volRamp->current > volRamp->target) volRamp->current = volRamp->target; } - // request current Volume Level + // request current Volume Level err = halSetCtlByTag(volRamp->slave, volRamp->current); if (err) goto OnErrorExit; // we reach target stop volram event if (volRamp->current == volRamp->target) sd_event_source_unref(source); else { - // otherwise validate timer for a new run + // otherwise validate timer for a new run sd_event_now(afb_daemon_get_event_loop(), CLOCK_MONOTONIC, &usec); sd_event_source_set_enabled(source, SD_EVENT_ONESHOT); err = sd_event_source_set_time(source, usec + volRamp->delay); @@ -60,8 +60,8 @@ OnErrorExit: STATIC void SetRampTimer(void *handle) { halVolRampT *volRamp = (halVolRampT*) handle; uint64_t usec; - - // set a timer with ~250us accuracy + + // set a timer with ~250us accuracy sd_event_now(afb_daemon_get_event_loop(), CLOCK_MONOTONIC, &usec); sd_event_add_time(afb_daemon_get_event_loop(), &volRamp->evtsrc, CLOCK_MONOTONIC, usec, 250, RampTimerCB, volRamp); } @@ -69,7 +69,7 @@ STATIC void SetRampTimer(void *handle) { STATIC int volumeDoRamp(halVolRampT *volRamp, int numid, json_object *volumeJ) { json_object *responseJ; - // request current Volume Level + // request current Volume Level responseJ = halGetCtlByTag(volRamp->slave); if (!responseJ) { AFB_WARNING("volumeDoRamp Fail to get HAL ctl tag=%d", Master_Playback_Volume); diff --git a/HAL-afb/HAL-interface/hal-volume.c b/HAL-afb/HAL-interface/hal-volume.c index ad2b9a1..997ce98 100644 --- a/HAL-afb/HAL-interface/hal-volume.c +++ b/HAL-afb/HAL-interface/hal-volume.c @@ -13,8 +13,8 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * references: + * + * references: * alsa-util/amixer.c + alsa-lib/simple.c * snd_tlv_convert_from_dB * nt snd_tlv_convert_to_dB @@ -80,7 +80,7 @@ PUBLIC json_object *volumeNormalise(ActionSetGetT action, const alsaHalCtlMapT * } else { // db_scale looks OK let's use it if ((halCtls->dbscale->max - halCtls->dbscale->min) <= MAX_LINEAR_DB_SCALE * 100) useNormalizeDB = NORMALIZE_DB_LINEAR; - else useNormalizeDB = NORMALIZE_LINEAR; // Fulup not sure how to handle this useNormalizeDB=NORMALIZE_DB_MATH; + else useNormalizeDB = NORMALIZE_LINEAR; // Fulup not sure how to handle this useNormalizeDB=NORMALIZE_DB_MATH; } } else useNormalizeDB = NORMALIZE_NONE; |