Audio output method, device, and computer readable storage medium
Patent Information
- Application Number
- CN202611105170.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-11-03
AI Technical Summary
Existing multi-channel audio devices are prone to audio stream interruption or distortion when a channel fails, and lack an effective automated response mechanism.
By monitoring the status of the audio output channel in real time and using the attribute information of the audio stream to select a healthy channel for remapping, the audio stream is ensured to switch to the target channel with matching attributes when a faulty channel is detected, thus achieving automated switching.
In the event of a channel failure, maintain the consistency of the spatial acoustic properties of the audio stream, avoid sound field positioning shifts and auditory experience degradation, and ensure the reliability and continuity of audio output.
Smart Images

Figure CN123035407A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio output technology, and in particular to an audio output method, device and computer-readable storage medium. Background Technology
[0002] In recent years, audio equipment has become increasingly popular in consumer electronics, in-vehicle entertainment, and professional sound reinforcement, leading users to demand higher levels of continuity, stability, and sound field realism in audio output. At the same time, the internal architecture of audio equipment is becoming increasingly complex, typically integrating multiple audio output channels to support multi-channel surround sound, multi-zone independent playback, or redundant backup applications. This presents new challenges to the reliable output capabilities of these devices under complex operating conditions.
[0003] Currently, audio devices with multi-channel output capabilities typically allocate each audio stream to a fixed output channel for independent transmission based on preset routing policies or application specifications. During operation, the channels operate independently, and system monitoring of channel status is mostly at the overall device level. When an output channel malfunctions, it usually relies on system fault reporting or user perception, and audio output on that channel is restored through manual switching, device restart, or routing reconfiguration.
[0004] However, this approach has a significant drawback: when an audio output channel malfunctions due to aging, overload, or poor contact, the audio stream being output on that channel will be directly interrupted or severely distorted, seriously affecting normal listening. Therefore, how to effectively address the audio output anomalies caused by channel failures in multi-channel audio equipment has become a pressing technical problem to be solved in this field. Summary of the Invention
[0005] The main objective of this application is to provide an audio output method, device, and computer-readable storage medium, which aims to solve the problem of abnormal audio output caused by channel failure in multi-channel audio devices.
[0006] To achieve the above objectives, this application provides an audio output method applied to an audio device, the audio device including multiple audio output channels, the audio output method comprising the following steps: Monitor the operating status of each of the audio output channels and obtain the first audio stream output through the first audio output channel, wherein the first audio output channel is the audio output channel whose operating status indicates that there is an operating fault among the audio output channels; Based on the attribute information of the first audio stream, a target audio output channel is determined from the second audio output channel, wherein the attribute information is used to characterize the output direction requirement and / or auditory reference position requirement of the first audio stream, and the second audio output channel is the audio output channel whose operating status indicates that there is no operating fault among the audio output channels. The first audio stream is remapped from the first audio output channel to the target audio output channel so as to output the first audio stream through the target audio output channel.
[0007] In addition, to achieve the above objectives, this application also provides an audio device, which includes a plurality of audio output channels and a processor, each of the audio output channels being connected to the processor, and the processor being used to execute the steps of the audio output method described above.
[0008] In addition, to achieve the above objectives, this application also provides a readable storage medium, which is a computer-readable storage medium storing a computer program that is executed by a processor to implement the steps of the audio output method described above.
[0009] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the audio output method described above.
[0010] One or more technical solutions proposed in this application have at least the following technical effects: This embodiment of the application actively identifies faulty channels by monitoring the operating status of each audio output channel in real time. Then, based on the attribute information of the first audio stream itself, which specifically represents the output direction requirement and / or auditory reference position requirement of the audio stream, a target channel that can meet the spatial requirement can be selected from all normal second audio output channels. This ensures that the selection of the target channel corresponds to the spatial acoustic attributes carried by the original audio stream, thereby maintaining the original sound image direction and / or auditory reference point consistency after remapping, and avoiding sound field positioning shift or auditory experience degradation caused by channel migration. Subsequently, the first audio stream is remapped from the faulty channel to the target channel. The entire switching process is completed autonomously by the internal control logic of the device, without the need for manual reconfiguration of routing or restarting of the device, eliminating the time overhead and operational complexity required by traditional manual recovery methods. Therefore, this technical solution uses attribute information as the basis for channel selection, so that the remapped output channel can match the original channel in terms of spatial characteristics. This ensures that the auditory performance after the audio stream switching is relatively consistent with that before the fault. At the same time, with the help of an automated remapping mechanism, the audio output is resumed in time when a channel is abnormal. This effectively avoids audio stream interruption or severe distortion caused by a failure of a certain channel. It effectively addresses the problem of abnormal audio output caused by the failure of a local channel in multi-channel audio equipment under complex operating conditions, and improves the reliability and auditory integrity of the overall output service. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart illustrating the first embodiment of the audio output method of this application; Figure 2 This is a schematic diagram illustrating the process of determining the target audio output channel under the direction maintenance principle in one embodiment of the audio output method of this application; Figure 3 This is a schematic diagram illustrating the process of determining the target audio output channel based on the principle of proximity to the listener in one embodiment of the audio output method of this application. Figure 4 This is a schematic diagram of the audio device system architecture involved in an embodiment of the audio output method of this application; Figure 5This is a schematic diagram of the audio output process involved in one embodiment of the audio output method of this application.
[0014] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0015] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] Based on this, this application proposes an audio output method according to a first embodiment, applied to an audio device, the audio device including multiple audio output channels, as shown below. Figure 1 As shown, the audio output method includes the following steps S10~S30: Step S10: Monitor the operating status of each audio output channel and obtain the first audio stream output through the first audio output channel, wherein the first audio output channel is the audio output channel whose operating status indicates an operating fault among the audio output channels. After the audio equipment is started, the operating status of each audio output channel is continuously or periodically monitored to obtain the basis for determining whether each channel is in a normal working state or a fault state.
[0017] Monitoring the operating status of each audio output channel can employ one or more combined methods. For example, level detection can be performed on the output signals of each audio output channel; if the output level of a channel remains consistently below a preset threshold or experiences a sharp fluctuation, the channel is deemed to have an operational fault. Alternatively, the load impedance of each audio output channel can be detected; if the detected impedance value exceeds the normal range, the channel is deemed to have an operational fault. Or, the digital signal transmission link of each audio output channel can be verified; if data packet loss, CRC check errors, or clock lockout are detected, the channel is deemed to have an operational fault. Alternatively, the temperature protection, overcurrent protection, or overvoltage protection status of the power amplifier corresponding to each audio output channel can be obtained; if any protection status is triggered, the channel is deemed to have an operational fault. These monitoring methods can be used individually or in combination to comprehensively determine whether the operating status of each audio output channel is normal.
[0018] In one exemplary embodiment, the audio device is equipped with a Power IC status register reading module. This module periodically communicates with the power amplifier chip corresponding to each audio output channel via a communication interface (such as I2C, SPI, etc.) to read the real-time values of the status registers of each channel to obtain the real-time operating status of each channel. The read operating status information may include, but is not limited to, output short-circuit flag, open-circuit load flag, over-temperature shutdown flag, DC bias abnormality flag, etc. The level state or flag value of the above flag bits directly reflects whether the current operating status of the corresponding channel is normal. The status register reading period can be configured according to the real-time requirements of the system and the bus load, with a typical value between 100 milliseconds and 500 milliseconds.
[0019] The audio equipment is also equipped with a channel fault determination module, which is connected to the Power IC status register reading module. This module analyzes and determines the original flag information representing the operating status of each channel. Specifically, the determination logic is as follows: if the fault flag of a channel remains set for more than a preset de-jitter time (e.g., three consecutive sampling cycles), the module determines that the channel's operating status is "unable to produce sound," indicating an operational fault. Conversely, if the fault flag recovers within the de-jitter time, the channel is considered to be operating normally and not considered a valid fault. This de-jitter mechanism effectively avoids misjudgments of operating status caused by non-continuous anomalies such as transient noise, signal jitter, or electromagnetic interference, ensuring that the final output operating status determination result accurately reflects the actual health condition of the channel, thus improving the accuracy of fault determination and system stability.
[0020] When a fault is detected in the operating status of an audio output channel based on one or more of the monitoring methods described above, the channel is designated as the first audio output channel, and the first audio stream output through the first audio output channel is acquired. It is understood that the first audio stream may be part or all of the audio signal allocated to that channel.
[0021] Step S20: Based on the attribute information of the first audio stream, determine the target audio output channel from the second audio output channel, wherein the attribute information is used to characterize the output direction requirement and / or auditory reference position requirement of the first audio stream, and the second audio output channel is the audio output channel whose operating status indicates that there is no operating fault among the audio output channels. After determining that there is a malfunction in the first audio output channel, the attribute information of the first audio stream is obtained. The source of this attribute information can be various. It can be metadata transmitted along with the first audio stream, acoustic feature tags extracted by the audio device after content analysis of the first audio stream, or preset spatial attribute information corresponding to the channel identifier currently assigned to the first audio stream.
[0022] This attribute information is used to characterize the playback requirements of the first audio stream in the spatial dimension, specifically including output direction requirements and / or auditory reference position requirements. The output direction requirements indicate the desired radiation direction of the audio stream relative to the listening position, such as front left, front right, left surround, right surround, top, etc. The auditory reference position requirements indicate the desired position of the audio stream in a preset listening reference coordinate system, such as the spatial coordinate relationship or sound image localization weight of the channel relative to the listening reference point in a stereo or surround sound field.
[0023] Subsequently, audio output channels whose operating status indicators show no operational faults are identified and marked as second audio output channels. Target audio output channels are then selected from these second audio output channels. The selection logic can be as follows: the spatial attributes of each second audio output channel (e.g., speaker physical installation orientation, acoustic axis pointing, distance and angle relative to a listening reference point) are matched with the attribute information of the first audio stream. The second audio output channel with the highest matching degree of the attribute information or that meets preset matching conditions is determined as the target audio output channel.
[0024] For example, if the output direction requirement represented by the attribute information of the first audio stream is "left front", then the channel in the second audio output channel whose physical installation position corresponds to the left front is preferentially selected as the target audio output channel; if the auditory reference position requirement represented by the attribute information of the first audio stream is "having a specific angular offset relative to the listening reference point", then the channel in the second audio output channel whose spatial coordinates match the angular offset is selected as the target audio output channel. When the attribute information includes both output direction requirement and auditory reference position requirement, a weighted comprehensive score can be applied to the two matching results, and the channel with the best comprehensive score can be selected as the target audio output channel.
[0025] Step S30: Remap the first audio stream from the first audio output channel to the target audio output channel so as to output the first audio stream through the target audio output channel.
[0026] After determining the target audio output channel, the audio device switches the output route of the first audio stream from the first audio output channel to the target audio output channel, thereby achieving remapping of the first audio stream between channels.
[0027] This remapping operation can be achieved by updating the mixing matrix of the digital signal processor or audio routing controller within the audio device. For example, the destination address of the first audio stream can be modified from the output port or digital signal processing link corresponding to the first audio output channel to the output port or digital signal processing link corresponding to the target audio output channel. Therefore, the first audio stream will no longer be output through the first audio output channel, but instead will be output through the target audio output channel.
[0028] During the remapping process, optionally, the first audio stream can be adjusted for gain, equalization, or delay compensation to adapt to the target audio output channel, so as to adapt to the differences in the physical characteristics of the target channel.
[0029] Thus, when the faulty channel is unable to continue its output task, the first audio stream is automatically and quickly transferred to an available channel with matching attributes for output, ensuring the availability of audio services.
[0030] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. On this basis, refer to Figure 2 As shown, the step of determining the target audio output channel from the second audio output channel based on the attribute information of the first audio stream includes: Step A10: When the attribute information of the first audio stream indicates that the first audio stream has directional indication, candidate audio output channels on the same side as the first audio output channel are selected from the second audio output channels. The same side means that the sound generating units corresponding to the two audio output channels are arranged on the same side in space. After obtaining the attribute information of the first audio stream, the first step is to determine whether the attribute information indicates that the first audio stream has directional indication. Directional indication refers to the audio stream having a clear left-right orientation requirement during playback, requiring output from a specific direction to convey directional information. For example, in in-vehicle audio scenarios, left turn prompts, right turn prompts, and left blind spot warning sounds all have clear directional indication, requiring the listener to quickly determine the source of the warning or navigation guidance based on the direction of the sound; while ordinary voice announcements and background music typically do not have directional indication.
[0031] When the attribute information indicates that the first audio stream has directional indication, to ensure that the remapped warning or prompt tone does not confuse left and right orientation perception, channels on the same side as the first audio output channel are selected from the second audio output channels as candidate audio output channels. "Same side" means that the sound units corresponding to the two audio output channels are located on the same side of the space, such as both being located on the left side of the vehicle or both being located on the right side. Taking the left turn prompt tone as an example, if the sound unit corresponding to the first audio output channel is located at the left front door of the vehicle, then the second audio output channels on the same side include channels corresponding to sound units located on the left side of the vehicle, such as the left rear door, left A-pillar, or left roof, while excluding all channels located on the right side of the vehicle, to avoid incorrectly outputting the left turn prompt tone from the right side, which could lead to driver misjudgment of direction.
[0032] Step A20: Determine the target audio output channel from the candidate audio output channels.
[0033] When there is only one candidate audio output channel, that candidate audio output channel is directly selected as the target audio output channel. When there are multiple candidate audio output channels, the target audio output channel can be selected from them according to a preset priority strategy. For example, the candidate audio output channel that is spatially closest to the first audio output channel can be selected first to maximize the preservation of the original directional indication tone's sense of direction. For example, if the left turn prompt tone was originally output from the left front door channel, it can be preferentially moved to the left rear door channel instead of the left ceiling channel. Alternatively, the candidate audio output channel whose acoustic characteristics best match those of the sound unit is selected first to reduce timbre changes caused by unit differences. Alternatively, the selection can be made according to the preset priority order of each candidate audio output channel. For example, in a multi-region independent playback scenario, the selection can be made according to the preset channel backup order of the region to which the audio stream belongs.
[0034] Optionally, if the attribute information of the first audio stream indicates that the audio stream does not have directional indication (e.g., ordinary voice broadcast or background music), then the above-mentioned same-side filtering can be omitted, and the target audio output channel can be directly determined from all the second audio output channels according to other preset rules, such as selecting the closest or lightest-loaded healthy channel. Thus, a differentiated target channel determination strategy is adopted for audio streams with different types of attribute information, ensuring consistency in directional auditory perception while also considering processing efficiency.
[0035] In one possible implementation, refer to Figure 3 As shown, the step of determining the target audio output channel from the second audio output channel based on the attribute information of the first audio stream includes: Step B10: If the attribute information of the first audio stream indicates that the first audio stream does not have directional indication, select the candidate audio output channel that is closest to the preset auditory reference position from the second audio output channel. After obtaining the attribute information of the first audio stream, if it is determined that the attribute information indicates that the first audio stream does not have directional indication, it means that the audio stream does not need to maintain a specific left-right orientation during playback. The listener's focus on the clear audibility of the content rather than the direction of the sound source is the audio stream. Such audio streams include ordinary voice broadcasts (such as navigation voice prompts, system status broadcasts), background music, low-frequency effect channels (LFE, i.e., subwoofer channels), etc.
[0036] For audio streams that lack directional indication, when a channel failure necessitates remapping, the candidate audio output channel closest to the preset auditory reference position is selected from all second audio output channels. The preset auditory reference position refers to a pre-defined standard listening position within the space served by the audio device. In in-vehicle audio scenarios, the preset auditory reference position is typically the driver's ear position or the center reference point of the vehicle seat; in home surround sound scenarios, the preset auditory reference position is typically the central listening point of the viewing position, i.e., the "sweet spot"; in professional sound reinforcement scenarios, the preset auditory reference position can be the center point of the target area covered by the main sound reinforcement.
[0037] The rationale for selecting the channel closest to the preset auditory reference position is as follows: For audio content that lacks directional indication, the listener only needs to access the audio information itself. Distributing the audio stream to the healthiest channel closest to the auditory reference position ensures that the audio signal reaches the listener with the shortest possible propagation path, minimizing sound attenuation and distortion during transmission, and guaranteeing clarity and intelligibility. Furthermore, selecting the closest channel helps reduce the abruptness of channel switching, allowing the listener to perceive the continuity of the audio output naturally and smoothly.
[0038] Step B20: Determine the target audio output channel from the candidate audio output channels.
[0039] When there is only one candidate audio output channel, that candidate audio output channel is directly selected as the target audio output channel. When there are multiple candidate audio output channels, the target audio output channel can be selected from them according to a preset priority strategy. For example, the candidate audio output channel whose acoustic characteristics (such as frequency response, distortion, maximum sound pressure level, etc.) best match the first audio output channel can be selected to ensure timbre consistency after remapping; or, the candidate audio output channel with the lightest current load can be selected to avoid new faults caused by channel overload; or, the selection can be carried out according to the preset priority order of each candidate audio output channel.
[0040] This embodiment, through steps B10 to B20 and steps A10 to A20, establishes a differentiated target channel determination strategy for different types of attribute information: for audio streams with directional indication, same-side filtering is used to ensure correct orientation perception; for audio streams without directional indication, nearest-distance filtering is used to ensure content clarity. The two strategies work together to automatically determine a suitable target channel from the healthy second audio output channel, while ensuring the respective auditory needs of different audio streams. This provides a reliable output destination for subsequent remapping, thus comprehensively addressing abnormal issues such as inability to output, output interruption, and output distortion caused by channel failures in multi-channel audio devices.
[0041] In one possible implementation, the step of determining the target audio output channel from the candidate audio output channels includes: Step C10: In the case of multiple candidate audio output channels, obtain the current audio load of each candidate audio output channel; Current audio load refers to the degree of audio output task undertaken by the audio output channel at the current moment. It can be expressed as the number of audio streams configured for routing and prepared for output by the channel. The larger this number is, the heavier the current load of the channel.
[0042] In addition, as a supplement or alternative, the current audio load can also be expressed as the real-time amplitude or power value of the current output audio signal of the channel, the percentage of the real-time output power of the corresponding power amplifier to its rated power, or the digital signal processing resource utilization rate of the channel. These various load quantification indicators can be used individually or combined into a weighted score for use.
[0043] Step C20: The candidate audio output channel with the smallest current audio load is determined as the target audio output channel.
[0044] After obtaining the current audio load of each candidate channel, the candidate audio output channel with the lowest load is determined as the target audio output channel. That is, the healthy channel currently carrying the fewest audio streams is preferentially selected to receive the first audio stream. Selecting the channel carrying the fewest audio streams ensures that the channel has sufficient output capacity margin to carry the migrated first audio stream, avoiding overloading of the new channel or introducing non-linear distortion due to superimposed output. It also helps to balance the load distribution among channels, preventing some channels from aging faster due to carrying too many audio streams for a long time, and extending the overall lifespan of the audio equipment.
[0045] Based on the first and / or second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to the first and second embodiments described above can be referred to the above description and will not be repeated hereafter. Based on this, the step of obtaining the first audio stream output through the first audio output channel includes: Step D10: Obtain all audio streams output through the first audio output channel; After identifying a faulty audio output channel and designating it as the first audio output channel, obtain all audio streams currently assigned to that first audio output channel. In other words, obtain all audio streams directed to that first audio output channel, all of which are configured to output through that channel. It should be noted that this process retrieves a list of audio streams already assigned to that channel, regardless of whether these streams are currently playing audio; as long as their output routes point to that channel, they are included in this step.
[0046] Step D20: Traverse each of the audio streams. If no second audio output channel outputs the audio stream, then the audio stream is determined as the first audio stream. After acquiring all audio streams from the first audio output channel, each audio stream is iterated through sequentially. For the currently iterated audio stream, it is checked whether any second audio output channel (i.e., a normally functioning audio output channel) is also configured to output the same audio stream. Here, "output" means that the audio stream has been assigned to the corresponding channel as its output destination. In other words, the check determines whether the audio stream is exclusively used by the first audio output channel or is simultaneously assigned to other normal channels for redundant output.
[0047] If, upon inspection, the currently traversed audio stream does not exist in the output routing list of any second audio output channel—meaning that the audio stream is only output by the faulty first audio output channel—it implies that once that channel fails, the audio stream will be completely interrupted, and the listener will not be able to obtain the audio content. Therefore, this audio stream is identified as the first audio stream, serving as the object that needs to be remapped to the target channel subsequently, and the process continues with the next audio stream after this identification.
[0048] Step D30: If any second audio output channel outputs the audio stream, then continue traversing the next audio stream.
[0049] If the currently traversed audio stream is assigned to at least one second audio output channel in addition to the first audio output channel, it means that the audio stream already has an output path on other normal channels. Even if the first audio output channel fails, the audio stream can still continue to output through other normal channels and will not be completely interrupted due to the failure of the current channel. Therefore, the audio stream does not need to perform a remapping operation. Continue traversing the next audio stream on the first audio output channel and repeat the checking process of step D20 until all audio streams that need to be remapped are found.
[0050] If, after traversing all audio streams, no first audio stream meeting the conditions is found (i.e., all audio streams on the first audio output channel already have redundant output paths on other normal channels), then the subsequent remapping steps can be skipped. Therefore, this scheme accurately identifies the audio streams that truly need to be migrated and pose a risk of not being able to output normally, avoiding unnecessary remapping operations on audio streams with existing redundant outputs, effectively saving system processing resources and channel switching overhead.
[0051] In one possible implementation, remapping the first audio stream from the first audio output channel to the target audio output channel includes: Step E10: Obtain the mixing matrix, wherein the mixing matrix is used to describe the routing relationship between each audio stream and each audio output channel; A mixing matrix is a data structure within an audio device used to manage audio routing, describing the mapping relationship between each audio stream and each audio output channel. Specifically, a mixing matrix can be represented as a multidimensional array or lookup table, where rows correspond to each audio stream and columns correspond to each audio output channel. Each element in the matrix represents whether the corresponding audio stream is routed to the corresponding channel and the gain coefficient used during routing. For example, when an element value is a valid gain value (such as 0dB), it means that the corresponding audio stream is routed to the corresponding audio output channel; when an element value is invalid (such as negative infinity dB or zero gain), it means that the corresponding audio stream is not routed to that channel.
[0052] During the operation of audio equipment, the digital signal processor or audio routing controller allocates each audio stream to the corresponding output channel for mixing and output based on the mixing matrix.
[0053] Step E20: Delete the routing relationship between the first audio stream and the first audio output channel in the mixing matrix; After obtaining the mixing matrix, modify the routing configuration within it. Specifically, delete the routing relationship at the intersection of the first audio stream and the first audio output channel in the mixing matrix. Deleting the routing relationship means clearing the valid routing flag at the corresponding position in the mixing matrix or setting the gain coefficient to an invalid value (e.g., negative infinity dB), so that the first audio stream is no longer routed to the faulty first audio output channel. The purpose of this deletion operation is to disconnect the output connection between the faulty channel and the first audio stream, ensuring that subsequent first audio streams will no longer attempt to output through the faulty channel, thus avoiding signal distortion or interruption caused by the faulty channel continuing to carry out output tasks.
[0054] Step E30: Establish the routing relationship between the first audio stream and the target audio output channel in the mixing matrix.
[0055] After deleting the routing relationship between the first audio stream and the first audio output channel, the mixing matrix is further modified to establish a new routing relationship at the intersection of the first audio stream and the target audio output channel. Establishing the routing relationship means setting the routing flag at the corresponding position in the mixing matrix to valid, or setting the gain coefficient to the target gain value (e.g., 0dB or other adaptation value), so that the first audio stream is routed to the target audio output channel. Therefore, after the mixing matrix is updated, the output destination of the first audio stream switches from the faulty channel to the target channel, and subsequent audio processing flows according to the updated mixing matrix, allowing the first audio stream to be output normally through the target audio output channel.
[0056] This embodiment utilizes a mixing matrix to remap the first audio stream across channels. This method eliminates the need to restart the device or reload configuration files; routing switching is accomplished simply by adding or deleting routing entries in the mixing matrix. This results in fast switching speeds, low overhead, and smooth migration of audio stream output paths. Furthermore, the centralized management based on the mixing matrix allows audio devices to easily record and maintain the routing relationships between all audio streams and channels, facilitating subsequent queries and backtracking.
[0057] In one possible implementation, after remapping the first audio stream from the first audio output channel to the target audio output channel, the method further includes: Step F10: If the prompt priority of the first audio stream is higher than that of the second audio stream, then adjust the output characteristics of each audio stream on the target audio output channel so that the first audio stream is output with priority or has auditory prominence on the target audio output channel relative to the second audio stream. The second audio stream is the audio stream output through the target audio output channel before the first audio stream is routed to the target audio output channel.
[0058] After remapping the first audio stream from the first audio output channel to the target audio output channel, if the target audio output channel already has a second audio stream output through it before receiving the first audio stream, then the first audio stream and the second audio stream form a mixed output relationship on the target channel.
[0059] In this case, the audio device further obtains the cue priority of the first audio stream and the cue priority of the second audio stream, and compares the two.
[0060] When the cue priority of the first audio stream is higher than that of the second audio stream, the audio device adjusts the output characteristics of each audio stream on the target audio output channel to make the first audio stream output with priority or auditory prominence over the second audio stream on that target audio output channel. The adjustment of output characteristics may include, but is not limited to, the following: increasing the output gain of the first audio stream and correspondingly decreasing the output gain of the second audio stream, so that the loudness of the first audio stream dominates in the mix; or, performing dynamic range compression on the first and second audio streams, using sidechain compression to automatically suppress the second audio stream during the first audio stream's output; or, adjusting the playback timing of the first and second audio streams on the target channel to give the first audio stream priority in obtaining output resources.
[0061] When the cue priority of the first audio stream is lower than or equal to that of the second audio stream, the audio device maintains the original output characteristics of each audio stream on the target audio output channel, meaning the output performance of the second audio stream is not altered by the influx of the first audio stream. In this case, if the first and second audio streams overlap in time, the first audio stream is presented with lower loudness or a less prominent sound image position, existing as background audio, thereby ensuring that the transmission of critical information from the higher-priority second audio stream is not affected.
[0062] It should be noted that "first audio stream" and "second audio stream" are both general terms, and their number is not limited to a single channel. A first audio stream can be one or more audio streams from a first audio output channel. When multiple first audio streams need to be migrated to the target channel, each first audio stream can have the same or different priority levels. Similarly, a second audio stream can be multiple audio streams that have already been output through the target channel before the first audio streams migrate in, and each second audio stream can also have the same or different priority levels. When multiple first audio streams and multiple second audio streams coexist on the target audio output channel (hereinafter referred to as the target channel), the audio device can sort the audio streams from highest to lowest priority, prioritizing the output prominence of high-priority audio streams and allocating dynamic headroom accordingly, while lower-priority audio streams will have their gain or delay reduced. For example, suppose that after the first audio output channel fails, two high-priority alarm tones and one low-priority background music need to be transferred to the target channel. The target channel already has two medium-priority navigation voices and one low-priority ambient sound. The audio device sorts all six audio streams on the target channel according to priority, prioritizing the output loudness and clarity of the two high-priority alarm tones, then ensuring the audibility of the two medium-priority navigation voices, while the two low-priority audio streams are suppressed to the background level.
[0063] By adjusting the output characteristics triggered by the above priority, in scenarios where multiple audio streams converge on the same target channel due to fault channel migration, it can ensure that high-priority audio content such as key prompts and alarms are not masked by other audio streams, maintain their audibility and warning effectiveness, and avoid auditory information masking caused by channel merging. Thus, during the channel fault recovery process, both output continuity and the reliability of key information transmission are taken into account.
[0064] In one possible implementation, adjusting the output characteristics of each audio stream on the target audio output channel includes: Step G10: Adjust the playback priority of the second audio stream to be lower than the playback priority of the first audio stream; The audio device configures a corresponding playback priority attribute for each audio stream, which indicates the relative importance of the audio streams during output resource contention. When the prompt priority of the first audio stream is higher than that of the second audio stream, the audio device adjusts the playback priority parameter of the second audio stream to be lower than that of the first audio stream. This playback priority adjustment result can be stored in the mixing matrix or the audio stream attribute table as the basis for subsequent mixing scheduling and resource allocation.
[0065] It should be noted that the playback priority adjustment here does not change the inherent prompt priority of the audio stream itself. Instead, when mixing and outputting the target channel, the scheduling priority of each audio stream on the channel is dynamically adjusted according to the priority relationship between the first and second audio streams, so that the output scheduling strategy of the target channel matches the priority order of the two.
[0066] And / or, in step G20, adjust the output volume of the second audio stream to be lower than the output volume of the first audio stream by a preset difference.
[0067] After determining that the first audio stream has a higher priority than the second audio stream, the audio device reduces the output gain of the second audio stream, making its output volume lower than the first audio stream by a preset difference. This preset difference can be pre-set according to the application scenario, for example, 4dB, 10dB, or 12dB. The choice of this difference should be sufficient to make the first audio stream noticeably more prominent than the second audio stream, while not rendering the second audio stream completely inaudible. In a specific implementation, this adjustment can be achieved by modifying the gain coefficient corresponding to the second audio stream in the mixing matrix, subtracting the preset difference in decibels from the original gain value, while keeping the gain of the first audio stream unchanged or appropriately increasing it as needed.
[0068] Steps G10 and G20 can be executed individually or in combination. When step G10 is executed alone, the audio device schedules the mixing output according to the adjusted playback priority, ensuring that the high-priority first audio stream is processed first in the output resource competition. When step G20 is executed alone, the audio device directly achieves the auditory prominence of the first audio stream through the control of the volume difference. When steps G10 and G20 are executed in combination, the priority output status of the first audio stream is guaranteed from both the scheduling strategy and loudness perception dimensions, resulting in a more significant effect.
[0069] By adjusting the playback priority and / or output volume as described above, when multiple audio streams converge to the same target channel, the key audio content with high priority can always be clearly perceived by the listener, effectively avoiding the problem of key information being obscured due to aliasing of multiple audio streams after channel failure migration.
[0070] For example, to aid in understanding the technical concept or principle of the audio output method combined with the first and second embodiments described above, a specific embodiment is now provided. In this specific embodiment, refer to... Figure 4 As shown, the audio device includes an audio input layer, a channel monitoring layer, a remapping decision layer, and a mixing and output layer.
[0071] The audio input layer contains audio streams that are assigned to health channels and audio streams that are not assigned to any health channel. These two types of audio streams together constitute the input source of the mixing matrix.
[0072] The channel monitoring layer includes a Power IC status register reading module and a channel fault determination module. The Power IC status register reading module periodically reads the status registers of each channel through the communication interface to obtain the real-time health status of each channel; the channel fault determination module analyzes the read status information, determines whether each channel is in a fault state, and outputs the channel status information.
[0073] The remapping decision layer comprises a faulty channel audio extraction module, an optimal channel selection module, and a remapping strategy execution module. The faulty channel audio extraction module extracts the audio stream from the faulty channel (i.e., the first audio output channel) that has not been assigned to any healthy channel (i.e., the second audio output channel), providing it as the target for migration by the subsequent selection module. The optimal channel selection module determines the target channel from the healthy channels according to a preset strategy. The remapping strategy execution module switches the audio stream to be migrated from the original route of the faulty channel to the route of the target channel.
[0074] The mixing and output layer includes a mixing matrix, a mixing matrix reconfiguration module, a priority scheduling module, a volume adjustment module, and multi-channel audio output. The mixing matrix describes the routing relationship between each audio stream and each audio output channel; the mixing matrix reconfiguration module updates the routing configuration of the mixing matrix based on the remapping strategy execution result; the priority scheduling module adjusts the playback priority of each audio stream on the target channel; the volume adjustment module adjusts the output volume relationship of each audio stream; and the multi-channel audio output outputs the processed audio data to the corresponding speakers through each channel to complete audio playback.
[0075] Based on this, refer to Figure 5 As shown, the audio output process includes: performing periodic channel monitoring and reading the status registers of each PowerIG channel; when a channel fault flag is continuously set for more than the dejitter time, the channel is marked as faulty; then it is determined whether there is a faulty channel to be processed. If not, the current mixing configuration is maintained; if so, the mixing matrix is updated and the first audio stream on the faulty channel is extracted; then it is determined whether the audio has left and right directional indication. If so, the normal channel on the same side is selected as a candidate; otherwise, the channel closer to the driver's position is selected as a candidate; when there are multiple candidate channels, the channel with the lightest load is selected; otherwise, the optimal alternative channel (i.e., the target audio output channel) is directly determined; after determination, audio remapping is performed, and the audio playback priority and volume of each audio channel of the alternative channel are adjusted. After remapping is completed, periodic monitoring continues.
[0076] It should be noted that the above examples are only used to help understand this embodiment and do not constitute a limitation on the audio output process of this embodiment. Any simple modifications based on this technical concept are within the protection scope of this application.
[0077] Furthermore, this application also proposes an audio device, which includes multiple audio output channels and a processor, each of the audio output channels being connected to the processor, and the processor being used to execute the steps of the audio output method described above.
[0078] The audio device provided in this application, employing the audio output method described in the above embodiments, can effectively address the problem of abnormal audio output caused by channel failure in multi-channel audio devices. Compared with the prior art, the beneficial effects of the audio device provided in this application are the same as those of the audio output method provided in the above embodiments, and other technical features of this audio device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0079] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0080] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0081] In addition, to achieve the above objectives, this application also provides a readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the audio output method in the above embodiments.
[0082] The computer-readable storage medium provided in this application embodiment may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0083] The aforementioned computer-readable storage medium may be included in an audio device or may exist independently without being assembled into an audio device.
[0084] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an audio device, cause the audio device to perform the process steps of any embodiment of the aforementioned audio output method.
[0085] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0086] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0087] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.
[0088] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described audio output method, and can effectively solve the problem of abnormal audio output caused by channel failure in multi-channel audio devices. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the audio output method provided in the above embodiments, and will not be repeated here.
[0089] Furthermore, embodiments of this application also propose a computer program product, including a computer program, which, when executed by a processor, implements the steps of the audio output method described above.
[0090] The specific implementation of the computer program product in this application is basically the same as the embodiments of the audio output method described above, and will not be repeated here.
[0091] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system 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 system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0092] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0093] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software sensor. This computer software sensor is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause an audio device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0094] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. An audio output method, characterized in that, Applied to an audio device, the audio device including multiple audio output channels, the audio output method includes the following steps: Monitor the operating status of each of the audio output channels and obtain the first audio stream output through the first audio output channel, wherein the first audio output channel is the audio output channel whose operating status indicates that there is an operating fault among the audio output channels; Based on the attribute information of the first audio stream, a target audio output channel is determined from the second audio output channel, wherein the attribute information is used to characterize the output direction requirement and / or auditory reference position requirement of the first audio stream, and the second audio output channel is the audio output channel whose operating status indicates that there is no operating fault among the audio output channels. The first audio stream is remapped from the first audio output channel to the target audio output channel so as to output the first audio stream through the target audio output channel.
2. The audio output method as described in claim 1, characterized in that, The step of determining the target audio output channel from the second audio output channel based on the attribute information of the first audio stream includes: When the attribute information of the first audio stream indicates that the first audio stream has directional indication, candidate audio output channels on the same side as the first audio output channel are selected from the second audio output channels. Determine the target audio output channel from the candidate audio output channels; The term "same side" refers to the fact that the sound-producing units corresponding to the two audio output channels are arranged on the same side of the space.
3. The audio output method as described in claim 1, characterized in that, The step of determining the target audio output channel from the second audio output channel based on the attribute information of the first audio stream includes: If the attribute information of the first audio stream indicates that the first audio stream does not have directional indication, the candidate audio output channel closest to the preset auditory reference position is selected from the second audio output channel. The target audio output channel is determined from the candidate audio output channels.
4. The audio output method as described in claim 2 or 3, characterized in that, The step of determining the target audio output channel from the candidate audio output channels includes: In the presence of multiple candidate audio output channels, obtain the current audio load of each candidate audio output channel; The candidate audio output channel with the lowest current audio load is determined as the target audio output channel.
5. The audio output method as described in claim 1, characterized in that, The step of obtaining the first audio stream output through the first audio output channel includes: Get all audio streams output through the first audio output channel; Iterate through each of the audio streams. If no second audio output channel outputs the audio stream, then the audio stream is determined as the first audio stream. If any second audio output channel outputs the audio stream, then continue traversing the next audio stream.
6. The audio output method as described in claim 1, characterized in that, The step of remapping the first audio stream from the first audio output channel to the target audio output channel includes: Obtain a mixing matrix, wherein the mixing matrix is used to describe the routing relationship between each audio stream and each audio output channel; Delete the routing relationship between the first audio stream and the first audio output channel in the mixing matrix; The routing relationship between the first audio stream and the target audio output channel is established in the mixing matrix.
7. The audio output method as described in claim 1, characterized in that, After remapping the first audio stream from the first audio output channel to the target audio output channel, the method further includes: If the cue priority of the first audio stream is higher than that of the second audio stream, then the output characteristics of each audio stream on the target audio output channel are adjusted so that the first audio stream is output with priority or has auditory prominence on the target audio output channel relative to the second audio stream. The second audio stream is the audio stream output through the target audio output channel before the first audio stream is routed to the target audio output channel.
8. The audio output method as described in claim 7, characterized in that, Adjusting the output characteristics of each audio stream on the target audio output channel includes: Adjust the playback priority of the second audio stream to be lower than that of the first audio stream; and / or, Adjust the output volume of the second audio stream to be lower than the output volume of the first audio stream by a preset difference.
9. An audio device, characterized in that, The audio device includes a plurality of audio output channels and a processor, each of the audio output channels being connected to the processor, the processor being configured to perform the steps of the audio output method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the audio output method as described in any one of claims 1 to 8.
