Skip to content

Commit c5765ac

Browse files
authored
Merge pull request #2248 from jm80yang/hal_multimedia2
platform/hal: Update HAL docs for multimedia
2 parents 19ff47e + 6f51bb6 commit c5765ac

File tree

2 files changed

+41
-43
lines changed

2 files changed

+41
-43
lines changed
981 Bytes
Loading

docs/platform/HAL/multimedia.md

Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ This document provides a brief introduction to the Tizen HAL (Hardware Abstracti
1212
The `hal-audio.h` file defines the Hardware Abstraction Layer (HAL) API for audio functionalities on the Tizen platform. It provides a standardized interface for controlling audio hardware, including operations like initialization, deinitialization, volume control, stream management, and PCM (Pulse Code Modulation) device handling.
1313

1414
**Key Functionalities:**
15-
* **Initialization & Deinitialization:** `hal_audio_init()` and `hal_audio_deinit()` manage the lifecycle of the audio HAL.
16-
* **Volume Control:** Functions like `hal_audio_get_volume_level_max()`, `hal_audio_get_volume_level()`, `hal_audio_set_volume_level()`, `hal_audio_get_volume_value()`, `hal_audio_get_volume_mute()`, and `hal_audio_set_volume_mute()` allow for fine-grained control over audio volume and mute states for different streams and devices.
17-
* **Audio Routing:** `hal_audio_update_route()` and `hal_audio_update_route_option()` are used to manage audio paths, directing audio streams to appropriate output devices.
18-
* **Stream Management:** `hal_audio_notify_stream_connection_changed()` notifies the HAL about stream connection events, which can be used for routing and volume adjustments.
19-
* **PCM Device Operations:** A comprehensive set of functions (`hal_audio_pcm_open()`, `hal_audio_pcm_start()`, `hal_audio_pcm_stop()`, `hal_audio_pcm_close()`, `hal_audio_pcm_avail()`, `hal_audio_pcm_write()`, `hal_audio_pcm_read()`, etc.) for low-level control over PCM devices, including opening, starting, stopping, reading, writing, and managing parameters like sample rate, format, and buffer sizes. It also supports memory-mapped I/O (mmap) operations.
20-
* **Ducking:** `hal_audio_notify_ducking_activation_changed()` handles ducking scenarios (e.g., lowering volume of background audio during a notification).
21-
* **Message Callbacks:** `hal_audio_add_message_cb()` and `hal_audio_remove_message_cb()` allow the registration of callback functions to receive asynchronous messages from the audio HAL.
15+
* **Initialization & Deinitialization**
16+
* **Volume Control**
17+
* **Audio Routing**
18+
* **Stream Management**
19+
* **PCM Device Operations**
20+
* **Ducking**
21+
* **Message Callbacks**
2222

2323
This API is essential for any application or system service that needs to interact directly with audio hardware on Tizen devices.
2424

@@ -30,14 +30,14 @@ This API is essential for any application or system service that needs to intera
3030
The `hal-camera.h` and `hal-camera-interface.h` files define the HAL API for camera functionalities on the Tizen platform. They provide an interface for applications to control camera hardware, including device management, preview, capture, recording, and various camera settings.
3131

3232
**Key Functionalities:**
33-
* **Capabilities:** `hal_camera_get_device_capability_list()` retrieves the capabilities of the camera device.
34-
* **HAL Initialization:** `hal_camera_init()` and `hal_camera_deinit()` initialize and deinitialize the camera HAL. `hal_camera_open_device()` and `hal_camera_close_device()` manage the connection to a specific camera device.
35-
* **Message Callbacks:** `hal_camera_add_message_callback()` and `hal_camera_remove_message_callback()` enable asynchronous communication from the camera HAL.
36-
* **Preview Control:** Functions like `hal_camera_set_preview_stream_format()`, `hal_camera_get_preview_stream_format()`, `hal_camera_start_preview()`, `hal_camera_release_preview_buffer()`, and `hal_camera_stop_preview()` handle the setup, start, and stop of the camera preview stream, including buffer management.
37-
* **Auto Focus:** `hal_camera_start_auto_focus()` and `hal_camera_stop_auto_focus()` control the camera's auto-focus mechanism.
38-
* **Image Capture:** `hal_camera_start_capture()` and `hal_camera_stop_capture` manage the process of capturing still images.
39-
* **Video Recording:** `hal_camera_set_video_stream_format()`, `hal_camera_get_video_stream_format()`, `hal_camera_start_record()`, `hal_camera_release_video_buffer()`, and `hal_camera_stop_record()` handle video stream configuration and recording.
40-
* **Camera Commands:** `hal_camera_set_command()`, `hal_camera_get_command()`, and `hal_camera_set_batch_command()` allow setting and getting various camera parameters (e.g., exposure, white balance).
33+
* **Capabilities**
34+
* **HAL Initialization**
35+
* **Message Callbacks**
36+
* **Preview Control**
37+
* **Auto Focus**
38+
* **Image Capture**
39+
* **Video Recording**
40+
* **Camera Commands**
4141

4242
This API is fundamental for camera applications, providing the necessary tools to leverage the full capabilities of the device's camera hardware.
4343

@@ -49,14 +49,14 @@ This API is fundamental for camera applications, providing the necessary tools t
4949
The `hal-codec.h` and `hal-codec-interface.h` files define the HAL API for multimedia codec functionalities on the Tizen platform. They provide an interface for encoding and decoding audio/video data, abstracting the underlying hardware or software codec implementations.
5050

5151
**Key Functionalities:**
52-
* **Capabilities:** `hal_codec_get_capability()` retrieves information about the supported features and formats of the codec.
53-
* **HAL Initialization:** `hal_codec_init()` and `hal_codec_deinit()` manage the codec HAL lifecycle.
54-
* **Configuration:** `hal_codec_configure()` sets up the codec with specific parameters like width, height, input/output formats, and security mode.
55-
* **Message Callbacks:** The `hal_codec_start()` function accepts a callback (`hal_codec_message_cb`) for receiving asynchronous messages from the codec, such as buffer availability or error notifications.
56-
* **Processing Control:** `hal_codec_start()` and `hal_codec_stop()` initiate and terminate the encoding or decoding process. `hal_codec_flush()` clears the internal buffers of the codec.
57-
* **Encoding & Decoding:** `hal_codec_start()` and `hal_codec_stop()` start and stop the encoding or decoding operation. `hal_codec_decode()` and `hal_codec_encode()` are the core functions for processing input data through the codec.
58-
* **Buffer Management:** `hal_codec_release_output_buffer()` is used to return output buffers to the codec after they have been processed by the application.
59-
* **Codec Commands:** `hal_codec_set_command()`, `hal_codec_get_command()`, and `hal_codec_set_batch_command()` provide a way to control various codec-specific parameters.
52+
* **Capabilities**
53+
* **HAL Initialization**
54+
* **Configuration**
55+
* **Message Callbacks**
56+
* **Processing Control**
57+
* **Encoding & Decoding**
58+
* **Buffer Management**
59+
* **Codec Commands**
6060

6161
This API is crucial for multimedia playback, streaming, and recording applications, enabling them to perform efficient media encoding and decoding.
6262

@@ -68,13 +68,13 @@ This API is crucial for multimedia playback, streaming, and recording applicatio
6868
The `hal-drm.h` file defines the HAL API for DRM(Digital Rights Management) on the Tizen platform. It provides an interface for handling protected content, including license acquisition, and decryption of media streams, interacting with a CDM(Content Decryption Module).
6969

7070
**Key Functionalities:**
71-
* **HAL Initialization & State Management:** `hal_drm_init()` and `hal_drm_deinit()` initialize and deinitialize the DRM HAL. `hal_drm_get_state()` retrieves the current state of the DRM system.
72-
* **Message Callbacks:** `hal_drm_set_message_callback()` allows setting a callback to receive asynchronous messages from the DRM backend.
73-
* **CDM Information:** `hal_drm_get_cdm_version()` retrieves the version of the underlying Content Decryption Module.
74-
* **Session based license management:** `hal_drm_session_create()`, `hal_drm_session_load()`, `hal_drm_session_close()`, `hal_drm_session_remove()` manages session's life cycle. `hal_drm_session_generate_request()`, `hal_drm_session_update()`, `hal_drm_session_get_expiration()`, `hal_drm_session_get_key_infos()` handle license acquisition and retrieve key information.
75-
* **Provisioning & Service Certificates:** `hal_drm_get_provisioning_request()`, `hal_drm_set_provisioning_response()`, `hal_drm_get_service_certificate_request()`, `hal_drm_load_service_certificate_response()` and `hal_drm_set_service_certificate()` handle device provisioning and service certificates.
76-
* **Decryption:** `hal_drm_allocate_output_buffer()` and `hal_drm_release_output_buffer()` manage output buffers for decrypted content. `hal_drm_decrypt()` decrypt data using the session's keys and provided cryptographic information.
77-
* **DRM Commands:** `hal_drm_set_command()`, `hal_drm_get_command()` and `hal_drm_set_batch_command()` allow for setting and getting various DRM parameters.
71+
* **HAL Initialization & State Management**
72+
* **Message Callbacks**
73+
* **CDM Information**
74+
* **Session based license management**
75+
* **Provisioning & Service Certificates**
76+
* **Decryption**
77+
* **DRM Commands**
7878

7979
These APIs are essential for applications that need to play DRM content, ensuring secure handling of licenses.
8080

@@ -86,12 +86,12 @@ These APIs are essential for applications that need to play DRM content, ensurin
8686
The `hal-hdcp.h` file defines the HAL API for HDCP(High-bandwidth Digital Content Protection) on the Tizen platform. HDCP is a form of digital copy protection used to prevent copying of digital audio and video content as it travels across connections. This API provides an interface for managing HDCP sessions, including encryption, and decryption for protected content transmission.
8787

8888
**Key Functionalities:**
89-
* **HAL Initialization & State Management:** `hal_hdcp_init()` and `hal_hdcp_deinit()` initialize and deinitialize the HDCP HAL. `hal_hdcp_get_state()` retrieves the current state of the HDCP system.
90-
* **HDCP Session Management:** `hal_hdcp_open()` and `hal_hdcp_close()` open and close an HDCP session, specifying the device type (e.g., receiver, transmitter) and protocol version.
91-
* **Receiver Operations:** `hal_hdcp_start_receiver()` and `hal_hdcp_stop_receiver()` starts and stops the HDCP receiver functionality.
92-
* **Transmitter Operations:** `hal_hdcp_start_transmitter()` and `hal_hdcp_stop_transmitter()` start and stop the HDCP transmitter functionality.
93-
* **Encryption & Decryption:** `hal_hdcp_allocate_output_buffer()` and `hal_hdcp_release_output_buffer()` manage output buffers for encrypted/decrypted data. `hal_hdcp_decrypt()` and `hal_hdcp_encrypt()` decrypt and encrypt data using the keys and provided cryptographic information.
94-
* **HDCP Commands:** `hal_hdcp_set_command()`, `hal_hdcp_get_command()` and `hal_hdcp_set_batch_command()` provide a mechanism to control various HDCP settings and parameters.
89+
* **HAL Initialization & State Management**
90+
* **HDCP Session Management**
91+
* **Receiver Operations**
92+
* **Transmitter Operations**
93+
* **Encryption & Decryption**
94+
* **HDCP Commands**
9595

9696
These APIs are essential for applications that need to prevent copying of digital audio and video content as it travels across connections.
9797

@@ -103,12 +103,10 @@ These APIs are essential for applications that need to prevent copying of digita
103103
The `hal-radio.h` file defines the HAL API for FM radio functionalities on the Tizen platform. It provides an interface for controlling the FM radio hardware, allowing applications to tune into frequencies, control playback, and retrieve signal information.
104104

105105
**Key Functionalities:**
106-
* **HAL Initialization & Backend Management:** `hal_radio_get_backend()` and `hal_radio_put_backend()` manage the underlying radio backend implementation. `hal_radio_init()` and `hal_radio_deinit()` initialize and deinitialize the radio HAL using the acquired backend.
107-
* **Device Preparation:** `hal_radio_prepare()` and `hal_radio_unprepare()` prepare and unprepare the radio hardware for operation.
108-
* **Device Control:** `hal_radio_open()` and `hal_radio_close()` open and close the connection to the radio device. `hal_radio_start()` and `hal_radio_stop()` start and stop the radio playback.
109-
* **Tuning & Seeking:**
110-
* `hal_radio_set_frequency()` and `hal_radio_get_frequency()`: Set and get the current radio frequency (in kHz).
111-
* `hal_radio_seek()`: Seeks the next available radio frequency up or down from the current frequency.
112-
* **Signal Information:** `hal_radio_get_signal_strength()` retrieves the current signal strength of the tuned frequency (in dBm).
106+
* **HAL Initialization & Backend Management**
107+
* **Device Preparation**
108+
* **Device Control**
109+
* **Tuning & Seeking**
110+
* **Signal Information**
113111

114112
This API provides the necessary functions for developing FM radio applications on Tizen, enabling users to listen to FM radio broadcasts on their devices.

0 commit comments

Comments
 (0)