/drivers/peripheral/audio/test/systemtest/hdi_service/rk3568/capture/src/ |
D | audio_idl_hdicapture_hardware_dependence_test.cpp | 78 struct AudioSampleAttributes attrs = {}; variable 81 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_16_BIT, SINGLE_CHANNEL_COUNT, SAMPLE_RATE_8000); 82 ret = AudioCaptureSetGetSampleAttributes(attrs, attrsValue, capture); 97 struct AudioSampleAttributes attrs = {}; variable 100 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_24_BIT, DOUBLE_CHANNEL_COUNT, SAMPLE_RATE_11025); 101 ret = AudioCaptureSetGetSampleAttributes(attrs, attrsValue, capture); 120 struct AudioSampleAttributes attrs = {}; variable 123 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_16_BIT, SINGLE_CHANNEL_COUNT, SAMPLE_RATE_22050); 124 ret = AudioCaptureSetGetSampleAttributes(attrs, attrsValue, capture); 139 struct AudioSampleAttributes attrs = {}; variable [all …]
|
/drivers/peripheral/audio/test/systemtest/hdi_service/hispark_taurus_standard/capture/src/ |
D | audio_idl_hdicapture_hardware_dependence_test.cpp | 77 struct AudioSampleAttributes attrs = {}; variable 80 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_16_BIT, SINGLE_CHANNEL_COUNT, SAMPLE_RATE_8000); 81 ret = AudioCaptureSetGetSampleAttributes(attrs, attrsValue, capture); 100 struct AudioSampleAttributes attrs = {}; variable 103 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_24_BIT, DOUBLE_CHANNEL_COUNT, SAMPLE_RATE_11025); 104 ret = AudioCaptureSetGetSampleAttributes(attrs, attrsValue, capture); 123 struct AudioSampleAttributes attrs = {}; variable 126 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_16_BIT, SINGLE_CHANNEL_COUNT, SAMPLE_RATE_22050); 127 ret = AudioCaptureSetGetSampleAttributes(attrs, attrsValue, capture); 146 struct AudioSampleAttributes attrs = {}; variable [all …]
|
/drivers/peripheral/audio/test/systemtest/hdi_service/rk3568/render/src/ |
D | audio_idl_hdirender_hardware_dependence_test.cpp | 74 struct AudioSampleAttributes attrs = {}; variable 78 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_24_BIT, DOUBLE_CHANNEL_COUNT, SAMPLE_RATE_48000); 80 ret = AudioRenderSetGetSampleAttributes(attrs, attrsValue, render); 99 struct AudioSampleAttributes attrs = {}; variable 102 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_24_BIT, DOUBLE_CHANNEL_COUNT, SAMPLE_RATE_44100); 104 ret = AudioRenderSetGetSampleAttributes(attrs, attrsValue, render); 123 struct AudioSampleAttributes attrs = {}; variable 126 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_24_BIT, DOUBLE_CHANNEL_COUNT, SAMPLE_RATE_8000); 128 ret = AudioRenderSetGetSampleAttributes(attrs, attrsValue, render); 152 struct AudioSampleAttributes attrs = {}; variable [all …]
|
/drivers/peripheral/audio/test/systemtest/hdi_service/hispark_taurus_standard/render/src/ |
D | audio_idl_hdirender_hardware_dependence_test.cpp | 73 struct AudioSampleAttributes attrs = {}; variable 77 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_24_BIT, DOUBLE_CHANNEL_COUNT, SAMPLE_RATE_48000); 79 ret = AudioRenderSetGetSampleAttributes(attrs, attrsValue, render); 98 struct AudioSampleAttributes attrs = {}; variable 102 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_16_BIT, SINGLE_CHANNEL_COUNT, SAMPLE_RATE_48000); 104 ret = AudioRenderSetGetSampleAttributes(attrs, attrsValue, render); 123 struct AudioSampleAttributes attrs = {}; variable 126 InitAttrsUpdate(attrs, AUDIO_FORMAT_TYPE_PCM_24_BIT, DOUBLE_CHANNEL_COUNT, SAMPLE_RATE_44100); 128 ret = AudioRenderSetGetSampleAttributes(attrs, attrsValue, render); 147 struct AudioSampleAttributes attrs = {}; variable [all …]
|
/drivers/peripheral/audio/hdi_service/primary_impl/vdi_src/ |
D | audio_common_vdi.c | 39 void AudioCommonAttrsToVdiAttrsVdi(const struct AudioSampleAttributes *attrs, struct AudioSampleAtt… in AudioCommonAttrsToVdiAttrsVdi() argument 41 CHECK_NULL_PTR_RETURN(attrs); in AudioCommonAttrsToVdiAttrsVdi() 44 vdiAttrs->type = (enum AudioCategoryVdi)attrs->type; in AudioCommonAttrsToVdiAttrsVdi() 45 vdiAttrs->interleaved = attrs->interleaved; in AudioCommonAttrsToVdiAttrsVdi() 46 vdiAttrs->format = (enum AudioFormatVdi)attrs->format; in AudioCommonAttrsToVdiAttrsVdi() 47 vdiAttrs->sampleRate = attrs->sampleRate; in AudioCommonAttrsToVdiAttrsVdi() 48 vdiAttrs->channelCount = attrs->channelCount; in AudioCommonAttrsToVdiAttrsVdi() 49 vdiAttrs->period = attrs->period; in AudioCommonAttrsToVdiAttrsVdi() 50 vdiAttrs->frameSize = attrs->frameSize; in AudioCommonAttrsToVdiAttrsVdi() 51 vdiAttrs->isBigEndian = attrs->isBigEndian; in AudioCommonAttrsToVdiAttrsVdi() [all …]
|
/drivers/peripheral/audio/hdi_service/primary_impl/vendor_src/ |
D | audio_common_vendor.c | 40 void AudioHwiCommonAttrsToHwiAttrs(const struct AudioSampleAttributes *attrs, struct AudioHwiSample… in AudioHwiCommonAttrsToHwiAttrs() argument 42 CHECK_NULL_PTR_RETURN(attrs); in AudioHwiCommonAttrsToHwiAttrs() 45 hwiAttrs->type = (enum AudioHwiCategory)attrs->type; in AudioHwiCommonAttrsToHwiAttrs() 46 hwiAttrs->interleaved = attrs->interleaved; in AudioHwiCommonAttrsToHwiAttrs() 47 hwiAttrs->format = (enum AudioHwiFormat)attrs->format; in AudioHwiCommonAttrsToHwiAttrs() 48 hwiAttrs->sampleRate = attrs->sampleRate; in AudioHwiCommonAttrsToHwiAttrs() 49 hwiAttrs->channelCount = attrs->channelCount; in AudioHwiCommonAttrsToHwiAttrs() 50 hwiAttrs->period = attrs->period; in AudioHwiCommonAttrsToHwiAttrs() 51 hwiAttrs->frameSize = attrs->frameSize; in AudioHwiCommonAttrsToHwiAttrs() 52 hwiAttrs->isBigEndian = attrs->isBigEndian; in AudioHwiCommonAttrsToHwiAttrs() [all …]
|
/drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/src/ |
D | audio_proxy_common.cpp | 104 …_t AudioProxyWriteSampleAttributes(struct HdfSBuf *data, const struct AudioSampleAttributes *attrs) in AudioProxyWriteSampleAttributes() argument 106 if (data == NULL || attrs == NULL) { in AudioProxyWriteSampleAttributes() 109 if (!HdfSbufWriteUint32(data, (uint32_t)attrs->type)) { in AudioProxyWriteSampleAttributes() 112 if (!HdfSbufWriteUint32(data, (uint32_t)attrs->interleaved)) { in AudioProxyWriteSampleAttributes() 115 if (!HdfSbufWriteUint32(data, (uint32_t)attrs->format)) { in AudioProxyWriteSampleAttributes() 118 if (!HdfSbufWriteUint32(data, attrs->sampleRate)) { in AudioProxyWriteSampleAttributes() 121 if (!HdfSbufWriteUint32(data, attrs->channelCount)) { in AudioProxyWriteSampleAttributes() 124 if (!HdfSbufWriteUint32(data, attrs->period)) { in AudioProxyWriteSampleAttributes() 127 if (!HdfSbufWriteUint32(data, attrs->frameSize)) { in AudioProxyWriteSampleAttributes() 130 if (!HdfSbufWriteUint32(data, (uint32_t)(attrs->isBigEndian))) { in AudioProxyWriteSampleAttributes() [all …]
|
/drivers/hdf_core/framework/tools/hdi-gen/ast/ |
D | ast_attribute.cpp | 16 std::vector<std::string> attrs; in ToString() local 18 attrs.push_back("mini"); in ToString() 22 attrs.push_back("lite"); in ToString() 26 attrs.push_back("full"); in ToString() 30 attrs.push_back("oneway"); in ToString() 34 attrs.push_back("callback"); in ToString() 39 for (size_t i = 0; i < attrs.size(); i++) { in ToString() 40 sb.Append(attrs[i]); in ToString() 41 if (i + 1 < attrs.size()) { in ToString()
|
/drivers/peripheral/audio/test/benchmarktest/capture/ |
D | audio_capture_mmap_benchmarktest.cpp | 49 void InitCaptureAttrs(struct AudioSampleAttributes &attrs); 71 void AudioCaptureMmapBenchmarkTest::InitCaptureAttrs(struct AudioSampleAttributes &attrs) in InitCaptureAttrs() argument 73 attrs.format = AUDIO_FORMAT_TYPE_PCM_16_BIT; in InitCaptureAttrs() 74 attrs.channelCount = TEST_CHANNEL_COUNT_STERO; in InitCaptureAttrs() 75 attrs.sampleRate = TEST_SAMPLE_RATE_MASK_48000; in InitCaptureAttrs() 76 attrs.interleaved = 1; in InitCaptureAttrs() 77 attrs.type = AUDIO_MMAP_NOIRQ; in InitCaptureAttrs() 78 attrs.period = DEEP_BUFFER_CAPTURE_PERIOD_SIZE; in InitCaptureAttrs() 79 attrs.frameSize = AUDIO_FORMAT_TYPE_PCM_16_BIT * TEST_CHANNEL_COUNT_STERO / MOVE_LEFT_NUM; in InitCaptureAttrs() 80 attrs.isBigEndian = false; in InitCaptureAttrs() [all …]
|
/drivers/peripheral/audio/test/fuzztest/common/src/ |
D | audio_adm_fuzzer_common.cpp | 40 int32_t InitAttrs(struct AudioSampleAttributes& attrs) in InitAttrs() argument 42 attrs.format = AUDIO_FORMAT_TYPE_PCM_16_BIT; in InitAttrs() 43 attrs.channelCount = CHANNELCOUNT; in InitAttrs() 44 attrs.sampleRate = SAMPLERATE; in InitAttrs() 45 attrs.interleaved = 0; in InitAttrs() 46 attrs.type = AUDIO_IN_MEDIA; in InitAttrs() 47 attrs.period = DEEP_BUFFER_RENDER_PERIOD_SIZE; in InitAttrs() 48 attrs.frameSize = PCM_16_BIT * CHANNELCOUNT / MOVE_LEFT_NUM; in InitAttrs() 49 attrs.isBigEndian = false; in InitAttrs() 50 attrs.isSignedData = true; in InitAttrs() [all …]
|
/drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/src/ |
D | audio_adapter.cpp | 97 int32_t CheckParaAttr(const struct AudioSampleAttributes *attrs) in CheckParaAttr() argument 99 if (attrs == NULL) { in CheckParaAttr() 102 …int32_t ret = ((attrs->sampleRate) >> SHIFT_RIGHT_31_BITS) + ((attrs->channelCount) >> SHIFT_RIGHT… in CheckParaAttr() 103 ((attrs->period) >> SHIFT_RIGHT_31_BITS) + ((attrs->frameSize) >> SHIFT_RIGHT_31_BITS) + in CheckParaAttr() 104 …((attrs->startThreshold) >> SHIFT_RIGHT_31_BITS) + ((attrs->stopThreshold) >> SHIFT_RIGHT_31_BITS)… in CheckParaAttr() 105 ((attrs->silenceThreshold) >> SHIFT_RIGHT_31_BITS); in CheckParaAttr() 109 AudioCategory audioCategory = attrs->type; in CheckParaAttr() 113 AudioFormat audioFormat = attrs->format; in CheckParaAttr() 117 int32_t AttrFormatToBit(const struct AudioSampleAttributes *attrs, int32_t *format) in AttrFormatToBit() argument 119 if (attrs == NULL || format == NULL) { in AttrFormatToBit() [all …]
|
D | audio_render.cpp | 31 int32_t ret = FormatToBits(frameRenderMode->attrs.format, &formatBits); in PcmBytesToFrames() 35 … uint32_t frameSize = frameRenderMode->attrs.channelCount * (formatBits >> 3); // Bit to byte >> 3 in PcmBytesToFrames() 165 uint32_t channelCount = hwRender->renderParam.frameRenderMode.attrs.channelCount; in AudioRenderGetFrameSize() 166 AudioFormat format = hwRender->renderParam.frameRenderMode.attrs.format; in AudioRenderGetFrameSize() 186 …t32_t AudioRenderSetSampleAttributes(AudioHandle handle, const struct AudioSampleAttributes *attrs) in AudioRenderSetSampleAttributes() argument 188 (void)attrs; in AudioRenderSetSampleAttributes() 192 int32_t AudioRenderGetSampleAttributes(AudioHandle handle, struct AudioSampleAttributes *attrs) in AudioRenderGetSampleAttributes() argument 195 if (hwRender == NULL || attrs == NULL) { in AudioRenderGetSampleAttributes() 198 attrs->format = hwRender->renderParam.frameRenderMode.attrs.format; in AudioRenderGetSampleAttributes() 199 attrs->sampleRate = hwRender->renderParam.frameRenderMode.attrs.sampleRate; in AudioRenderGetSampleAttributes() [all …]
|
/drivers/peripheral/audio/test/systemtest/common/hdi_common/src/ |
D | audio_hdi_common.cpp | 58 void InitAttrsCommon(struct AudioSampleAttributes &attrs) in InitAttrsCommon() argument 61 attrs.sampleRate = SAMPLE_RATE_48000; in InitAttrsCommon() 64 void InitAttrs(struct AudioSampleAttributes &attrs) in InitAttrs() argument 66 attrs.sampleRate = SAMPLERATE; in InitAttrs() 67 attrs.format = AUDIO_FORMAT_TYPE_PCM_16_BIT; in InitAttrs() 68 attrs.channelCount = CHANNELCOUNT; in InitAttrs() 69 attrs.interleaved = 0; in InitAttrs() 70 attrs.type = AUDIO_IN_MEDIA; in InitAttrs() 71 attrs.period = DEEP_BUFFER_RENDER_PERIOD_SIZE; in InitAttrs() 72 attrs.frameSize = PCM_16_BIT * CHANNELCOUNT / MOVE_LEFT_NUM; in InitAttrs() [all …]
|
/drivers/peripheral/audio/test/benchmarktest/render/ |
D | audio_render_mmap_benchmarktest.cpp | 53 void InitRenderAttrs(struct AudioSampleAttributes &attrs); 59 void AudioRenderMmapBenchmarkTest::InitRenderAttrs(struct AudioSampleAttributes &attrs) in InitRenderAttrs() argument 61 attrs.channelCount = AUDIO_RENDER_CHANNELCOUNT; in InitRenderAttrs() 62 attrs.sampleRate = AUDIO_SAMPLE_RATE_48K; in InitRenderAttrs() 63 attrs.interleaved = 0; in InitRenderAttrs() 64 attrs.type = AUDIO_MMAP_NOIRQ; in InitRenderAttrs() 65 attrs.period = DEEP_BUFFER_RENDER_PERIOD_SIZE; in InitRenderAttrs() 66 attrs.frameSize = AUDIO_FORMAT_TYPE_PCM_16_BIT * AUDIO_RENDER_CHANNELCOUNT / MOVE_LEFT_NUM; in InitRenderAttrs() 67 attrs.isBigEndian = false; in InitRenderAttrs() 68 attrs.isSignedData = true; in InitRenderAttrs() [all …]
|
/drivers/peripheral/audio/test/benchmarktest/adapter/ |
D | audio_adapter_benchmarktest.cpp | 48 void InitAttrs(struct AudioSampleAttributes &attrs); 85 void AudioAdapterBenchmarkTest::InitAttrs(struct AudioSampleAttributes &attrs) in InitAttrs() argument 87 attrs.format = AUDIO_FORMAT_TYPE_PCM_16_BIT; in InitAttrs() 88 attrs.channelCount = AUDIO_CHANNELCOUNT; in InitAttrs() 89 attrs.sampleRate = AUDIO_SAMPLE_RATE_48K; in InitAttrs() 90 attrs.interleaved = 1; in InitAttrs() 91 attrs.type = AUDIO_IN_MEDIA; in InitAttrs() 92 attrs.period = DEEP_BUFFER_RENDER_PERIOD_SIZE; in InitAttrs() 93 attrs.frameSize = PCM_16_BIT * attrs.channelCount / PCM_8_BIT; in InitAttrs() 94 attrs.isBigEndian = false; in InitAttrs() [all …]
|
/drivers/peripheral/audio/test/systemtest/common/hdi_service_common/src/ |
D | hdi_service_common.cpp | 31 int32_t InitAttrs(struct AudioSampleAttributes &attrs) in InitAttrs() argument 33 attrs.format = AUDIO_FORMAT_TYPE_PCM_16_BIT; in InitAttrs() 34 attrs.channelCount = CHANNELCOUNT; in InitAttrs() 35 attrs.sampleRate = SAMPLERATE; in InitAttrs() 36 attrs.interleaved = 0; in InitAttrs() 37 attrs.type = AUDIO_IN_MEDIA; in InitAttrs() 38 attrs.period = DEEP_BUFFER_RENDER_PERIOD_SIZE; in InitAttrs() 39 attrs.frameSize = PCM_16_BIT * CHANNELCOUNT / MOVE_LEFT_NUM; in InitAttrs() 40 attrs.isBigEndian = false; in InitAttrs() 41 attrs.isSignedData = true; in InitAttrs() [all …]
|
/drivers/peripheral/audio/test/unittest/common/capture/ |
D | audio_capture_mmap_test.cpp | 46 void InitCaptureAttrs(struct AudioSampleAttributes &attrs); 68 void AudioUtCaptureMmapTest::InitCaptureAttrs(struct AudioSampleAttributes &attrs) in InitCaptureAttrs() argument 70 attrs.format = AUDIO_FORMAT_TYPE_PCM_16_BIT; in InitCaptureAttrs() 71 attrs.channelCount = TEST_CHANNEL_COUNT_STERO; in InitCaptureAttrs() 72 attrs.sampleRate = TEST_SAMPLE_RATE_MASK_48000; in InitCaptureAttrs() 73 attrs.interleaved = 1; in InitCaptureAttrs() 74 attrs.type = AUDIO_MMAP_NOIRQ; in InitCaptureAttrs() 75 attrs.period = DEEP_BUFFER_CAPTURE_PERIOD_SIZE; in InitCaptureAttrs() 76 attrs.frameSize = AUDIO_FORMAT_TYPE_PCM_16_BIT * TEST_CHANNEL_COUNT_STERO / MOVE_LEFT_NUM; in InitCaptureAttrs() 77 attrs.isBigEndian = false; in InitCaptureAttrs() [all …]
|
/drivers/peripheral/audio/test/unittest/common/render/ |
D | audio_render_mmap_test.cpp | 49 void InitRenderAttrs(struct AudioSampleAttributes &attrs); 55 void AudioUtRenderMmapTest::InitRenderAttrs(struct AudioSampleAttributes &attrs) in InitRenderAttrs() argument 57 attrs.channelCount = AUDIO_RENDER_CHANNELCOUNT; in InitRenderAttrs() 58 attrs.sampleRate = AUDIO_SAMPLE_RATE_48K; in InitRenderAttrs() 59 attrs.interleaved = 0; in InitRenderAttrs() 60 attrs.type = AUDIO_MMAP_NOIRQ; in InitRenderAttrs() 61 attrs.period = DEEP_BUFFER_RENDER_PERIOD_SIZE; in InitRenderAttrs() 62 attrs.frameSize = AUDIO_FORMAT_TYPE_PCM_16_BIT * AUDIO_RENDER_CHANNELCOUNT / MOVE_LEFT_NUM; in InitRenderAttrs() 63 attrs.isBigEndian = false; in InitRenderAttrs() 64 attrs.isSignedData = true; in InitRenderAttrs() [all …]
|
/drivers/peripheral/audio/hdi_service/primary_impl/src/ |
D | audio_capture.c | 212 uint32_t channelCount = hwCapture->captureParam.frameCaptureMode.attrs.channelCount; in AudioCaptureGetFrameSize() 213 enum AudioFormat format = hwCapture->captureParam.frameCaptureMode.attrs.format; in AudioCaptureGetFrameSize() 237 …CaptureSetSampleAttributes(struct IAudioCapture *handle, const struct AudioSampleAttributes *attrs) in AudioCaptureSetSampleAttributes() argument 240 if (hwCapture == NULL || attrs == NULL) { in AudioCaptureSetSampleAttributes() 245 int32_t ret = AudioCheckParaAttr(attrs); in AudioCaptureSetSampleAttributes() 251 struct AudioSampleAttributes tempAttrs = hwCapture->captureParam.frameCaptureMode.attrs; in AudioCaptureSetSampleAttributes() 252 hwCapture->captureParam.frameCaptureMode.attrs = *attrs; in AudioCaptureSetSampleAttributes() 256 hwCapture->captureParam.frameCaptureMode.attrs = tempAttrs; in AudioCaptureSetSampleAttributes() 261 hwCapture->captureParam.frameCaptureMode.attrs = tempAttrs; in AudioCaptureSetSampleAttributes() 269 hwCapture->captureParam.frameCaptureMode.attrs = tempAttrs; in AudioCaptureSetSampleAttributes() [all …]
|
D | audio_render.c | 56 int32_t ret = FormatToBits(frameRenderMode->attrs.format, &formatBits); in PcmBytesToFrames() 63 if (frameRenderMode->attrs.channelCount > 4 || formatBits > 64) { in PcmBytesToFrames() 68 … uint32_t frameSize = frameRenderMode->attrs.channelCount * (formatBits >> 3); // Bit to byte >> 3 in PcmBytesToFrames() 275 uint32_t channelCount = hwRender->renderParam.frameRenderMode.attrs.channelCount; in AudioRenderGetFrameSize() 276 enum AudioFormat format = hwRender->renderParam.frameRenderMode.attrs.format; in AudioRenderGetFrameSize() 298 …ioRenderSetSampleAttributes(struct IAudioRender *handle, const struct AudioSampleAttributes *attrs) in AudioRenderSetSampleAttributes() argument 301 if (hwRender == NULL || attrs == NULL || hwRender->devDataHandle == NULL) { in AudioRenderSetSampleAttributes() 306 int32_t ret = AudioCheckParaAttr(attrs); in AudioRenderSetSampleAttributes() 312 struct AudioSampleAttributes tempAttrs = hwRender->renderParam.frameRenderMode.attrs; in AudioRenderSetSampleAttributes() 313 hwRender->renderParam.frameRenderMode.attrs = *attrs; in AudioRenderSetSampleAttributes() [all …]
|
D | audio_adapter.c | 111 int32_t CheckParaAttr(const struct AudioSampleAttributes *attrs) in CheckParaAttr() argument 113 if (attrs == NULL) { in CheckParaAttr() 118 …int32_t ret = ((attrs->sampleRate) >> SHIFT_RIGHT_31_BITS) + ((attrs->channelCount) >> SHIFT_RIGHT… in CheckParaAttr() 119 ((attrs->period) >> SHIFT_RIGHT_31_BITS) + ((attrs->frameSize) >> SHIFT_RIGHT_31_BITS) + in CheckParaAttr() 120 …((attrs->startThreshold) >> SHIFT_RIGHT_31_BITS) + ((attrs->stopThreshold) >> SHIFT_RIGHT_31_BITS)… in CheckParaAttr() 121 ((attrs->silenceThreshold) >> SHIFT_RIGHT_31_BITS); in CheckParaAttr() 127 enum AudioCategory audioCategory = attrs->type; in CheckParaAttr() 133 enum AudioFormat audioFormat = attrs->format; in CheckParaAttr() 137 int32_t AttrFormatToBit(const struct AudioSampleAttributes *attrs, int32_t *format) in AttrFormatToBit() argument 139 if (attrs == NULL || format == NULL) { in AttrFormatToBit() [all …]
|
/drivers/peripheral/audio/test/sample/ |
D | framework_common.c | 85 …ckWavFileHeader(FILE *file, struct AudioHeadInfo *wavHeadInfo, struct AudioSampleAttributes *attrs) in CheckWavFileHeader() argument 87 if (file == NULL || wavHeadInfo == NULL || attrs == NULL) { in CheckWavFileHeader() 107 attrs->channelCount = wavHeadInfo->audioChannelNum; in CheckWavFileHeader() 108 attrs->sampleRate = wavHeadInfo->audioSampleRate; in CheckWavFileHeader() 111 attrs->format = AUDIO_FORMAT_TYPE_PCM_8_BIT; in CheckWavFileHeader() 115 attrs->format = AUDIO_FORMAT_TYPE_PCM_16_BIT; in CheckWavFileHeader() 119 attrs->format = AUDIO_FORMAT_TYPE_PCM_24_BIT; in CheckWavFileHeader() 123 attrs->format = AUDIO_FORMAT_TYPE_PCM_32_BIT; in CheckWavFileHeader() 147 headInfo.audioFileFmtSize = PcmFormatToBits(strParam->attrs.format); in AddWavFileHeader() 149 headInfo.audioChannelNum = strParam->attrs.channelCount; in AddWavFileHeader() [all …]
|
/drivers/peripheral/audio/test/unittest/common/adapter/ |
D | audio_adapter_common_test.cpp | 48 void InitAttrs(struct AudioSampleAttributes &attrs); 85 void HdfAudioUtAdapterTest::InitAttrs(struct AudioSampleAttributes &attrs) in InitAttrs() argument 87 attrs.format = AUDIO_FORMAT_TYPE_PCM_16_BIT; in InitAttrs() 88 attrs.channelCount = AUDIO_CHANNELCOUNT; in InitAttrs() 89 attrs.sampleRate = AUDIO_SAMPLE_RATE_48K; in InitAttrs() 90 attrs.interleaved = 1; in InitAttrs() 91 attrs.type = AUDIO_IN_MEDIA; in InitAttrs() 92 attrs.period = DEEP_BUFFER_RENDER_PERIOD_SIZE; in InitAttrs() 93 attrs.frameSize = PCM_16_BIT * attrs.channelCount / PCM_8_BIT; in InitAttrs() 94 attrs.isBigEndian = false; in InitAttrs() [all …]
|
/drivers/peripheral/bluetooth/audio/hal/hdi_binder/server/src/ |
D | hdf_audio_server_common.cpp | 149 int32_t WriteAudioSampleAttributes(struct HdfSBuf *reply, const struct AudioSampleAttributes *attrs) in WriteAudioSampleAttributes() argument 151 if (reply == NULL || attrs == NULL) { in WriteAudioSampleAttributes() 154 uint32_t tempAttrParam = (uint32_t)attrs->type; in WriteAudioSampleAttributes() 158 tempAttrParam = (uint32_t)attrs->interleaved; in WriteAudioSampleAttributes() 162 tempAttrParam = (uint32_t)attrs->format; in WriteAudioSampleAttributes() 166 if (!HdfSbufWriteUint32(reply, attrs->sampleRate)) { in WriteAudioSampleAttributes() 169 if (!HdfSbufWriteUint32(reply, attrs->channelCount)) { in WriteAudioSampleAttributes() 172 if (!HdfSbufWriteUint32(reply, attrs->period)) { in WriteAudioSampleAttributes() 175 if (!HdfSbufWriteUint32(reply, attrs->frameSize)) { in WriteAudioSampleAttributes() 178 tempAttrParam = (uint32_t)(attrs->isBigEndian); in WriteAudioSampleAttributes() [all …]
|
/drivers/peripheral/audio/test/systemtest/hdi_service/common/adapter/src/ |
D | audio_idlhdi_adapter_test.cpp | 527 struct AudioSampleAttributes attrs = {}; variable 533 InitAttrs(attrs); 535 ret = adapter->CreateCapture(adapter, &devDesc, &attrs, &firstCapture, &captureId_); 556 struct AudioSampleAttributes attrs = {}; variable 563 InitAttrs(attrs); 566 ret = adapter->CreateRender(adapter, &renderDevDesc, &attrs, &render, &renderId_); 569 ret = adapter->CreateCapture(adapter, &captureDevDesc, &attrs, &capture, &captureId_); 590 struct AudioSampleAttributes attrs = {}; variable 597 InitAttrs(attrs); 600 ret = adapter->CreateCapture(adapterNull, &devDesc, &attrs, &capture, &captureId_); [all …]
|