summaryrefslogtreecommitdiffstats
path: root/ahl-binding/ahl-deviceenum.c
diff options
context:
space:
mode:
authorTai Vuong <tvuong@audiokinetic.com>2017-12-22 15:08:51 -0500
committerTai Vuong <tvuong@audiokinetic.com>2018-01-03 21:57:23 +0000
commitf103d3380ee23dcce40c4a34b3517c35a7d67b29 (patch)
tree89790ee33ec37f1cfea43dc92b3ec3bf98f53e48 /ahl-binding/ahl-deviceenum.c
parent8962ec639b9f8547b8161f7688cd5ed4e8094254 (diff)
Several improvement on AHL error messages
This required a lot of changes in the code, please review carefully and decide if you want to include now or after CES Bug-AGL: SPEC-1207 Change-Id: If1aacecdd2aa9afd3ce4314c3b6334f9334faff4 Signed-off-by: Tai Vuong <tvuong@audiokinetic.com>
Diffstat (limited to 'ahl-binding/ahl-deviceenum.c')
-rw-r--r--ahl-binding/ahl-deviceenum.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ahl-binding/ahl-deviceenum.c b/ahl-binding/ahl-deviceenum.c
index 43e5af5..75b0715 100644
--- a/ahl-binding/ahl-deviceenum.c
+++ b/ahl-binding/ahl-deviceenum.c
@@ -237,6 +237,7 @@ void TermEndpointInfo( gpointer data )
int EnumerateDevices(json_object * in_jDeviceArray, char * in_pAudioRole, EndpointTypeT in_deviceType, GPtrArray * out_pEndpointArray) {
g_assert_nonnull(in_jDeviceArray);
+ g_assert_nonnull(in_pAudioRole);
int iNumberDevices = json_object_array_length(in_jDeviceArray);
// Parse and validate list of available devices
@@ -249,7 +250,7 @@ int EnumerateDevices(json_object * in_jDeviceArray, char * in_pAudioRole, Endpoi
json_object * jDevice = json_object_array_get_idx(in_jDeviceArray,i);
if (jDevice == NULL) {
- AFB_WARNING("Invalid device array -> %s",json_object_to_json_string(in_jDeviceArray));
+ AFB_WARNING("Invalid device array for audiorole:%s -> %s",in_pAudioRole,json_object_to_json_string(in_jDeviceArray));
continue;
}
// strip domain name from URI
@@ -258,7 +259,7 @@ int EnumerateDevices(json_object * in_jDeviceArray, char * in_pAudioRole, Endpoi
err = SeparateDomainFromDeviceURI(pFullDeviceURICopy,&pDeviceURIDomain,&pDeviceURIPCM);
if (err)
{
- AFB_WARNING("Invalid device URI string -> %s",pFullDeviceURICopy);
+ AFB_WARNING("Invalid device URI string -> %s for audiorole:%s",pFullDeviceURICopy,in_pAudioRole);
continue;
}
@@ -289,13 +290,13 @@ int EnumerateDevices(json_object * in_jDeviceArray, char * in_pAudioRole, Endpoi
err = snd_pcm_open(&pPcmHandle, pEndpointInfo->gsDeviceURI, streamType, 0);
if (err < 0)
{
- AFB_NOTICE("Alsa PCM device was not found -> %s", pEndpointInfo->gsDeviceURI);
+ AFB_NOTICE("Alsa PCM device was not found -> %s for audiorole:%s", pEndpointInfo->gsDeviceURI,in_pAudioRole);
continue;
}
err = FillALSAPCMInfo(pPcmHandle,pEndpointInfo);
if (err) {
- AFB_WARNING("Unable to retrieve PCM information for PCM -> %s",pEndpointInfo->gsDeviceURI);
+ AFB_WARNING("Unable to retrieve PCM information for PCM -> %s for audiorole:%s",pEndpointInfo->gsDeviceURI,in_pAudioRole);
snd_pcm_close(pPcmHandle);
continue;
}
@@ -318,7 +319,7 @@ int EnumerateDevices(json_object * in_jDeviceArray, char * in_pAudioRole, Endpoi
}
else {
// Unknown domain
- AFB_WARNING("Unknown domain in device URI string -> %s",pFullDeviceURI);
+ AFB_WARNING("Unknown domain in device URI string -> %s for audiorole:%s",pFullDeviceURI,in_pAudioRole);
continue;
}