11/*
2- * Copyright (c) 2011-2015 , Intel Corporation
2+ * Copyright (c) 2011-2016 , Intel Corporation
33 * All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without modification,
3131#include " TinyAlsaSubsystem.hpp"
3232#include " InstanceConfigurableElement.h"
3333#include " MappingContext.h"
34+ #include < convert.hpp>
3435#include < tinyalsa/asoundlib.h>
3536#include < string>
3637#include < string.h>
@@ -110,8 +111,9 @@ bool TinyAmixerControl::accessHW(bool receive, std::string &error)
110111
111112 // Get control handle
112113 if (isdigit (controlName[0 ])) {
113-
114- mixerControl = mixer_get_ctl (mixer, asInteger (controlName));
114+ int32_t controlNumber = 0 ;
115+ convertTo (controlName,controlNumber);
116+ mixerControl = mixer_get_ctl (mixer, controlNumber);
115117 } else {
116118
117119 mixerControl = mixer_get_ctl_by_name (mixer, controlName.c_str ());
@@ -132,9 +134,9 @@ bool TinyAmixerControl::accessHW(bool receive, std::string &error)
132134 // Check available size
133135 if (elementCount * scalarSize != getSize ()) {
134136
135- error = " ALSA: Control element count (" + asString (elementCount) +
137+ error = " ALSA: Control element count (" + std::to_string (elementCount) +
136138 " ) and configurable scalar element count (" +
137- asString ( getSize () / scalarSize) + " ) mismatch" ;
139+ std::to_string (( getSize () / scalarSize) ) + " ) mismatch" ;
138140
139141 return false ;
140142 }
0 commit comments