Method and apparatus for detecting an audio output path
By acquiring a list of terminal devices and analyzing key attribute information, the problem of accurately identifying audio output paths in smart TVs was solved, enabling proactive perception and dynamic response at the application layer, thereby improving user experience and device management capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-05
Smart Images

Figure CN122160572A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart TV technology, and in particular to a method and apparatus for detecting audio output path. Background Technology
[0002] With the upgrading of home audio-visual entertainment systems, smart TVs, as the center of home audio-visual entertainment, are increasingly diversifying their audio output methods. Users can not only use the TV's built-in speakers, but also commonly connect external high-quality audio devices via the High Definition Multimedia Interface (HDMI) to obtain an immersive listening experience. Among these, HDMI technology has become the mainstream solution for simplifying wiring and improving sound quality because it can transmit high-definition audio (including lossless formats such as Dolby Atmos) from the TV to the speakers through a single HDMI cable.
[0003] Under the existing technology system, the smart TV operating system provides an underlying audio management framework. This framework is responsible for managing the routing and policies of all audio input and output devices. Public documentation indicates that applications can enumerate currently connected audio output devices through a specified interface and obtain the corresponding type information, which defines several device type constants.
[0004] However, current audio management technologies have the following drawbacks:
[0005] (1) System layer black box, application layer unaware: The existing audio routing decision is completely managed by the underlying policies of the operating system, which is a "black box" process for the upper application. When the application (such as streaming media) plays audio, it can only know that the audio data has been successfully submitted to the system, but it cannot know whether the data is ultimately output to external high-end speakers through the TV's built-in speakers, Bluetooth headphones, or through the HDMI Audio Return Channel (ARC) interface or the HDMI Enhanced Audio Return Channel (eARC) interface. This lack of awareness makes it impossible for the application to optimize the user experience or provide intelligent services based on the actual audio playback quality.
[0006] (2) Lack of standardized judgment interface for business logic: Although the system API provides device enumeration function, it can only reflect the "physical connection" status of the device, rather than the "active route" status of "the current audio stream is using the device". For example, even if the TV is connected and the soundbar is recognized, the user can still manually switch the audio output back to "TV speaker" in the system settings. The existing technology lacks a direct and reliable API for applications to query "whether the currently effective audio output path is ARC". If the application wants to know this information, it needs to design complex logic to infer from the original device list. However, the existing public technical materials do not provide a mature and accurate solution.
[0007] (3) Leading to fragmented user experience and limited functionality: Due to the above-mentioned technical defects, problems directly occur in the end-user experience. For example, even if a user purchases a high-end soundbar that supports eARC and plays a Dolby Atmos movie, the streaming application may not be able to detect the presence of external speakers and will still output audio in the basic multi-channel format, failing to fully utilize the hardware's potential. At the same time, the application cannot intelligently pop up a prompt when it detects that the user is only using the TV speakers, guiding the user to connect external speakers to unlock the best sound effects.
[0008] In summary, the core problem with existing technologies lies in the fact that, within the framework of existing smart TV operating systems (such as Android TV), upper-layer applications cannot proactively, accurately, and reliably determine whether the current audio stream is being output to an external audio device via the ARC or eARC interface. Therefore, there is an urgent need in the field for a software-based determination method that can be proactively executed by the application and accurately distinguish between device connection status and active routing status. Summary of the Invention
[0009] This application provides a method and apparatus for detecting audio output paths, with the aim of achieving effective identification of audio output paths.
[0010] To achieve the above objectives, this application provides the following technical solution:
[0011] A method for detecting an audio output path, comprising:
[0012] In response to a target event, obtain the current list of terminal devices in the system; the target event includes any one of the current system's audio playback event, terminal device callback event, and terminal device change event.
[0013] Based on the key attribute information of each terminal device in the terminal device list, the current audio output path is determined.
[0014] An audio output path detection device, comprising:
[0015] The list query module is used to retrieve the list of terminal devices of the current system in response to a target event; the target event includes any one of the current system's audio playback event, terminal device callback event, and terminal device change event.
[0016] The information analysis module is used to determine the current audio output path based on the key attribute information of each terminal device in the terminal device list.
[0017] A storage medium comprising a stored program, wherein the program is executed by a processor to perform the audio output path detection method.
[0018] A smart TV includes: a processor, a memory, and a bus; the processor and the memory are connected via the bus.
[0019] The memory is used to store a program, and the processor is used to run the program, wherein the program is executed by the processor to perform the audio output path detection method.
[0020] The technical solution provided in this application, in response to a target event, obtains a list of terminal devices in the current system; the target event includes any one of the following: audio playback event, terminal device callback event, and terminal device change event; based on the key attribute information of each terminal device in the terminal device list, the current audio output path is determined. This application can construct a query for each terminal device in the terminal device list at the application layer, and by effectively analyzing the key attribute information of each terminal device, effectively identify the audio output path. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic diagram of a first process for detecting an audio output path provided in an embodiment of this application;
[0023] Figure 2 A schematic diagram of a second process for detecting an audio output path provided in an embodiment of this application;
[0024] Figure 3 A schematic diagram of a third process for detecting an audio output path provided in an embodiment of this application;
[0025] Figure 4A schematic diagram of the fourth process for detecting an audio output path provided in an embodiment of this application;
[0026] Figure 5 A schematic diagram of the fifth process for detecting an audio output path provided in an embodiment of this application;
[0027] Figure 6 A schematic diagram of the sixth process for detecting an audio output path provided in an embodiment of this application;
[0028] Figure 7 A schematic diagram of the architecture of an audio output path detection device provided in an embodiment of this application;
[0029] Figure 8 A schematic diagram of the architecture of an audio output path detection system provided in an embodiment of this application;
[0030] Figure 9 This is a schematic diagram illustrating the prompting effect of a smart TV as provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0032] In this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0033] like Figure 1 The diagram shown is a first flowchart of an audio output path detection method provided in an embodiment of this application, which can be applied to smart TVs or set-top boxes and includes the following steps.
[0034] S101: In response to the target event, obtain the list of terminal devices in the current system.
[0035] The target events include any one of the following: the current system's audio playback event, the terminal device callback event, and the terminal device change event.
[0036] In some examples, an audio playback event can be understood as an event that calls the player to play audio.
[0037] In a possible implementation, when an audio playback event occurs, a preset time (e.g., 300 milliseconds) can be delayed before responding to the audio playback event and obtaining the current system's terminal device list. This allows the system to wait for the operating system to complete the initial switching and stabilization of the audio routing, thus avoiding obtaining a transient or inaccurate intermediate state list and improving the stability of the detection.
[0038] In some examples, the terminal device callback event can be understood as a change event in the system audio policy.
[0039] In some examples, a terminal device change event can be understood as a terminal device plugging or unplugging event.
[0040] Optionally, the implementation process for obtaining the current system's terminal device list in response to a target event can be found in [reference needed]. Figure 2 The steps are shown.
[0041] S102: Determine the current audio output path based on the key attribute information of each terminal device in the terminal device list.
[0042] Specifically, for each terminal device in the terminal device list, key attribute information of each terminal device can be extracted, and multi-dimensional analysis can be performed on the obtained key attribute information to determine the current audio output path.
[0043] Optionally, the process of determining the current audio output path based on the key attribute information of each terminal device in the terminal device list can be found in [reference needed]. Figure 3 The steps are shown.
[0044] Optionally, if the current audio output path is another output, a corresponding local prompt is displayed to guide the user to improve the audio playback quality; or the device information of the current system is sent to the cloud and a product recommendation list is displayed; the product recommendation list includes soundbar products that are compatible with the current system and compatible with audio return channel output or enhanced audio return channel output.
[0045] Understandably, the current system's device information, such as the device's brand, model, and local prompts, such as the contextual information of "insufficient audio output capability," is securely uploaded to the cloud with the user's consent. Based on this, the cloud returns a list of recommended ARC or eARC soundbar products that are most suitable for the TV model and compatible with it. This forms a closed-loop service from "detection" to "recommendation" within the application, demonstrating the potential of this invention as a basic capability to support a wider range of commercial scenarios.
[0046] For example, see Figure 9 The smart TV shown can be implemented with the following local prompts: after detecting audio output through the TV's built-in speakers, an optimized prompt can be displayed on the screen.
[0047] In some examples, the current audio output path is notified to the preset application business logic module through a callback interface or event bus, so as to trigger the application business logic module to execute the corresponding business strategy.
[0048] Compared with the prior art, the technical solution provided by the present invention has the following beneficial effects:
[0049] (1) For the first time, the application layer has achieved active perception of the physical output path of audio: This invention breaks the "black box" state of the underlying audio routing of the operating system to the upper layer application. Through the proposed audio output path detection method, the application (such as streaming media client) can actively and clearly determine whether the audio data is finally output through the high-quality path of HDMI ARC or eARC, thus solving the long-standing core technical problem of "application layer perception gap".
[0050] (2) High accuracy and low error rate: Unlike simple device list query, the core "composite logic judgment" mechanism of this invention (judging whether the terminal device list has a first terminal device and a second terminal device) can effectively distinguish the "physical connection status" and "current active routing status" of the terminal device. For example, it can avoid falsely reporting that the audio is being output through the connected ARC device when the user has switched the system output to "TV speaker", thus ensuring the reliability of the judgment result. The technical principle is: "This mechanism effectively solves the problem of misjudgment when the ARC terminal device is connected but the system audio policy does not set it as the main output terminal by introducing an exclusion check for the built-in speaker as a competing device, thus ensuring the consistency between the judgment conclusion and the actual audio data flow path of the system;
[0051] (3) Possesses dynamic real-time response capability: By registering a terminal device callback listener, the present invention can capture events such as the plugging and unplugging of terminal devices or changes in system output settings in real time, and immediately trigger re-detection and judgment. This ensures that the state known by the application is synchronized with the actual routing state of the system, providing a real-time basis for user interaction and function adjustment.
[0052] Furthermore, the detection results of the current audio output path shown in this invention can provide key technical enablement for upper-layer intelligent business scenarios, and are the foundation for realizing a series of advanced user experiences and intelligent services.
[0053] In some examples, the present invention can achieve contextualized intelligent prompts. Specifically, when it detects that a user is playing high-bitrate audio content using the built-in speakers of a TV, it can timely and friendly prompt the user to connect external speakers for the best experience.
[0054] In some examples, the invention enables adaptive audio track switching: the player application can dynamically select to enable or downgrade the audio codec format (such as Dolby Atmos) based on the current audio output path, in order to balance sound quality and compatibility.
[0055] In some examples, the present invention enables precise device management and recommendation: providing data support for the collaboration of terminal devices in smart home scenarios, as well as for the accurate recommendation of peripheral hardware (such as soundbar products) based on the current device profile.
[0056] In some examples, this invention achieves low cost and broad deployment compatibility: It is a pure software solution, built entirely on the standard open APIs of smart TV operating systems (such as Android), requiring no hardware modifications or additional costs. Therefore, it can be easily integrated into existing or newly developed large-screen applications, and is compatible with a vast number of existing and new devices, possessing extremely high practical value and promotional potential.
[0057] The process described in S101-S102 above involves querying each terminal device in the terminal device list at the application layer, and effectively identifying the audio output path by combining the effective analysis of the key attribute information of each terminal device.
[0058] like Figure 2 The diagram shown is a second flowchart of an audio output path detection method provided in an embodiment of this application, which includes the following steps.
[0059] S201: When the application initializes or the current system enters a playback scene, register a terminal device callback listener with the system audio service.
[0060] Among them, the terminal device callback listener is used to detect terminal device callback events and terminal device change events.
[0061] In some examples, the so-called application can be understood as the smart TV's player application. When the application initializes or the current system enters a playback scene, it registers a terminal device callback listener with the smart TV's system audio service to ensure that it can detect the plugging and unplugging of any terminal device or changes in the system audio strategy in real time.
[0062] For example, assuming the current system is an Android system, the terminal device callback listener can be AudioDeviceCallback.
[0063] S202: In response to the target event, obtain the list of terminal devices in the current system.
[0064] When a target event occurs, a preset application programming interface can be invoked to obtain the list of terminal devices in the current system.
[0065] In some examples, depending on the type of the target event, the method of obtaining the list of terminal devices can be divided into active triggering and passive triggering.
[0066] In a possible implementation, active triggering means that, for audio playback events, after the audio playback starts, a preset time (e.g., 500 milliseconds) can be delayed to wait for the system audio routing to stabilize before actively calling the application programming interface to obtain the current system's terminal device list.
[0067] In a possible implementation, passive triggering means that when the terminal device callback listener senses a terminal device callback event or a terminal device change event, it calls the system interface to obtain the current list of terminal devices in the system.
[0068] For example, assuming the current system is an Android system, the application programming interface can be AudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS).
[0069] The processes described in S201-S202 above can monitor target events in real time to determine whether to perform audio output path detection.
[0070] like Figure 3 The diagram shown is a third flowchart of an audio output path detection method provided in an embodiment of this application, which includes the following steps.
[0071] S301: Determine the key attribute information for each terminal device in the terminal device list.
[0072] The key attribute information includes at least the device type, device role, and device description information.
[0073] For example, the device description information includes the product name, which can be used to assist in debugging or to achieve more detailed device classification.
[0074] S302: Determine whether the first terminal device exists in the terminal device list based on the device type and device role of each terminal device.
[0075] If the first terminal device exists in the terminal device list, execute S303; if the first terminal device does not exist in the terminal device list, execute S304.
[0076] In some examples, the first terminal device includes a terminal device using an HDMI ARC interface or an eARC interface.
[0077] Optionally, the process of determining whether the first terminal device exists in the terminal device list based on the device type and role of each terminal device can be found in [reference needed]. Figure 4 The steps are shown.
[0078] S303: Determine whether the current audio output path is audio return channel output or enhanced audio return channel output.
[0079] When a first terminal device exists in the terminal device list, it can be considered that the first terminal device may be called by the system. In order to further verify this possibility, it can be further confirmed whether there is a second terminal device in the terminal device list that competes with the first terminal device.
[0080] Optionally, the identification and judgment process of the second terminal device can be found in [reference needed]. Figure 5 The steps are shown.
[0081] S304: Determine the current audio output path as another output.
[0082] Other outputs include, but are not limited to, built-in speaker output and Bluetooth headset output.
[0083] The processes shown in S301-S304 above analyze whether the first terminal device exists in the terminal device list based on the device type and device role of each terminal device, and determine the current audio output path based on the analysis results, thereby achieving effective perception of the audio output path.
[0084] like Figure 4 The diagram shown is a fourth flowchart of an audio output path detection method provided in an embodiment of this application, which includes the following steps.
[0085] S401: For each terminal device, determine whether the device type of the terminal device is an audio return channel or an enhanced audio return channel, and whether the device role is a receiver.
[0086] If the terminal device's device type is an audio return channel or an enhanced audio return channel, and the device role is a receiver, execute S402; if the terminal device's device type is not an audio return channel or an enhanced audio return channel, and / or the device role is not a receiver, execute S403.
[0087] In some examples, the device type of the terminal device is denoted as AudioDeviceInfo.type. If the value of AudioDeviceInfo.type is TYPE_HDMI_ARC, the device type of the terminal device is determined to be Audio Return Channel. If the value of AudioDeviceInfo.type is TYPE_HDMI_eARC, the device type of the terminal device is determined to be Enhanced Audio Return Channel.
[0088] Furthermore, the device role is denoted as AudioDeviceInfo.isSink. If the value of AudioDeviceInfo.isSink is true, the device role of the terminal device is determined to be a receiver, not an input source. In an audio system, sink is a core concept, referring to the endpoint or receiver of the audio stream, representing the physical or virtual device to which the audio data is ultimately output.
[0089] S402: Determined that a first terminal device exists in the terminal device list.
[0090] Specifically, by traversing the list of terminal devices, it is possible to check whether there is a first terminal device with a device type of TYPE_HDMI_ARC or TYPE_HDMI_eARC and a device role of sink.
[0091] S403: It has been determined that the first terminal device does not exist in the list of terminal devices.
[0092] The processes shown in S401-S403 above can accurately detect whether the first terminal device exists in the terminal device list by analyzing the device type and device role of each terminal device, thus providing a useful reference for the identification of the subsequent audio output path.
[0093] like Figure 5 The diagram shown is a fifth flowchart of an audio output path detection method provided in an embodiment of this application, which includes the following steps.
[0094] S501: If the terminal device list contains a first terminal device, determine if the terminal device list contains a second terminal device.
[0095] If the second terminal device is not found in the terminal device list, execute S502; if the second terminal device is found in the terminal device list, execute S503.
[0096] It should be noted that the second terminal device includes terminal devices that conflict with the use of the first terminal device.
[0097] In some examples, the second terminal device includes, but is not limited to, a terminal device with a built-in speaker, Bluetooth headset, etc.
[0098] Optionally, the process for determining whether a second terminal device exists in the list of terminal devices can be found in [link to documentation]. Figure 6 The steps are shown.
[0099] S502: Determine whether the current audio output path is audio return channel output or enhanced audio return channel output.
[0100] Specifically, if the device type of the first terminal device is an audio return channel, then the current audio output path is the audio return channel output; if the device type of the first terminal device is an enhanced audio return channel, then the current audio output path is the enhanced audio return channel output.
[0101] S503: Determine the current audio output path as another output.
[0102] Other outputs include, but are not limited to, built-in speaker output and Bluetooth headset output.
[0103] The processes shown in S501-S503 above analyze whether the first terminal device and the second terminal device exist in the terminal device list based on the device type and device role of each terminal device, and determine the current audio output path based on the analysis results, thereby achieving effective perception of the audio output path.
[0104] like Figure 6 The diagram shown is a sixth flowchart of an audio output path detection method provided in an embodiment of this application, which includes the following steps.
[0105] S601: Identify other terminal devices besides the first terminal device.
[0106] This involves traversing the list of terminal devices to identify other terminal devices besides the first terminal device.
[0107] S602: Determine whether the device type of other terminal devices is a built-in speaker and whether the corresponding running status is active.
[0108] If the device type of other terminal devices is a built-in speaker and the corresponding operating state is active, execute S603; if the device type of other terminal devices is not a built-in speaker, or the corresponding operating state is inactive, execute S604.
[0109] In some examples, if the AudioDeviceInfo.type value of another terminal device is TYPE_BUILTIN_SPEAKER, the device type of the other terminal device is determined to be a built-in speaker.
[0110] In a possible implementation, the operating status of the built-in speaker can be obtained by querying the current system's audio routing policy interface through the device information of the built-in speaker.
[0111] S603: It has been determined that a second terminal device exists in the list of terminal devices.
[0112] If the device type of other terminal devices is a built-in speaker and the built-in speaker is active, it is determined that the built-in speaker is being used preferentially by the current system, and it can be determined that there is a second terminal device in the terminal device list.
[0113] S604: It has been determined that the second terminal device does not exist in the terminal device list.
[0114] If the device type of other terminal devices does not include a built-in speaker, or the built-in speaker is inactive, then there is no evidence that the built-in speaker is being used preferentially by the current system, and it can be determined that there is no second terminal device in the terminal device list.
[0115] It is understandable that, in addition to handling the built-in speaker, other terminal devices can also be set as a reference for whether a second terminal device exists.
[0116] The processes described in S601-S604 above can accurately detect whether a second terminal device exists in the terminal device list by analyzing the device types of other terminal devices, thus providing a useful reference for the identification of the subsequent audio output path.
[0117] like Figure 7 The diagram shown is a schematic of the architecture of an audio output path detection device provided in an embodiment of this application, including the following modules.
[0118] The list query module 100 is used to retrieve the list of terminal devices of the current system in response to a target event; the target event includes any one of the current system's audio playback event, terminal device callback event, and terminal device change event.
[0119] Optionally, the list query module 100 is specifically used for: registering a terminal device callback listener with the system audio service when the application initializes or the current system enters a playback scene; the terminal device callback listener is used to detect terminal device callback events and terminal device change events; and in response to the target event, obtaining the current system's terminal device list.
[0120] The information analysis module 200 is used to determine the current audio output path based on the key attribute information of each terminal device in the terminal device list.
[0121] Optionally, the information analysis module 200 is specifically used to: determine the key attribute information of each terminal device in the terminal device list; the key attribute information includes at least the device type and device role; determine whether a first terminal device exists in the terminal device list based on the device type and device role of each terminal device; if a first terminal device exists in the terminal device list, determine whether the current audio output path is an audio return channel output or an enhanced audio return channel output.
[0122] Optionally, the information analysis module 200 is specifically used to: if a first terminal device exists in the terminal device list, determine if a second terminal device exists in the terminal device list; the second terminal device includes terminal devices that conflict with the first terminal device; if a second terminal device does not exist in the terminal device list, determine that the current audio output path is an audio return channel output or an enhanced audio return channel output.
[0123] Optionally, the information analysis module 200 is also used to: determine the current audio output path as another output if the first terminal device does not exist in the terminal device list, or if the second terminal device exists in the terminal device list.
[0124] Optionally, the information analysis module 200 is specifically used to: for each terminal device, determine whether the device type of the terminal device is an audio return channel or an enhanced audio return channel, and whether the device role is a receiver; if the device type of the terminal device is an audio return channel or an enhanced audio return channel, and the device role is a receiver, determine that the first terminal device exists in the terminal device list.
[0125] The prompt recommendation unit 300 is used to display corresponding local prompts if the current audio output path is other outputs; the local prompts are used to guide users to improve the quality of audio playback; or send the device information of the current system to the cloud and display the product recommendation list fed back by the cloud; the product recommendation list includes soundbar products that are adapted to the current system and compatible with audio return channel output or enhanced audio return channel output.
[0126] The modules described above construct a query for each terminal device in the terminal device list at the application layer, and combine this with effective analysis of the key attribute information of each terminal device to achieve effective identification of the audio output path.
[0127] like Figure 8 As shown in the figure, an audio output path detection system is provided in an embodiment of this application. The system can detect the audio output path for Android TV systems and includes the following units.
[0128] Device monitoring and management unit 801, device information query unit 802, core logic judgment unit 803.
[0129] Among them, the device monitoring management unit 801 is responsible for implementing AudioDeviceCallback to monitor target events and manage their registration and deregistration on AudioManager.
[0130] The device information query unit 802 encapsulates calls to system APIs such as AudioManager.getDevices, and is used to obtain the list of terminal devices of the system in response to a target time.
[0131] The core logic judgment unit 803 is encapsulated with composite judgment logic, which is as follows: start judgment; enumerate the current terminal devices; whether there is a TYPE_HDMI_ARC / EARC device; whether the device role is sink; whether the built-in speaker is activated as the main output; the judgment result is "ARC / eARC output"; the judgment result is "other output".
[0132] The audio output path detection system shown in this invention has the following advantages:
[0133] (1) A paradigm shift from “status query” to “logical judgment”: Existing technologies only use system APIs to perform simple device list queries. This invention creatively proposes and implements a composite logical judgment model, which transforms the original, ambiguous device connection information into a deterministic judgment of the currently effective audio route by analyzing device type and device role. This is an important methodological innovation from “acquiring data” to “understanding data”.
[0134] (2) A precise judgment criterion for “exclusion of competing devices” is proposed: In response to the key scenario of “the device is connected but not enabled” which leads to misjudgment, this system explicitly introduces the check of the active status of second terminal devices such as built-in speakers as an exclusion condition. The introduction of this criterion significantly improves the accuracy of judgment and makes the identification of “active routes” possible. This is a solution that has not been revealed in existing publicly available technical documents.
[0135] (3) A complete dynamic framework for application-layer active perception of audio routing has been constructed: This system is not an isolated function call, but a complete software framework including initial registration, event listening, dynamic triggering, judgment execution, and result distribution. This framework ensures the real-time and persistence of perception capabilities, enabling the application to continuously and accurately grasp changes in the audio output environment, and providing a reliable technical foundation for realizing dynamic interaction and intelligent services.
[0136] (4) Created a bridge connecting the underlying capabilities of the system and the business innovation of the application layer: The essence of this invention is to define a set of standardized interfaces and processes, and encapsulate the fragmented and non-business-oriented terminal device APIs of the underlying operating system into a business-oriented and semantically clear "audio output path awareness service". This "bridge" innovation enables upper-layer applications to carry out rich business logic innovations conveniently and reliably based on the key context of the audio physical output path.
[0137] This application also provides a computer-readable storage medium including a stored program, wherein the program executes the audio output path detection method provided in this application.
[0138] This application also provides a smart TV, including a processor, a memory, and a bus. The processor and the memory are connected via the bus. The memory is used to store a program, and the processor is used to run the program. During program execution, the audio output path detection method provided in this application is implemented.
[0139] While several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0140] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for detecting an audio output path, characterized in that, include: In response to a target event, obtain the current list of terminal devices in the system; the target event includes any one of the current system's audio playback event, terminal device callback event, and terminal device change event. Based on the key attribute information of each terminal device in the terminal device list, the current audio output path is determined.
2. The method according to claim 1, characterized in that, In response to the target event, obtain the current list of terminal devices in the system, including: When the application initializes or the current system enters a playback scene, a terminal device callback listener is registered with the system audio service; the terminal device callback listener is used to detect the terminal device callback event and the terminal device change event. In response to the target event, obtain the list of terminal devices of the current system.
3. The method according to claim 1, characterized in that, Based on the key attribute information of each terminal device in the terminal device list, the current audio output path is determined, including: Determine the key attribute information for each terminal device in the terminal device list; the key attribute information includes at least the device type and the device role. Based on the device type and device role of each terminal device, determine whether the terminal device list contains a first terminal device; If the first terminal device exists in the list of terminal devices, determine that the current audio output path is either audio return channel output or enhanced audio return channel output.
4. The method according to claim 3, characterized in that, If the first terminal device exists in the list of terminal devices, determining that the current audio output path is either audio return channel output or enhanced audio return channel output includes: If the first terminal device exists in the terminal device list, determine whether the second terminal device exists in the terminal device list; the second terminal device includes terminal devices that conflict with the first terminal device. If the list of terminal devices does not contain a second terminal device, the current audio output path is determined to be either audio return channel output or enhanced audio return channel output.
5. The method according to claim 4, characterized in that, The method further includes: If the first terminal device is not present in the terminal device list, or if the second terminal device is present in the terminal device list, the current audio output path is determined to be another output.
6. The method according to claim 3, characterized in that, Based on the device type and device role of each terminal device, determine whether the terminal device list contains a first terminal device, including: For each terminal device, determine whether the device type of the terminal device is an audio return channel or an enhanced audio return channel, and whether the device role is a receiver. If the device type of the terminal device is an audio return channel or an enhanced audio return channel, and the device role is a receiver, then it is determined that the terminal device list contains a first terminal device.
7. The method according to claim 1, characterized in that, The method further includes: If the current audio output path is another output, a corresponding local prompt will be displayed; the local prompt is used to guide the user to improve the audio playback quality. Alternatively, the device information of the current system can be sent to the cloud, and a product recommendation list fed back by the cloud can be displayed; the product recommendation list includes soundbar products that are compatible with the current system and compatible with audio return channel output or enhanced audio return channel output.
8. A device for detecting an audio output path, characterized in that, include: The list query module is used to retrieve the list of terminal devices in the current system in response to a target event; The target event includes any one of the current system's audio playback event, terminal device callback event, and terminal device change event; The information analysis module is used to determine the current audio output path based on the key attribute information of each terminal device in the terminal device list.
9. A storage medium, characterized in that, The storage medium includes a stored program, wherein the program is executed by a processor to perform the audio output path detection method according to any one of claims 1-7.
10. A smart TV, characterized in that, include: Processor, memory, and bus; The processor and the memory are connected via the bus; The memory is used to store a program, and the processor is used to run the program, wherein the program is executed by the processor to perform the audio output path detection method according to any one of claims 1-7.