Loading audio/7.0/IDevice.hal +14 −2 Original line number Diff line number Diff line Loading @@ -103,6 +103,11 @@ interface IDevice { * If the stream can not be opened with the proposed audio config, * HAL must provide suggested values for the audio config. * * Note: INVALID_ARGUMENTS is returned both in the case when the * HAL can not use the provided config and in the case when * the value of any argument is invalid. In the latter case the * HAL must provide a default initialized suggested config. * * @param ioHandle handle assigned by AudioFlinger. * @param device device type and (if needed) address. * @param config stream configuration. Loading @@ -111,7 +116,8 @@ interface IDevice { May be used by implementations to configure hardware effects. * @return retval operation completion status. * @return outStream created output stream. * @return suggestedConfig in case of invalid parameters, suggested config. * @return suggestedConfig in the case of rejection of the proposed config, * a config suggested by the HAL. */ openOutputStream( AudioIoHandle ioHandle, Loading @@ -128,6 +134,11 @@ interface IDevice { * If the stream can not be opened with the proposed audio config, * HAL must provide suggested values for the audio config. * * Note: INVALID_ARGUMENTS is returned both in the case when the * HAL can not use the provided config and in the case when * the value of any argument is invalid. In the latter case the * HAL must provide a default initialized suggested config. * * @param ioHandle handle assigned by AudioFlinger. * @param device device type and (if needed) address. * @param config stream configuration. Loading @@ -136,7 +147,8 @@ interface IDevice { * May be used by implementations to configure processing effects. * @return retval operation completion status. * @return inStream in case of success, created input stream. * @return suggestedConfig in case of invalid parameters, suggested config. * @return suggestedConfig in the case of rejection of the proposed config, * a config suggested by the HAL. */ openInputStream( AudioIoHandle ioHandle, Loading audio/7.0/IStreamIn.hal +12 −6 Original line number Diff line number Diff line Loading @@ -40,6 +40,18 @@ interface IStreamIn extends IStream { */ setGain(float gain) generates (Result retval); /** * Called when the metadata of the stream's sink has been changed. * Optional method * * @param sinkMetadata Description of the audio that is suggested by the clients. * @return retval operation completion status. * If any of the metadata fields contains an invalid value, * returns INVALID_ARGUMENTS. * If method isn't supported by the HAL returns NOT_SUPPORTED. */ updateSinkMetadata(SinkMetadata sinkMetadata) generates (Result retval); /** * Commands that can be executed on the driver reader thread. */ Loading Loading @@ -81,12 +93,6 @@ interface IStreamIn extends IStream { } reply; }; /** * Called when the metadata of the stream's sink has been changed. * @param sinkMetadata Description of the audio that is suggested by the clients. */ updateSinkMetadata(SinkMetadata sinkMetadata); /** * Set up required transports for receiving audio buffers from the driver. * Loading audio/7.0/IStreamOut.hal +12 −6 Original line number Diff line number Diff line Loading @@ -44,6 +44,18 @@ interface IStreamOut extends IStream { */ setVolume(float left, float right) generates (Result retval); /** * Called when the metadata of the stream's source has been changed. * Optional method * * @param sourceMetadata Description of the audio that is played by the clients. * @return retval operation completion status. * If any of the metadata fields contains an invalid value, * returns INVALID_ARGUMENTS. * If method isn't supported by the HAL returns NOT_SUPPORTED. */ updateSourceMetadata(SourceMetadata sourceMetadata) generates (Result retval); /** * Commands that can be executed on the driver writer thread. */ Loading Loading @@ -76,12 +88,6 @@ interface IStreamOut extends IStream { } reply; }; /** * Called when the metadata of the stream's source has been changed. * @param sourceMetadata Description of the audio that is played by the clients. */ updateSourceMetadata(SourceMetadata sourceMetadata); /** * Set up required transports for passing audio buffers to the driver. * Loading audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h +3 −4 Original line number Diff line number Diff line Loading @@ -212,12 +212,11 @@ static inline bool isOutputDevice(const std::string& device) { return isOutputDevice(stringToAudioDevice(device)); } static inline bool isVendorExtension(const std::string& device) { static inline bool isVendorExtension(const std::string& s) { // Must match the "vendorExtension" rule from the XSD file. static const std::string vendorPrefix = "VX_"; return device.size() > vendorPrefix.size() && device.substr(0, vendorPrefix.size()) == vendorPrefix && std::all_of(device.begin() + vendorPrefix.size(), device.end(), return s.size() > vendorPrefix.size() && s.substr(0, vendorPrefix.size()) == vendorPrefix && std::all_of(s.begin() + vendorPrefix.size(), s.end(), [](unsigned char c) { return c == '_' || std::isalnum(c); }); } Loading audio/common/7.0/types.hal +6 −2 Original line number Diff line number Diff line Loading @@ -270,7 +270,10 @@ struct AudioOffloadInfo { */ struct AudioConfig { AudioConfigBase base; AudioOffloadInfo offloadInfo; safe_union OffloadInfo { Monostate unspecified; AudioOffloadInfo info; } offloadInfo; uint64_t frameCount; }; Loading @@ -278,7 +281,8 @@ struct AudioConfig { * AudioTag is an additional use case qualifier complementing * AudioUsage and AudioContentType. Tags are set by vendor specific applications * and must be prefixed by "VX_". Vendor must namespace their tag * names to avoid conflicts. * names to avoid conflicts. See 'vendorExtension' in audio_policy_configuration.xsd * for a formal definition. */ typedef string AudioTag; Loading Loading
audio/7.0/IDevice.hal +14 −2 Original line number Diff line number Diff line Loading @@ -103,6 +103,11 @@ interface IDevice { * If the stream can not be opened with the proposed audio config, * HAL must provide suggested values for the audio config. * * Note: INVALID_ARGUMENTS is returned both in the case when the * HAL can not use the provided config and in the case when * the value of any argument is invalid. In the latter case the * HAL must provide a default initialized suggested config. * * @param ioHandle handle assigned by AudioFlinger. * @param device device type and (if needed) address. * @param config stream configuration. Loading @@ -111,7 +116,8 @@ interface IDevice { May be used by implementations to configure hardware effects. * @return retval operation completion status. * @return outStream created output stream. * @return suggestedConfig in case of invalid parameters, suggested config. * @return suggestedConfig in the case of rejection of the proposed config, * a config suggested by the HAL. */ openOutputStream( AudioIoHandle ioHandle, Loading @@ -128,6 +134,11 @@ interface IDevice { * If the stream can not be opened with the proposed audio config, * HAL must provide suggested values for the audio config. * * Note: INVALID_ARGUMENTS is returned both in the case when the * HAL can not use the provided config and in the case when * the value of any argument is invalid. In the latter case the * HAL must provide a default initialized suggested config. * * @param ioHandle handle assigned by AudioFlinger. * @param device device type and (if needed) address. * @param config stream configuration. Loading @@ -136,7 +147,8 @@ interface IDevice { * May be used by implementations to configure processing effects. * @return retval operation completion status. * @return inStream in case of success, created input stream. * @return suggestedConfig in case of invalid parameters, suggested config. * @return suggestedConfig in the case of rejection of the proposed config, * a config suggested by the HAL. */ openInputStream( AudioIoHandle ioHandle, Loading
audio/7.0/IStreamIn.hal +12 −6 Original line number Diff line number Diff line Loading @@ -40,6 +40,18 @@ interface IStreamIn extends IStream { */ setGain(float gain) generates (Result retval); /** * Called when the metadata of the stream's sink has been changed. * Optional method * * @param sinkMetadata Description of the audio that is suggested by the clients. * @return retval operation completion status. * If any of the metadata fields contains an invalid value, * returns INVALID_ARGUMENTS. * If method isn't supported by the HAL returns NOT_SUPPORTED. */ updateSinkMetadata(SinkMetadata sinkMetadata) generates (Result retval); /** * Commands that can be executed on the driver reader thread. */ Loading Loading @@ -81,12 +93,6 @@ interface IStreamIn extends IStream { } reply; }; /** * Called when the metadata of the stream's sink has been changed. * @param sinkMetadata Description of the audio that is suggested by the clients. */ updateSinkMetadata(SinkMetadata sinkMetadata); /** * Set up required transports for receiving audio buffers from the driver. * Loading
audio/7.0/IStreamOut.hal +12 −6 Original line number Diff line number Diff line Loading @@ -44,6 +44,18 @@ interface IStreamOut extends IStream { */ setVolume(float left, float right) generates (Result retval); /** * Called when the metadata of the stream's source has been changed. * Optional method * * @param sourceMetadata Description of the audio that is played by the clients. * @return retval operation completion status. * If any of the metadata fields contains an invalid value, * returns INVALID_ARGUMENTS. * If method isn't supported by the HAL returns NOT_SUPPORTED. */ updateSourceMetadata(SourceMetadata sourceMetadata) generates (Result retval); /** * Commands that can be executed on the driver writer thread. */ Loading Loading @@ -76,12 +88,6 @@ interface IStreamOut extends IStream { } reply; }; /** * Called when the metadata of the stream's source has been changed. * @param sourceMetadata Description of the audio that is played by the clients. */ updateSourceMetadata(SourceMetadata sourceMetadata); /** * Set up required transports for passing audio buffers to the driver. * Loading
audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h +3 −4 Original line number Diff line number Diff line Loading @@ -212,12 +212,11 @@ static inline bool isOutputDevice(const std::string& device) { return isOutputDevice(stringToAudioDevice(device)); } static inline bool isVendorExtension(const std::string& device) { static inline bool isVendorExtension(const std::string& s) { // Must match the "vendorExtension" rule from the XSD file. static const std::string vendorPrefix = "VX_"; return device.size() > vendorPrefix.size() && device.substr(0, vendorPrefix.size()) == vendorPrefix && std::all_of(device.begin() + vendorPrefix.size(), device.end(), return s.size() > vendorPrefix.size() && s.substr(0, vendorPrefix.size()) == vendorPrefix && std::all_of(s.begin() + vendorPrefix.size(), s.end(), [](unsigned char c) { return c == '_' || std::isalnum(c); }); } Loading
audio/common/7.0/types.hal +6 −2 Original line number Diff line number Diff line Loading @@ -270,7 +270,10 @@ struct AudioOffloadInfo { */ struct AudioConfig { AudioConfigBase base; AudioOffloadInfo offloadInfo; safe_union OffloadInfo { Monostate unspecified; AudioOffloadInfo info; } offloadInfo; uint64_t frameCount; }; Loading @@ -278,7 +281,8 @@ struct AudioConfig { * AudioTag is an additional use case qualifier complementing * AudioUsage and AudioContentType. Tags are set by vendor specific applications * and must be prefixed by "VX_". Vendor must namespace their tag * names to avoid conflicts. * names to avoid conflicts. See 'vendorExtension' in audio_policy_configuration.xsd * for a formal definition. */ typedef string AudioTag; Loading