Skip to content
Open
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
14 changes: 11 additions & 3 deletions rpc/srv/dsAudio.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in rpc/srv/dsAudio.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'rpc/srv/dsAudio.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2102, 7194 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-2102.tar.gz, file: rpc/srv/dsAudio.c)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -71,18 +71,20 @@
int _srv_AudioHDMIAuto = 1;
int _srv_AudioSPDIFAuto = 1;
int _srv_AudioHDMIARCAuto = 1;
int _srv_AudioSPEAKERAuto = 1;
dsAudioStereoMode_t _srv_HDMI_Audiomode = dsAUDIO_STEREO_SURROUND;
dsAudioStereoMode_t _srv_SPDIF_Audiomode = dsAUDIO_STEREO_SURROUND;
dsAudioStereoMode_t _srv_HDMI_ARC_Audiomode = dsAUDIO_STEREO_SURROUND;
#else
int _srv_AudioHDMIAuto = 0;
int _srv_AudioSPDIFAuto = 0;
int _srv_AudioHDMIARCAuto = 0;
int _srv_AudioSPEAKERAuto = 0;
dsAudioStereoMode_t _srv_HDMI_Audiomode = dsAUDIO_STEREO_STEREO;
dsAudioStereoMode_t _srv_SPDIF_Audiomode = dsAUDIO_STEREO_STEREO;
dsAudioStereoMode_t _srv_HDMI_ARC_Audiomode = dsAUDIO_STEREO_STEREO;
#endif
int _srv_AudioSPEAKERAuto = 1;

dsAudioStereoMode_t _srv_SPEAKER_Audiomode = dsAUDIO_STEREO_SURROUND;

#ifdef DS_AUDIO_SETTINGS_PERSISTENCE
Expand Down Expand Up @@ -2554,11 +2556,13 @@
}
param->mode = stereoMode;
}
else if (_APortType == dsAUDIOPORT_TYPE_SPEAKER) {
ret = dsGetStereoMode(param->handle, &param->mode);
else if (_APortType == dsAUDIOPORT_TYPE_SPEAKER && _srv_AudioSPEAKERAuto) {
dsAudioStereoMode_t stereoMode = dsAUDIO_STEREO_UNKNOWN;
ret = dsGetStereoMode(param->handle, &stereoMode);
if(ret == dsERR_NONE) {
result = IARM_RESULT_SUCCESS;
}
param->mode = stereoMode;
}
else {
if (_APortType == dsAUDIOPORT_TYPE_SPDIF)
Expand All @@ -2574,6 +2578,10 @@
param->mode = _srv_HDMI_ARC_Audiomode;
INT_INFO("The HDMI ARC Port Audio Settings Mode is %d \r\n",param->mode);
}
else if (_APortType == dsAUDIOPORT_TYPE_SPEAKER) {
param->mode = _srv_SPEAKER_Audiomode;
INT_INFO("The SPEAKER Port Audio Settings Mode is %d \r\n",param->mode);
}

result = IARM_RESULT_SUCCESS;
}
Expand Down
Loading