Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tinyalsa/TinyAlsaCtlPortConfig.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2015, Intel Corporation
* Copyright (c) 2011-2016, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -92,7 +92,7 @@ bool TinyAlsaCtlPortConfig::doOpenStream(StreamDirection streamDirection, std::s
// Check Format is supported by the plugin
if (portConfig.format >= pcmFormatTranslationTableSize) {

error = "The format n°" + asString(portConfig.format) +
error = "The format n°" + std::to_string(int{portConfig.format}) +
" is not supported by the TinyAlsa plugin";
return false;
}
Expand Down
12 changes: 7 additions & 5 deletions tinyalsa/TinyAmixerControl.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2015, Intel Corporation
* Copyright (c) 2011-2016, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -31,6 +31,7 @@
#include "TinyAlsaSubsystem.hpp"
#include "InstanceConfigurableElement.h"
#include "MappingContext.h"
#include <convert.hpp>
#include <tinyalsa/asoundlib.h>
#include <string>
#include <string.h>
Expand Down Expand Up @@ -110,8 +111,9 @@ bool TinyAmixerControl::accessHW(bool receive, std::string &error)

// Get control handle
if (isdigit(controlName[0])) {

mixerControl = mixer_get_ctl(mixer, asInteger(controlName));
int32_t controlNumber = 0;
convertTo(controlName,controlNumber);
mixerControl = mixer_get_ctl(mixer, controlNumber);
} else {

mixerControl = mixer_get_ctl_by_name(mixer, controlName.c_str());
Expand All @@ -132,9 +134,9 @@ bool TinyAmixerControl::accessHW(bool receive, std::string &error)
// Check available size
if (elementCount * scalarSize != getSize()) {

error = "ALSA: Control element count (" + asString(elementCount) +
error = "ALSA: Control element count (" + std::to_string(elementCount) +
") and configurable scalar element count (" +
asString(getSize() / scalarSize) + ") mismatch";
std::to_string((getSize() / scalarSize)) + ") mismatch";

return false;
}
Expand Down