Lines Matching refs:cJsonObj

281     int32_t tpins, struct AudioHwRenderParam *renderParam, cJSON *cJsonObj, const char *deviceType, int32_t value)
283 if (cJsonObj == NULL || renderParam == NULL) {
287 if (strcasecmp(cJsonObj->string, deviceType) == 0) {
288 int32_t ret = SetRenderPathValue(tpins, cJsonObj, renderParam, value);
297 static int32_t SetMatchRenderDefaultDevicePath(struct AudioHwRenderParam *renderParam, cJSON *cJsonObj)
300 if (cJsonObj == NULL || renderParam == NULL) {
310 if (strcasecmp(deviceType, cJsonObj->string) == 0) {
311 ret = SetRenderPathDefaultValue(cJsonObj, renderParam);
323 int32_t tpins, struct AudioHwRenderParam *renderParam, cJSON *cJsonObj, int32_t value)
326 if (cJsonObj == NULL || renderParam == NULL) {
332 ret = SetRenderPathValue((int32_t)j, cJsonObj, renderParam, AUDIO_DEV_ON);
342 static int32_t AudioRenderParseDevice(struct AudioHwRenderParam *renderParam, cJSON *cJsonObj)
345 if (cJsonObj == NULL || renderParam == NULL) {
357 if (strcasecmp(cJsonObj->string, MIC) == 0 || strcasecmp(cJsonObj->string, HS_MIC) == 0 ||
358 strcasecmp(cJsonObj->string, BLUETOOTH_SCO_HEADSET) == 0) {
365 ret = SetMatchRenderDefaultDevicePath(renderParam, cJsonObj);
370 ret = SetMatchRenderDevicePath(tpins, renderParam, cJsonObj, SPEAKER, AUDIO_DEV_ON);
373 ret |= SetMatchRenderDevicePath(PIN_OUT_HEADSET, renderParam, cJsonObj, HEADPHONES, AUDIO_DEV_OFF);
378 ret = SetMatchRenderDevicePath(tpins, renderParam, cJsonObj, HEADPHONES, AUDIO_DEV_ON);
381 ret |= SetMatchRenderDevicePath(PIN_OUT_SPEAKER, renderParam, cJsonObj, SPEAKER, AUDIO_DEV_OFF);
386 ret = SetMatchRenderDevicePath(tpins, renderParam, cJsonObj, EARPIECE, AUDIO_DEV_ON);
390 ret = SetMatchRenderDevicePath(tpins, renderParam, cJsonObj, BLUETOOTH_SCO, AUDIO_DEV_ON);
393 ret = SetMatchRenderOtherDevicePath(tpins, renderParam, cJsonObj, AUDIO_DEV_ON);
512 struct AudioHwCaptureParam *captureParam, cJSON *cJsonObj, int32_t tpins, char *deviceType, int32_t value)
514 if (captureParam == NULL || cJsonObj == NULL) {
518 if (strcasecmp(cJsonObj->string, deviceType) == 0) {
519 int32_t ret = SetCapturePathValue(tpins, cJsonObj, captureParam, value);
528 static int32_t SetMatchCaptureDefaultDevicePath(struct AudioHwCaptureParam *captureParam, cJSON *cJsonObj)
531 if (captureParam == NULL || cJsonObj == NULL) {
543 if (strcasecmp(deviceType, cJsonObj->string) == 0) {
544 ret = SetCapturePathDefaultValue(cJsonObj, captureParam);
556 struct AudioHwCaptureParam *captureParam, cJSON *cJsonObj, int32_t tpins, int32_t value)
560 if (captureParam == NULL || cJsonObj == NULL) {
566 ret = SetCapturePathValue((int32_t)i, cJsonObj, captureParam, value);
576 static int32_t AudioCaptureParseDevice(struct AudioHwCaptureParam *captureParam, cJSON *cJsonObj)
579 if (captureParam == NULL || cJsonObj == NULL) {
590 if (strcasecmp(cJsonObj->string, SPEAKER) == 0 || strcasecmp(cJsonObj->string, HEADPHONES) == 0 ||
591 strcasecmp(cJsonObj->string, EARPIECE) == 0 || strcasecmp(cJsonObj->string, BLUETOOTH_SCO) == 0) {
599 ret = SetMatchCaptureDefaultDevicePath(captureParam, cJsonObj);
603 ret = SetMatchCaptureDevicePath(captureParam, cJsonObj, tpins, MIC, AUDIO_DEV_ON);
606 ret |= SetMatchCaptureDevicePath(captureParam, cJsonObj, PIN_IN_HS_MIC, HS_MIC, AUDIO_DEV_OFF);
611 ret = SetMatchCaptureDevicePath(captureParam, cJsonObj, tpins, HS_MIC, AUDIO_DEV_ON);
614 ret |= SetMatchCaptureDevicePath(captureParam, cJsonObj, PIN_IN_MIC, MIC, AUDIO_DEV_OFF);
619 ret = SetMatchCaptureDevicePath(captureParam, cJsonObj, tpins, BLUETOOTH_SCO_HEADSET, AUDIO_DEV_ON);
622 ret = SetMatchCaptureOtherDevicePath(captureParam, cJsonObj, tpins, AUDIO_DEV_ON);