Vehicle-mounted karaoke system, control method, electronic equipment and storage medium
By looping back and going through the telephone channel at the Audio HAL layer, AAUDIO exclusive mode and ultra-low-latency sound card equipment are used to establish a loopback loop path for the vocal loopback path, solving the vocal delay and stability problems in the on-board karaoke system, and achieving a low-latency and high-stability karaoke experience.
Patent Information
- Application Number
- CN202510722484.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-02
AI Technical Summary
The existing karaoke system has excessive vocal delay and poor stability, resulting in poor user experience and lack of an abnormal exit automatic monitoring mechanism affects use.
By looping back and going through the telephone channel at the Audio HAL layer, AAUDIO exclusive mode and ultra-low-latency sound card equipment are used to establish a voice loopback loop path, and the stability is monitored on the system side, combining an abnormal monitoring mechanism to ensure system robustness.
The delay during the karaoke process is reduced to about 40ms, improves system stability and user experience, solves the problem of delay and stability, and ensures that the system is shut down normally in abnormal situations.
Smart Images

Figure CN120580973A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of in-vehicle entertainment control, and in particular to an in-vehicle karaoke system, a control method for the in-vehicle karaoke system, an electronic device, and a storage medium. Background Art
[0002] In recent years, with the development of smart cars, cars have become increasingly popular and have become the primary mode of transportation for families. This has led to a growing demand for car features, such as in-car karaoke. While some people still use their phones for karaoke, the sound quality isn't very good. Others go to karaoke bars, but the noisy and expensive environment of karaoke bars doesn't fully meet people's need for on-the-go karaoke. Consequently, most parking lots are promoting in-car karaoke features.
[0003] However, there are still some problems with the in-car karaoke systems of car manufacturers. The most concerned issues are the delay of human voice in the system and the stability of karaoke. At present, some car manufacturers' karaoke solutions loop the human voice at the application layer or the framework layer, and the human voice and accompaniment go through the media channel, resulting in excessive delay. If the delay of human voice is too large and the stability is too poor, it will lead to a very unacceptable experience for users.
[0004] Previous KTV solutions used upper-layer loopback for vocals and output them through media channels. Some also used HAL layer loopback media channels for output. However, the enabled threads were all ordinary threads, and the overall delay could reach 70-90ms, or even over 100ms, resulting in a poor user experience.
[0005] There is no automatic monitoring mechanism for abnormal exits. When the application exits abnormally, the underlying layer is not aware of it, and the channel is still in KTV mode and cannot be closed, affecting user usage.
[0006] For example, the Chinese patent "A vehicle-mounted KTV control method and device, and a vehicle-mounted intelligent network terminal" (patent application number: CN202010095631.1 publication number: CN113270082A) uses the hardware in the vehicle to optimize the karaoke function, but does not address the delay problem of human voice in the system and the stability of karaoke.
[0007] The Chinese patent, "A Method, System, Device, and Storage Medium for In-Vehicle Karaoke" (Patent Application Number: CN202311581248.7, Publication Number: CN117392967A), uses a software solution to invert the audio signal, effectively preventing self-excited howling caused by microphone re-pickup during in-vehicle karaoke, thus minimizing damage to the audio system. However, it does not address the issues of vocal latency in the system or karaoke stability. Summary of the Invention
[0008] In view of this, the purpose of the present invention is to provide a car karaoke system, a car karaoke system control method, an electronic device, and a storage medium. The present invention will reduce the problems of excessive voice delay and karaoke stability during karaoke through AAUDIO exclusive mode, looping the human voice in the audio HAL layer and going through the telephone channel, mixing the human voice and accompaniment sound in an external power amplifier and monitoring stability on the system side.
[0009] The present invention provides the following solutions:
[0010] According to one aspect of the present invention, there is provided a car karaoke system, comprising: a car karaoke APP, a CarService unit, a HAL unit, an AudioFramework unit, an AAUDIO unit, an AudioHal unit, an Mcu_service unit, an AMP unit, a MIC unit, and a Speaker unit;
[0011] Car Karaoke APP, used to send a focus request to the CarService unit when the software is turned on;
[0012] The CarService unit is used to arbitrate and trigger the KTV mode on command, send the matching information to the AMP unit and HAL unit, and monitor the abnormal exit of the car karaoke app and control the KTV mode to close;
[0013] The HAL unit is used to provide a unified interface for the CarService unit;
[0014] The AudioFramework unit is used to receive instructions from the CarService unit and control the AAUDIO unit;
[0015] AAUDIO unit, used to enable AAUDIO thread and transmit audio data in exclusive mode;
[0016] The AudioHal unit is used to receive the KTV mode start command, establish a loopback path, and transmit the MIC data back to the downstream output. At the same time, it selects the ULL ultra-low latency sound card device and telephone channel;
[0017] The Mcu_service unit is used to receive the matching information of CarService, control the power amplifier, and transmit the power amplifier feedback signal back to the CarService unit;
[0018] The AMP unit is used to receive vocal and accompaniment sound signals, mix them, and then output them to the Speaker unit for playback;
[0019] The MIC unit is used to collect the human voice signal and transmit it to the AudioHal unit and the AMP unit;
[0020] The Speaker unit is used to play the audio signal after the AMP mixing process.
[0021] Further, including:
[0022] The sound information collected by the MIC unit is transmitted to the AMP unit, which includes: establishing a loopback path through the AudioHal unit and transmitting it to the AMP unit.
[0023] Further, including:
[0024] The accompaniment sound signal is sent by the in-car karaoke APP, passed through the AudioFramework unit and the AudioHal unit, and transmitted to the AMP unit.
[0025] Further, including:
[0026] The CarService unit sends a CAN signal to close the KTV to interact with the AMP unit. After the AMP unit executes the closing command, it sends a feedback signal to the CarService unit.
[0027] Further, including:
[0028] The CarService unit sends the ktv_mode=on instruction to the HAL unit, and the HAL unit selects the ULL sound card device, activates the telephone channel, and generates a voice loopback path by establishing a voice loopback path;
[0029] Among them, the ktv_mode=on command is used to control the activation of the car karaoke system mode.
[0030] The CarService unit sends the ktv_mode=off instruction to the HAL unit, and the HAL unit cancels the relevant configuration and releases hardware resources;
[0031] Among them, the ktv_mode=off command is used to control the shutdown of the car karaoke system mode.
[0032] Further, including:
[0033] The CarService unit obtains the running status of the in-car Karaoke APP through the HAL unit.
[0034] According to two aspects of the present invention, a method for controlling a car karaoke system is provided. The method for controlling a car karaoke system includes:
[0035] When the karaoke function is turned on, the car karaoke app sends a focus request to the CarService unit;
[0036] The CarService unit starts the focus policy arbitration mechanism to determine whether to delegate focus usage rights;
[0037] If yes, then send a CAN signal to the AMP unit to turn on the KTV mode;
[0038] And send ktv_mode=on command to HAL unit;
[0039] After receiving the signal, the AMP unit establishes a KTV path and feeds it back to the CarService unit;
[0040] After receiving the instruction, the HAL unit selects the ULL sound card device, activates the telephone channel, and generates a human voice loopback path;
[0041] The AudioFramework unit receives instructions from the CarService unit and controls the AAUDIO unit;
[0042] The AAUDIO unit starts the AAUDIO thread according to the control instructions of the AudioFramework unit and transmits audio data in exclusive mode;
[0043] The CarService unit obtains the running status of the car karaoke APP in real time through the HAL unit. According to three aspects of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0044] A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of a control method for an in-vehicle karaoke system.
[0045] According to four aspects of the present invention, a computer-readable storage medium is provided, which stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a control method for an in-vehicle karaoke system.
[0046] Through the above solution, the following beneficial technical effects are achieved:
[0047] This application generates a vocal loopback path in the HAL unit, thereby reducing the distance that the vocal audio stream flows to the audio frameworkwok or application, and then flows from the audio framework or application to the HAL unit, reducing the number of cross-layer interactions, and avoiding the interference of the default logic of the system framework layer on the karaoke signal. By opening an independent hardware-level path for the karaoke scene and isolating it from other audio tasks, this ensures the priority transmission of the vocal signal and reduces the delay fluctuation caused by resource preemption.
[0048] When this application reuses the telephone channel via the voice loopback path, the amplifier does not execute the audio effects algorithm. A single audio effects algorithm (such as reverberation) can introduce a 20-50ms delay, and a cascade of multiple algorithms can result in a total delay exceeding 100ms. Skipping the algorithm processing directly reduces this time consumption, further reducing latency.
[0049] This application uses the AAUDIO exclusive mode audio stream to interact directly with the underlying ALSA shared memory. Therefore, the AAUDIO method can be used to bypass the Framework-related mixing thread and send the audio stream directly to the underlying layer. The underlying layer also selects the AAUDIO low-latency sound card path and adopts a low period size buffer to reduce the delay of the accompaniment sound.
[0050] This application improves the system stability of Karaoke by controlling the audio focus strategy, active abnormality monitoring and CAN signal interaction logic in CarAudioService, interacting with the power amplifier and monitoring the abnormal exit of the Karaoke software.
[0051] Through the overall process of the above optimization solution, the entire loop delay can be reduced to about 40ms, and the abnormality monitoring mechanism can improve the robustness of the overall system and enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a structural diagram of an in-vehicle karaoke system provided by one or more embodiments of the present invention.
[0053] Figure 2 This is a flow chart of a control method for a car karaoke system provided by one or more embodiments of the present invention.
[0054] Figure 3 A schematic diagram of an in-vehicle karaoke system according to a specific embodiment of the present invention.
[0055] Figure 4 A block diagram of the electronic device structure of a control method for an in-vehicle karaoke system provided by one or more embodiments of the present invention. DETAILED DESCRIPTION
[0056] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0057] Figure 1 This is a structural diagram of an in-vehicle karaoke system provided by one or more embodiments of the present invention.
[0058] like Figure 1 The vehicle-mounted karaoke system shown includes:
[0059] Car Karaoke APP, CarService unit, HAL unit, AudioFramework unit, AAUDIO unit, AudioHal unit, Mcu_service unit, AMP unit, MIC unit and Speaker unit;
[0060] Car Karaoke APP, used to send a focus request to the CarService unit when the software is turned on;
[0061] The CarService unit is used to arbitrate and trigger the KTV mode on command, send the matching information to the AMP unit and HAL unit, and monitor the abnormal exit of the car karaoke app and control the KTV mode to close;
[0062] The HAL unit is used to provide a unified interface for the CarService unit;
[0063] The AudioFramework unit is used to receive instructions from the CarService unit and control the AAUDIO unit;
[0064] AAUDIO unit, used to enable AAUDIO thread and transmit audio data in exclusive mode;
[0065] The AudioHal unit is used to receive the KTV mode start command, establish a loopback path, and transmit the MIC data back to the downstream output. At the same time, it selects the ULL ultra-low latency sound card device and telephone channel;
[0066] The Mcu_service unit is used to receive the matching information of CarService, control the power amplifier, and transmit the power amplifier feedback signal back to the CarService unit;
[0067] The AMP unit is used to receive vocal and accompaniment sound signals, mix them, and then output them to the Speaker unit for playback;
[0068] The MIC unit is used to collect the human voice signal and transmit it to the AudioHal unit and the AMP unit;
[0069] The Speaker unit is used to play the audio signal after the AMP mixing process.
[0070] Further, including:
[0071] The sound information collected by the MIC unit is transmitted to the AMP unit, which includes: establishing a loopback path through the AudioHal unit and transmitting it to the AMP unit.
[0072] Further, including:
[0073] The accompaniment sound signal is sent by the in-car karaoke APP, passed through the AudioFramework unit and the AudioHal unit, and transmitted to the AMP unit.
[0074] Further, including:
[0075] The CarService unit sends a CAN signal to close the KTV to interact with the AMP unit. After the AMP unit executes the closing command, it sends a feedback signal to the CarService unit.
[0076] Further, including:
[0077] The CarService unit sends the ktv_mode=on instruction to the HAL unit, and the HAL unit selects the ULL sound card device, activates the telephone channel, and generates a voice loopback path by establishing a voice loopback path;
[0078] Among them, the ktv_mode=on command is used to control the activation of the car karaoke system mode.
[0079] The CarService unit sends the ktv_mode=off instruction to the HAL unit, and the HAL unit cancels the relevant configuration and releases hardware resources;
[0080] Among them, the ktv_mode=off command is used to control the shutdown of the car karaoke system mode.
[0081] Further, including:
[0082] The CarService unit obtains the running status of the in-car Karaoke APP through the HAL unit.
[0083] Specifically, by opening the AAUDIO exclusive mode channel and enabling the AAUDIO thread, the smaller the period_size, the shorter the transmission and processing interval of the audio data, and locking the sound card through ALSA to prevent interference from other applications. AAudio exclusive mode uses mmap() to directly map the application buffer to the ALSA kernel buffer (zero copy), avoiding the copy_to_user / copy_from_user system call overhead and ensuring a stable low-latency environment.
[0084] Here, period_size represents the minimum number of audio frames that the audio hardware processes each time.
[0085] In exclusive mode, thread priority settings (such as Android's THREAD_PRIORITY_URGENT_AUDIO) must be used to avoid delay fluctuations caused by CPU scheduling.
[0086] When the user clicks the "Start Karaoke" button on the car interface, or activates the KTV function through voice commands, the car karaoke APP sends a focus application request to the CarService unit, along with the focus type (such as AUDIO_FOCUS_GAIN) and priority.
[0087] The CarService unit performs focus arbitration, checking the current focus holder, such as the music player or navigation app. If a conflict exists, it handles it according to the policy, such as notifying the current app to lower the volume or pause it. If the in-car karaoke app has sufficient priority and no higher-priority app is occupying the focus, the focus grant process begins; otherwise, a "focus request failed" response is returned.
[0088] When the focus arbitration is passed, the in-car karaoke APP obtains the audio focus.
[0089] KTV focus has a high priority and interrupts other services. If the KTV focus application is successful, the KTV mode CAN signal is sent to the AMP, and the KTV parameter ktv_mode=on is sent to the AudioHal unit through setparameter. Among them, CarService records the current focus state as "KTV_ACTIVE" and sends the KTV mode start instruction to the power amplifier through the CAN bus. The CarService unit simultaneously notifies other modules of the vehicle system, such as switching the central control screen to the karaoke interface and shielding non-essential operations, such as locking the physical volume button to microphone volume adjustment.
[0090] The amplifier ECU receives the KTV mode command through the CAN transceiver and performs the following operations after parsing the frame data:
[0091] Open the phone channel: Reserved for call mixing, but in karaoke mode, the phone has the highest priority and needs to support seamless switching).
[0092] Open the media channel: Access the accompaniment music stream of the KTV app, which is usually audio data transmitted via Bluetooth or USB.
[0093] Activate the microphone input channel: turn on the car microphone to pick up sound, and the signal enters the DSP after A / D conversion.
[0094] The DSP mixes the media audio and the microphone audio in a preset ratio, such as accompaniment: microphone = 8:2, to generate a composite audio stream.
[0095] Enable acoustic echo cancellation (AEC) and noise reduction (ANS) algorithms to optimize karaoke sound quality and suppress ambient noise and microphone feedback.
[0096] The internal relay of the amplifier switches the audio output path to the car speakers and turns off non-karaoke related channels, such as muting the radio.
[0097] After the amplifier completes the path establishment, it sends a status feedback signal to CarService via the CAN bus, including:
[0098] Frame ID: 0x18FF0201 (special ID for amplifier status feedback).
[0099] Data field: Byte0: status type (0x01 = mode status),
[0100] Byte1: current mode (0x02 = KTV mode, 0x01 = normal mode),
[0101] Byte2: Channel status mask (bit0 = media channel on, bit1 = microphone channel on, bit2 = telephone channel on standby),
[0102] Byte3: Error code (0x00 = normal, non-zero value indicates abnormality, such as 0x01 = microphone failure).
[0103] Furthermore, the CarService unit parses the feedback signal and updates the internal state machine to "AMP_KTV_MODE_ENABLED".
[0104] Store the amplifier status to the system configuration, such as SharedPreferences or a database, for subsequent focus switching, system restart and other scenarios to restore the configuration.
[0105] If an error code is detected, such as the microphone is not connected, a UI prompt ("Please check the microphone connection") is triggered and the karaoke process is terminated.
[0106] The CarService unit continuously monitors the amplifier status on the CAN bus, for example, polling every 500ms, to prevent hardware anomalies from causing inconsistent status, such as the amplifier automatically resetting due to overheating without notifying the CarService unit.
[0107] Focus retention mechanism: While the KTV app holds audio focus, other apps, such as music players, can only run in "Duck" mode with the volume lowered and cannot interrupt the karaoke audio.
[0108] The above solution solves the problem of asynchrony caused by link delay from the generation to playback of related audio in karaoke scenarios. It also solves the technical problem of reducing the end-to-end delay by reducing the period_size and shortening the amount of data processed in a single audio session, allowing audio frames to be transmitted to the hardware more frequently.
[0109] The above solution solves the problems in the traditional mode where audio data may need to be copied multiple times, application threads are susceptible to scheduling policies, and thread context switching increases and system call delays.
[0110] The above solution solves the problem of no automatic monitoring mechanism for abnormal exit. When the application exits abnormally, the underlying layer is not aware of it, and the channel is still in KTV mode and cannot be closed, affecting user usage.
[0111] The present invention is that when karaoke starts, the Framework opens the AAUDIO exclusive mode path, the application enables the AAUDIO thread, and the AAUDIO exclusive mode period_size is small, which can further reduce the delay.
[0112] When karaoke starts, KTV parameters are sent through setparameter. In this mode, the HAL layer opens the ULL telephone channel under the ALSA architecture. The ULL telephone channel has no sound effect processing and a small period_size. In addition, a vocal loopback path is established, and the vocal is directly looped back to the downstream through the HAL layer, further reducing latency.
[0113] When karaoke starts, KTV applies for focus, and CarService performs focus arbitration. KTV focus has a high priority and interrupts other services. If KTV focus application is successful, the CAN signal of KTV mode is sent to AMP and the KTV parameter ktv_mode=on is sent to the Audio Hal layer through setparameter.
[0114] After receiving the CAN signal of KTV mode, AMP starts to establish a mixing channel and enters the whole-car sound mode, and sends a feedback signal to CarService. CarService receives the feedback signal and records the current status, whether it is in KTV mode or non-KTV mode.
[0115] CarService has added an active exception monitoring mechanism. When an application exits abnormally, CarService automatically detects the exception and sends a CAN signal to shut down the KTV to the underlying amplifier and sets ktv_mode=off to the audio HAL. The AMP performs operations related to exiting KTV mode, and the audio HAL closes the loopback channel and disables the ULL phone channel.
[0116] Through the overall process of the above optimization solution, the entire loop delay can be reduced to about 40ms, and the abnormality monitoring mechanism can improve the robustness of the overall system and enhance the user experience.
[0117] It is worth noting that although this system only discloses the in-car Karaoke APP, CarService unit, HAL unit, AudioFramework unit, AAUDIO unit, AudioHal unit, Mcu_service unit, AMP unit, MIC unit and Speaker unit, it does not mean that this device is limited to the above-mentioned basic functional modules. On the contrary, what the present invention wants to express is that, on the basis of the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the existing technology to form an infinite number of embodiments or technical solutions. In other words, this system is open rather than closed. Just because this embodiment only discloses individual basic functional modules, it cannot be considered that the scope of protection of the claims of the present invention is limited to the above-mentioned basic functional modules.
[0118] Figure 2 This is a flowchart of a control method for a car karaoke system provided by one or more embodiments of the present invention.
[0119] like Figure 2 The control method of a car karaoke system shown includes:
[0120] When the karaoke function is turned on, the car karaoke app sends a focus request to the CarService unit;
[0121] The CarService unit starts the focus policy arbitration mechanism to determine whether to delegate focus usage rights;
[0122] If yes, then send a CAN signal to the AMP unit to turn on the KTV mode;
[0123] And send ktv_mode = on command to HAL unit;
[0124] After receiving the signal, the AMP unit establishes a KTV path and feeds it back to the CarService unit;
[0125] Furthermore, after receiving the instruction, the HAL unit selects the ULL sound card device, activates the telephone channel, and generates a human voice loopback path;
[0126] The AudioFramework unit receives instructions from the CarService unit and controls the AAUDIO unit;
[0127] The AAUDIO unit starts the AAUDIO thread according to the control instructions of the AudioFramework unit and transmits audio data in exclusive mode;
[0128] The CarService unit obtains the operating status of the in-car Karaoke APP in real time through the HAL unit.
[0129] Figure 3 It is a schematic diagram of a car-mounted karaoke system according to a specific embodiment of the present invention.
[0130] In this specific embodiment, a car karaoke system is disclosed, and the system operates as follows:
[0131] Start karaoke, the car karaoke APP applies for focus, and the CarService unit arbitrates the focus strategy. When the car karaoke APP successfully applies for focus, the CarService unit sends a CAN signal to turn on the KTV mode to the power amplifier. The power amplifier receives the CAN signal of the KTV mode to establish a KTV path (open the telephone channel, media channel and start the mixing function). The power amplifier sends a feedback signal to the CarService unit, so that the CarService unit saves the current AMP status (whether it is in KTV mode) to facilitate the CarService unit to perform the next step of processing.
[0132] When karaoke is turned on and the in-car karaoke APP successfully applies for focus, the CarService unit sends a CAN signal and sends ktv_mode=on to the HAL layer through setparameter. After receiving ktv_mode=on, the HAL layer selects the ULL sound card device, enables the telephone channel route, and establishes a voice loopback path to establish a loopback.
[0133] Start karaoke, enable the AAUDIO thread on the upper layer, select exclusive mode, and transmit audio data.
[0134] When the APP exits abnormally, the automatic monitoring mechanism of the CarService unit actively detects the abnormal exit of the APP and determines whether it is in KTV mode. If so, it sends a CAN signal to shut down KTV and ktv_mode=off to close the underlying path.
[0135] When exiting karaoke, the in-car karaoke APP releases the focus. The CarService unit determines whether to process the KTV mode at this time based on the status returned by the previous AMP unit. If so, it sends a CAN signal to close the KTV mode to the AMP unit. The AMP unit receives the CAN signal to close the KTV mode and exits the KTV path, and sends a feedback signal to CarService.
[0136] When exiting karaoke, the CarService unit determines whether it needs to exit KTV mode. If it sends a CAN signal and sends ktv_mode=off to the HAL layer at the same time, the HAL layer receives ktv_mode=off and closes the channel.
[0137] When exiting karaoke, the in-car karaoke APP turns off the accompaniment sound playback stream.
[0138] Figure 4 A structural block diagram of an electronic device for a control method of an in-vehicle karaoke system provided by one or more embodiments of the present invention.
[0139] like Figure 4 As shown, the present application provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0140] A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of a control method for an in-vehicle karaoke system.
[0141] The present application also provides a computer-readable storage medium, which stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a control method for an in-vehicle karaoke system.
[0142] For simplicity of description, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because certain steps can be performed in other orders or simultaneously according to the embodiments of the present invention. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0143] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A car karaoke system, characterized in that: include: Car Karaoke APP, CarService unit, HAL unit, AudioFramework unit, AAUDIO unit, AudioHal unit, Mcu_service unit, AMP unit, MIC unit and Speaker unit; Car Karaoke APP, used to send a focus request to the CarService unit when the software is turned on; The CarService unit is used to arbitrate and trigger the KTV mode on command, send the matching information to the AMP unit and HAL unit, and monitor the abnormal exit of the car karaoke app and control the KTV mode to close; The HAL unit is used to provide a unified interface for the CarService unit; The AudioFramework unit is used to receive instructions from the CarService unit and control the AAUDIO unit; AAUDIO unit, used to enable AAUDIO thread and transmit audio data in exclusive mode; The AudioHal unit is used to receive the KTV mode start command, establish a loopback path, and transmit the MIC data back to the downstream output. At the same time, it selects the ULL ultra-low latency sound card device and telephone channel; The Mcu_service unit is used to receive the matching information of CarService, control the power amplifier, and transmit the power amplifier feedback signal back to the CarService unit; The AMP unit is used to receive vocal and accompaniment sound signals, mix them, and then output them to the Speaker unit for playback; The MIC unit is used to collect the human voice signal and transmit it to the AudioHal unit and the AMP unit; The Speaker unit is used to play the audio signal after the AMP mixing process.
2. The in-vehicle karaoke system according to claim 1, characterized in that: include: The sound information collected by the MIC unit is transmitted to the AMP unit, which includes: A loopback path is established through the AudioHal unit and transmitted to the AMP unit.
3. The car karaoke system according to claim 1, characterized in that: The accompaniment sound signal is sent by the car karaoke APP, passed through the AudioFramework unit and the AudioHal unit, and transmitted to the AMP unit.
4. The car karaoke system according to claim 1, characterized in that: The CarService unit sends a CAN signal for closing the KTV to interact with the AMP unit. After the AMP unit executes the closing instruction, it sends a feedback signal to the CarService unit.
5. The in-vehicle karaoke system according to claim 1, characterized in that: include: The CarService unit sends a ktv_mode=on instruction to the HAL unit, and the HAL unit selects the ULL sound card device, activates the telephone channel, and generates a voice loopback path by establishing a voice loopback path; Among them, the ktv_mode=on command is used to control the activation of the car karaoke system mode.
6. The in-vehicle karaoke system according to claim 1, characterized in that: include: The CarService unit sends a ktv_mode=off instruction to the HAL unit, and the HAL unit cancels the relevant configuration and releases hardware resources; Among them, the ktv_mode=off command is used to control the shutdown of the car karaoke system mode.
7. The car karaoke system according to claim 1, characterized in that: The CarService unit obtains the running status of the in-car Karaoke APP through the HAL unit.
8. A control method for a car karaoke system, characterized in that: The method comprises: When the karaoke function is turned on, the car karaoke app sends a focus request to the CarService unit; The CarService unit starts the focus policy arbitration mechanism to determine whether to delegate focus usage rights; If yes, then send a CAN signal to the AMP unit to turn on the KTV mode; And send ktv_mode=on command to HAL unit; After receiving the signal, the AMP unit establishes a KTV path and feeds it back to the CarService unit; After receiving the instruction, the HAL unit selects the ULL sound card device, activates the telephone channel, and generates a human voice loopback path; The AudioFramework unit receives instructions from the CarService unit and controls the AAUDIO unit; The AAUDIO unit starts the AAUDIO thread according to the control instructions of the AudioFramework unit and transmits audio data in exclusive mode; The CarService unit obtains the operating status of the in-car Karaoke APP in real time through the HAL unit.
9. An electronic device, characterized in that: include: A processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the control method of the in-vehicle karaoke system according to claim 8.
10. A computer-readable storage medium, characterized in that It stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the control method of the in-vehicle karaoke system as described in claim 8.
Citation Information
Patent Citations
Vehicle-mounted KTV control method and device, and vehicle-mounted intelligent network connection terminal
CN113270082A
Vehicle-mounted karaoke method, system and device and storage medium
CN117392967A