Android의 오디오 하드웨어 추상화 계층(HAL)은 기본 오디오 드라이버 및 하드웨어인 android.media에 상위 수준의 오디오별 프레임워크 API를 연결합니다. 오디오 HAL은 오디오 서비스에서 호출하는 표준 인터페이스를 정의합니다. 오디오 하드웨어가 제대로 작동하려면 오디오 HAL을 구현해야 합니다.
이 페이지에서는 오디오 HAL에 관해 간략하게 설명하고 API 및 구현 요구사항의 세부정보를 제공합니다.
오디오 HAL 인터페이스
Android 14부터 오디오 HAL 인터페이스가 AIDL을 사용하여 정의됩니다. 이전 버전의 경우 오디오 HAL 인터페이스는 HIDL을 사용하여 정의됩니다.
파트너와 SoC 공급업체는 오디오 HAL을 재구현하여 AIDL 인터페이스를 제공하는 것이 좋습니다.
Android 14 이상에 추가된 기능의 새로운 HAL API는 AIDL 인터페이스 구현에서만 지원됩니다.
Android 14부터 HIDL 구현에 새로운 API는 추가되지 않습니다.
AIDL로 전환하고 이전 메이저 오디오 HAL 버전을 지원 중단하고 삭제하면 기기의 디스크 공간과 RAM이 확보됩니다. 이를 통해 UX가 더 원활해지고 최종 사용자를 위한 최신 사용자 표시 기능이 허용됩니다.
오디오 HAL을 구현하고 오디오 정책 구성 파일을 만드는 것 외에도 다음 HAL 요구사항을 준수해야 합니다.
사운드 트리거 캡처(핫워드 DSP 버퍼에서 캡처)가 하나의 입력 프로필에서 지원되는 경우 구현 시 사운드 트리거 HAL에서 지원하는 동시 세션 수에 상응하는 이 프로필의 활성 스트림 수를 지원해야 합니다.
동시 캡처 페이지에 설명된 대로 앱 프로세서에서 음성 통화 TX 및 캡처를 동시에 실행합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2024-02-01(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-02-01(UTC)"],[],[],null,["# Audio HAL\n\nAndroid's Audio hardware abstraction layer (HAL) connects the higher-level,\naudio-specific framework APIs into\n[`android.media`](http://developer.android.com/reference/android/media/package-summary.html)\nthe underlying audio drivers and hardware. The Audio HAL defines the standard\ninterface that audio services call in to. The Audio HAL must be implemented for\nthe audio hardware to function correctly.\n\nThis page gives an overview of the Audio HAL and provides details of its API and\nimplementation requirements.\n\nAudio HAL interface\n-------------------\n\nStarting with Android 14, the Audio HAL interface is\ndefined using [AIDL](/docs/core/audio/aidl-implement). For past versions, the\nAudio HAL interface is defined using [HIDL](/docs/core/audio/hidl-implement).\nPartners and SoC vendors are encouraged to reimplement their\nAudio HAL to provide an AIDL interface.\n\nNew HAL APIs for features added in Android 14 and\nhigher are supported **only** with the implementation of the AIDL interface.\nStarting with Android 14, no new API is added to the\nHIDL implementation.\n\nSwitching to AIDL and deprecating and removing support for previous\nmajor Audio HAL versions frees up disk space and RAM on devices. This\nleads to a smoother UX and allows for newer user-visible features for end users.\n\nSee [AIDL and HIDL Audio HAL comparison](/docs/core/audio/aidl-hidl-comp)\nfor more information about the differences between the AIDL and HIDL Audio HAL.\n\n### Audio HAL API\n\nThe Audio HAL contains the following APIs:\n\n- The Core HAL is the main API used by AudioFlinger to play audio and control the audio routing.\n- The Effects HAL API is used by the effects framework to control audio effects.\n You can also configure [preprocessing effects](/devices/audio/implement-pre-processing)\n such as automatic gain control and noise suppression through the Effects HAL\n API.\n\n | **Note:** The Audio Effects HAL API is similar to the [framework effects APIs](https://developer.android.com/reference/android/media/audiofx/AudioEffect).\n- The Common HAL API is a library of common data types used by the Core and\n Effects HAL APIs. The Common HAL has no interfaces and no associated VTS\n tests as it defines only data structures.\n\nSee [AIDL Audio HAL](/docs/core/audio/aidl-implement) and\n[HIDL Audio HAL](/docs/core/audio/hidl-implement) for specific details\nrelated to AIDL and HIDL respectively.\n| **Note:** Starting with Android 13, Audio HAL is updated to version 7.1.\n\nRequirements\n------------\n\nIn addition to implementing the Audio HAL and creating the audio policy\nconfiguration file, you must adhere to the following HAL requirements:\n\n- If capture for Sound Trigger (capture from hotword DSP buffer) is supported\n by one input profile, the implementation must support the number of active\n streams on this profile corresponding to the number of concurrent sessions\n supported by Sound Trigger HAL.\n\n | **Note:** The implementation of the [Sound trigger HAL](/docs/core/audio/sound-trigger) is located at `/hardware/interfaces/soundtrigger` and is coupled with the Audio HAL.\n- Concurrency of voice call TX and capture from the app processor as\n detailed on the [Concurrent capture](/docs/core/audio/concurrent) page."]]