Interface type configuration method, device, terminal equipment and storage medium
By automatically identifying and configuring the interface type of the interface device, the problem of lack of automation of interface type configuration in the prior art is solved, the applicability and flexibility of audio equipment is improved, and differentiated functional design of different Codecs is realized.
Patent Information
- Application Number
- CN202411491398.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-10-24
AI Technical Summary
There is a lack of a technical solution for automatically implementing interface type configuration in the prior art, which leads to the need to manually set audio parameters when using audio interfaces, which lacks flexibility and applicability.
In the initial configuration mode, the host configures the interface types that each interface device can support in the slave based on the configuration file, and writes it to the corresponding register, the slave configures differentiated audio parameters of non-SDCA standard based on the information in the register, and the host configures its own SDCA standard audio parameters. When entering the decision control mode, the slave detects the peripheral device insertion, recognizes its interface type and writes it to the register to complete the differentiated audio parameter configuration.
The interface type of interface device is automatically identified and configured, making slaves that support the SDCA protocol have stronger applicability and flexibility, and the differentiated functional design of different slave codecs can be implemented and applied under the SDCA software and hardware architecture.
Smart Images

Figure CN119166097B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio equipment, and more specifically, to an interface type configuration method, device, terminal equipment and storage medium. Background Art
[0002] SoundWire Device Class for Audio (SDCA) and SoundWire are complementary audio transmission protocol specifications. Before using an audio interface, it is usually necessary to configure the interface type by setting corresponding SDCA standard audio parameters and non-SDCA standard audio parameters. However, the prior art lacks a technical solution for automatically configuring the interface type. Summary of the invention
[0003] The purpose of the present invention is to provide an interface type configuration method, apparatus, terminal device and storage medium, which can automatically identify and configure the interface type of the interface device, so that the slave supporting the SDCA protocol has stronger applicability and flexibility, and the differentiated functional design of different Codecs can be realized and applied under the SDCA hardware and software architecture.
[0004] In order to achieve the above object, the present invention provides the following technical solutions:
[0005] A method for configuring an interface type, comprising:
[0006] In the initial configuration mode, the host configures the interface types supported by each interface device in the slave based on the configuration file and writes them into the registers corresponding to each interface device.
[0007] The slave configures the non-SDCA standard differentiated audio parameters of the corresponding interface device based on the information in each register, and the host configures its own SDCA standard audio parameters based on the interface type supported by each interface device in the slave;
[0008] Entering the decision control mode, in which when the slave detects that there is currently a target peripheral device plugged into its own target interface device, it identifies the interface type of the target peripheral device and writes it into the register of the target peripheral device;
[0009] The slave configures the target interface device's non-SDCA standard differentiated audio parameters based on the interface type of the target peripheral device, and the host reads the register of the target interface device and configures its own SDCA standard audio parameters based on the read interface type.
[0010] Preferably, before the host configures the interface type supported by each interface device in the slave based on the configuration file, the process further includes:
[0011] The slave sends a communication connection establishment request to the master;
[0012] The host responds to the communication connection establishment request and determines whether the slave is a legitimate slave. If so, a communication connection is established with the slave and the initial configuration mode is entered. Otherwise, communication with the slave is refused.
[0013] Preferably, the host configures the interface types supported by each interface device in the slave based on the configuration file, and writes them into the registers corresponding to each interface device, including:
[0014] The host reads the configuration file stored in itself, and configures the interface type supported by each interface device in the slave based on the read configuration file;
[0015] The host writes the interface types supported by each interface device in the configured slave into the specified addresses in the registers corresponding to each interface device;
[0016] Accordingly, before the slave configures the target interface device based on the interface type of the target peripheral device, the following further includes:
[0017] The slave determines whether there is information about the interface type at the specified address in any register. If so, it configures the differentiated audio parameters of the corresponding interface device that are not in the SDCA standard based on the information at the specified address in any register. Otherwise, it determines that the initial configuration of the interface device corresponding to any register cannot be completed.
[0018] Preferably, the host configures the interface types supported by each interface device in the slave based on the read configuration file, including:
[0019] The host configures the interface type category of each interface device in the slave based on the read configuration file. One interface type category includes all interface types that a single interface device can support.
[0020] Preferably, after the slave identifies the interface type of the target peripheral device and writes it into the register of the target peripheral device, the method further includes:
[0021] The slave reports an interrupt to the audio bus;
[0022] Accordingly, the host reads the registers of the target interface device, including:
[0023] The host responds to the interrupt on the audio bus and reads the registers of the target interface device.
[0024] Preferably, the interface device includes a Codec chip, a control module and virtual interfaces of multiple interface types. The control module is used to control the virtual interface of the corresponding interface type to communicate with the Codec chip after determining the interface type of the interface device, so that the interface device implements the interface function of the corresponding interface type.
[0025] Preferably, the control module is also used to control whether the interface device is muted for playback, the volume gain during playback, and the sampling frequency of the playback sound, or to control whether the interface device is muted for recording, the volume gain during recording, and the sampling frequency of the recording sound.
[0026] An interface type configuration system includes a host and a slave; wherein:
[0027] In the initial configuration mode, the host configures the interface types supported by each interface device in the slave based on the configuration file and writes them into the registers corresponding to each interface device.
[0028] The slave configures the non-SDCA standard differentiated audio parameters of the corresponding interface device based on the information in each register, and the host configures its own SDCA standard audio parameters based on the interface type supported by each interface device in the slave;
[0029] Entering the decision control mode, in which when the slave detects that there is currently a target peripheral device plugged into its own target interface device, it identifies the interface type of the target peripheral device and writes it into the register of the target peripheral device;
[0030] The slave configures the target interface device's non-SDCA standard differentiated audio parameters based on the interface type of the target peripheral device, and the host reads the register of the target interface device and configures its own SDCA standard audio parameters based on the read interface type.
[0031] A terminal device includes a memory and a processor. When a program stored in the memory is executed by the processor, the steps of the above-mentioned interface type configuration method can be implemented.
[0032] A storage medium, wherein when a program stored in the storage medium is executed by a processor, the steps of the above-mentioned interface type configuration method are implemented.
[0033] In the initial configuration mode of the present invention, the host configures the interface type supported by each interface device in the slave based on the configuration file and writes it into the corresponding register. The slave completes the configuration of the differentiated audio parameters of the non-SDCA standard based on the information in the register. The host completes the configuration of its own SDCA standard audio parameters and enters the decision control mode. In the decision control mode, when the slave detects that a new peripheral device is inserted, it identifies the interface type of the peripheral device and writes it into the corresponding register of the interface device into which the peripheral device is inserted. The slave completes the configuration of the differentiated audio parameters of the non-SDCA standard. After the host reads the corresponding register, it completes the configuration of its own SDCA standard audio parameters based on the read interface type. It can be seen that the present invention can automatically identify and configure the interface type of the interface device, so that the slave supporting the SDCA protocol has stronger applicability and flexibility, and enables the differentiated functional design of different slave Codecs to be realized and applied under the SDCA hardware and software architecture. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A flowchart of an interface type configuration method provided by an embodiment of the present invention;
[0036] Figure 2 A circuit diagram of SDCA RJ in an interface type configuration method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] See also Figure 1 , which shows a flow chart of an interface type configuration method provided by an embodiment of the present invention, which may specifically include:
[0039] S11: In the initial configuration mode, the host configures the interface types supported by each interface device in the slave based on the configuration file, and writes them into the registers corresponding to each interface device.
[0040] The interface device in the embodiment of the present invention is a Jack device (a Jack interface is provided on the Jack device, and plugging the Jack device is also plugging into the interface on it), the interface is an audio interface / audio jack (audio Jack, such as a headphone jack, etc.), and the interface types (Jack types) include headset, headphone, mic in, line in, and line out for 5.1 or 7.1 channels, etc.
[0041] Among them, Mic input represents microphone input, Headset Mic input represents headset microphone input, Headphone output represents headphone output, Headset output represents headset output, Line in represents line input, and Line out represents line output.
[0042] It should be noted that there may be multiple SoundWire links in the SDCA system, with multiple slaves connected to each link and a host connected to the other side. In each slave, there are one or more interface devices. An interface device includes a bus interface (SoundWire [MIPI]) and 1-8 SDCA functions. Most of these functions are independent of each other, although they need to cooperate with each other in the use of shared resources (for example, device power, bus clock, device-level reset, special data port for SoundWire BRA). The SDCA Version 1.0 protocol specifies two types of audio jack devices (audio jack devices are interface devices):
[0043] Universal Audio Jack (UAJ), 1 TRRS (plus an optional second TRS) 3.5mm jack input / output device for headphones and other pluggable accessories;
[0044] Retaskable Jack Codec (RJ) for input / output functionality of a set of 1 to 6 TRS 3.5 mm jacks for a variety of pluggable accessories, including headphone, microphone input and line input, etc., with the option to reassign line out / audio out for 5.1 or 7.1 channels.
[0045] These two audio jack device types may be used as interface types such as headset, headphone, mic in, line in, and line out for 5.1 or 7.1 channels.
[0046] In addition, there is a one-to-one correspondence between the interface devices and registers in the slave. Interface type configuration can be implemented in two modes. The first mode is the initial configuration mode (Selected_Mode in Group Entity, which can be referred to as Selected_Mode for short). In this mode, the host can read and write registers in the slave, and based on this, the host completes the configuration of the interface types supported by each interface device in the slave; the second mode is the judgment control mode (Detected_Modein Groupe Entity, which can be referred to as Detected_Mode for short). In this mode, the host can only read registers in the slave, and when the slave detects that a peripheral device is inserted into a certain interface device, the interface device is configured to the interface type corresponding to the inserted peripheral device. Usually, after completing the initial configuration of the interface type in the first mode, the second mode is entered to realize the automatic configuration of the interface type in different situations.
[0047] In the initial configuration mode, a configuration file (disco file) can be stored in the host. Based on the configuration information of the interface type in the configuration file, the host learns which interface types are supported by each interface device in the slave, and then writes the configuration of the interface type that each interface device can support (the corresponding information is function information) into the register of the corresponding interface device.
[0048] S12: The slave configures the non-SDCA standard differentiated audio parameters of the corresponding interface device based on the information in each register, and the host configures its own SDCA standard audio parameters based on the interface type supported by each interface device in the slave.
[0049] The slave can read the information in the register of each interface device separately (i.e. function information), and then the slave hardware automatically completes the configuration of the Codec differentiation parameters specified by the non-DISCO and SDCA protocols (i.e. differentiated audio parameters of non-SDCA standards, such as Codec PLL, Codec DSP and SoundWire Data Port, etc.) according to the information in the register of each interface device. The host configures its own SDCA standard audio parameters (i.e. various audio parameters specified in the traditional SDCA protocol) based on the interface types supported by each interface device.
[0050] S13: Entering the decision control mode, in which the slave detects that there is a target peripheral device plugged into its own target interface device, identifies the interface type of the target peripheral device and writes it into the register of the target peripheral device.
[0051] S14: The slave configures the target interface device's non-SDCA standard differentiated audio parameters based on the interface type of the target peripheral device, and the host reads the register of the target interface device and configures its own SDCA standard audio parameters based on the read interface type.
[0052] In the decision control mode, the registers in the slave are read-only for the host. Specifically, the master and slave can enter the decision control mode after completing the initialization configuration of the interface type through steps S11 and S12; in the decision control mode, if the slave detects that a peripheral device (target peripheral device) is inserted into a certain interface device (target interface device), it can determine the interface type of the inserted peripheral device according to the custom algorithm, and then the slave hardware automatically configures the Codec in the corresponding register to the interface type of the inserted peripheral device (that is, write the interface type of the inserted peripheral device into the corresponding register), and automatically completes the configuration of the Codec differentiation parameters specified by the non-disco and SDCA protocols (that is, the differential audio parameters of the non-SDCA standard, such as Codec PLL, Codec DSP and SoundWire Data Port, etc.), and finally the host reads the corresponding register in the slave to obtain the interface type of the inserted peripheral device, and can configure its own SDCA standard audio parameters independently or through software, so that the host completes the automatic detection and configuration of the slave Jack device insertion type.
[0053] In the initial configuration mode of the present invention, the host configures the interface type supported by each interface device in the slave based on the configuration file and writes it into the corresponding register. The slave completes the configuration of the differentiated audio parameters of the non-SDCA standard based on the information in the register. The host completes the configuration of its own SDCA standard audio parameters and enters the decision control mode. In the decision control mode, when the slave detects that a new peripheral device is inserted, it identifies the interface type of the peripheral device and writes it into the corresponding register of the interface device into which the peripheral device is inserted. The slave completes the configuration of the differentiated audio parameters of the non-SDCA standard. After the host reads the corresponding register, it completes the configuration of its own SDCA standard audio parameters based on the read interface type. It can be seen that the present invention can automatically identify and configure the interface type of the interface device, so that the slave supporting the SDCA protocol has stronger applicability and flexibility, and enables the differentiated functional design of different slave Codecs to be realized and applied under the SDCA hardware and software architecture.
[0054] An interface type configuration method provided by an embodiment of the present invention may further include: before the host configures the interface type supported by each interface device in the slave based on the configuration file:
[0055] The slave sends a communication connection establishment request to the master;
[0056] The host responds to the communication connection establishment request and determines whether the slave is a legitimate slave. If so, a communication connection is established with the slave and the initial configuration mode is entered. Otherwise, communication with the slave is refused.
[0057] The slave and the host must complete enumeration before implementing the interface type configuration. The enumeration process is the process of establishing a communication connection between the master and the slave. Specifically, the slave can send a request to establish a communication connection (i.e., a communication connection establishment request) to the host. The host responds to the communication connection establishment request and determines whether the slave is a legitimate slave. If so, a communication connection is established with the slave to complete the enumeration. Otherwise, communication with the slave is refused. Among them, the legitimate slave can be a slave that is preset according to actual needs and trusted by the host.
[0058] An interface type configuration method provided by an embodiment of the present invention, in which a host configures the interface type supported by each interface device in a slave based on a configuration file and writes the configuration file into registers corresponding to each interface device, may include:
[0059] The host reads the configuration file stored in itself, and configures the interface type supported by each interface device in the slave based on the read configuration file;
[0060] The host writes the interface types supported by each interface device in the configured slave into the specified addresses in the registers corresponding to each interface device;
[0061] Accordingly, before the slave configures the target interface device based on the interface type of the target peripheral device and the differentiated audio parameters of the non-SDCA standard, the following may also be included:
[0062] The slave determines whether there is information about the interface type at the specified address in any register. If so, it configures the differentiated audio parameters of the corresponding interface device that are not in the SDCA standard based on the information at the specified address in any register. Otherwise, it determines that the initial configuration of the interface device corresponding to any register cannot be completed.
[0063] The function control address of the SDCA protocol consists of SCP_AddrPage1, SCP_AddrPage2 and the 16-bit address in the actual SoundWire read and write commands. When the host uses the SoundWire read and write commands to access the slave, the first 3 bits of the 26-bit SDCA frame structure come from a page register PCP AddrPage1, the next 8 bits come from the second page register PCPAddrPage2, and the last 15 bits come from 0 to 14 bits of the RegAddr field in the command. The SDCA address bits are split into SCP_AddrPage1, SCP_AddrPage2 and RegAddr mechanisms, so that when accessing the corresponding device, the fields with higher frequency of changes are all in the lower 15 bits, so that the frequency of changes to SCP_AddrPage1 and SCP_AddrPage2 is low during SDCA function configuration.
[0064] In the initial configuration mode, the host can write the configured interface type to the specified address of the corresponding register (SCP_AddrPage1 and SCP_AddrPage2). The slave reads the function information in the specified address of each register to see if there is any function information. If so, the slave hardware automatically completes the Codec differentiation parameter configuration of the interface device corresponding to any register according to the function information, which is not specified by the DISCO and SDCA protocols. Otherwise, it is determined that the parameter configuration of the interface device corresponding to any register cannot be implemented.
[0065] An interface type configuration method provided by an embodiment of the present invention, in which a host configures the interface type supported by each interface device in a slave based on a read configuration file, may include:
[0066] The host configures the interface type category of each interface device in the slave based on the read configuration file. One interface type category includes all interface types that a single interface device can support.
[0067] It should be noted that the interface type can include three categories, namely microphone, headphone and line transmission. In the initial configuration mode, the interface type category of each interface device can be configured. In the decision control mode, the specific interface type can be configured for the inserted peripheral device, thereby realizing automatic configuration of interface types at different stages.
[0068] An interface type configuration method provided by an embodiment of the present invention may further include: after the slave identifies the interface type of the target peripheral device and writes it into the register of the target peripheral device:
[0069] The slave reports an interrupt to the audio bus;
[0070] Accordingly, the host reads the registers of the target interface device, including:
[0071] The host responds to the interrupt on the audio bus and reads the registers of the target interface device.
[0072] After the slave recognizes the interface type of the inserted peripheral device, it can report an interrupt to the SoundWire bus (audio bus). After the host recognizes the type of interrupt on the SoundWire bus, it reads the slave device register to obtain the corresponding interface type, and then implements subsequent parameter configuration operations, thereby achieving reliable communication between the master and slave through interrupts.
[0073] An embodiment of the present invention provides an interface type configuration method, wherein an interface device includes a Codec chip, a control module, and virtual interfaces of multiple interface types. The control module is used to control the virtual interface of the corresponding interface type to be connected to the Codec chip after determining the interface type of the interface device, so that the interface device can implement the interface function of the corresponding interface type.
[0074] The control module is also used to control whether the interface device is muted during playback, the volume gain during playback, and the sampling frequency of the playback sound, or to control whether the interface device is muted during recording, the volume gain during recording, and the sampling frequency of the recording sound.
[0075] In the embodiment of the present invention, the interface device may include a Codec chip, a control module, and virtual interfaces of multiple interface types, and the virtual interfaces correspond to the interface types one by one; after determining the interface type of the inserted peripheral device, the control module may control the virtual interface corresponding to the interface type to be connected to the Codec chip to realize the corresponding interface function. In addition, the control module may also control whether the interface device is muted during playback, the volume gain during playback, and the sampling frequency of the playback sound, or control whether the interface device is muted during recording, the volume gain during recording, and the sampling frequency of the recording sound, thereby realizing further control of the interface function to meet current needs.
[0076] It should be noted that in the present invention, the master and slave first complete the enumeration process through the SoundWire bus protocol; under Selected_Mode, the host writes SCP_AddrPage1, SCP_AddrPage2 and RegAddr in sequence for different SDCA functions of the slave according to the disco file description, and completes the configuration of the slave SDCA RJ function, SDCA HID (Human Interface Device) function and corresponding playback and recording parameters. In the embodiment of the present invention, after the host configures SDCA RJ, the slave device hardware automatically completes the Codec differentiation parameter configuration (Codec PLL, Codec DSP and SoundWire Data Port, etc.) specified by the non-disco and SDCA protocols according to the function information.
[0077] like Figure 2 It is a partial circuit diagram of the interface device, where IT (Input Terminal) represents the input data port, OT (Input Terminal) represents the output data port, CS (Clock Source) represents the clock source, FU (FeatureUnit) represents the function unit, SU (Selector Unit) represents the selector unit, MU (Mixer Unit) represents the mixer unit, and GE (Group Entity) represents the register.
[0078] Specifically, in the embodiment of the present invention, IT 0x02 is a SoundWire playback port, which is connected to the DAC path of the Codec chip; FU 0x03 unit can control whether the DAC is muted (mute playback) and the Gain of the DAC (volume gain during playback); CS 0x01 unit can control the sound sampling frequency of the DAC; IT 0x10 is a Headset Mic 3.5mm Jack interface, and FU0x11 unit can control whether IT 0x10 is muted and the corresponding Gain; IT 0x17 is a Line in 3.5mm Jack interface, and FU0x19 unit can control whether IT 0x17 is muted and the corresponding Gain; IT 0x18 is a Mic input 3.5mm Jack interface, and FU 0x1a unit can control whether IT 0x18 is muted and the corresponding Gain.
[0079] In the embodiment of the present invention, OT 0x15 is a SoundWire recording port, which is connected to the ADC path of the Codec chip; FU (Feature Unit) 0x14 unit can control whether ADC is mute (recording mute) and ADC Gain (volume gain during recording); CS (Clock Entity) 0x16 unit can control the sound sampling frequency of ADC; OT (Output Terminal) 0x08 is a Headphone Output 3.5mm Jack interface; OT 0x09 is a Headset Output 3.5mm Jack interface; OT 0x0A is a Line Out 3.5mm Jack interface.
[0080] Select Control (SU) is a channel selection, which indicates whether to open or close the internal data channel link of the Codec chip. In the embodiment of the present invention, SU 0x12 indicates that the playback is selected from IT 0x10, IT 0x17 or IT 0x18; SU0x05, SU0x06 and SU0x07 respectively indicate that the recording is selected from OT 0x10, OT 0x17 or OT 0x18. Among them, SU, FU and MU are all control modules, and IT and OT are all virtual interfaces.
[0081] GE is a quick Jack configuration mechanism that allows the host software to make one-click changes to the audio function through a single control Selected_Mode (in GE). When the software writes a new Mode value to Selected_Mode (in GE), multiple controls in multiple entities in the audio function can be updated simultaneously through GE. In the embodiment of the present invention, the Codec chip can be configured to match the function of the corresponding interface type through a GE configuration. In Detected_Mode (in GE) mode (i.e., judgment control mode), GE is read-only to the host. After the slave completes the interface type identification through a custom algorithm, it reports an interrupt to the SoundWire bus. The host then reads the slave GE to know the specific interface type of the slave.
[0082] Table 1
[0083]
[0084] Table 2
[0085]
[0086] The above-mentioned Table 1 is the SDCA address mapping table of the SDCA RJ in the embodiment of the present invention, and Table 2 is the detailed function table of the SDCA SU and GE units of the SDCA RJ in the embodiment of the present invention. In Tables 1 and 2, entity type represents Entity Type, GE represents register, IT and OT represent input data port and output data port respectively, SU represents selector unit, CS represents clock source, MU represents mixer unit, FU represents functional unit, selection controller represents Control Selector, selection mode control represents SELECTED_MODE_CONTROL, N / A represents that there is no matching information, mute represents mute, and Gain represents volume gain; functional components, entity components and control components are three-column header information, and the data under the three-column header is the specific value of the corresponding information; the control channel number number represents Control Number, and the data under the column header is the specific number value; the data under the access mode corresponding column header is the specific mode information; the first and second columns represent the dual-group register control switching mechanism, and the maximum logic block column is the specific information whether the maximum logic block exists. Specifically, when GE is in Undefined mode, SU 0x05 is 0, SU 0x06 is 0, SU 0x07 is 0, and SU 0x12 is 0; when GE is in Headphone mode, SU 0x05 is 1, SU 0x06 is 0, SU 0x07 is 0, and SU 0x12 is 1; when GE is in Headset mode, SU 0x05 is 0, SU 0x06 is 1, SU 0x07 is 0, and SU 0x12 is 1; when GE is in Line out mode, SU0x05 is 0, SU 0x06 is 0, SU 0x07 is 1, and SU 0x12 is 0; when GE is in Mic in mode, SU 0x05 is 0, SU0x06 is 0, SU 0x07 is 0, and SU 0x12 is 3; when GE is in Line in mode, SU 0x05 is 0, SU 0x06 is 0, SU 0x07 is 0, and SU 0x12 is 3. 0x06 is 0, SU0x07 is 0, SU 0x12 is 2.
[0087] The embodiment of the present invention further provides an interface type configuration system, which may include a host and a slave; the specific working process thereof may include:
[0088] In the initial configuration mode, the host configures the interface types supported by each interface device in the slave based on the configuration file and writes them into the registers corresponding to each interface device.
[0089] The slave configures the non-SDCA standard differentiated audio parameters of the corresponding interface device based on the information in each register, and the host configures its own SDCA standard audio parameters based on the interface type supported by each interface device in the slave;
[0090] Entering the decision control mode, in which when the slave detects that there is currently a target peripheral device plugged into its own target interface device, it identifies the interface type of the target peripheral device and writes it into the register of the target peripheral device;
[0091] The slave configures the target interface device's non-SDCA standard differentiated audio parameters based on the interface type of the target peripheral device, and the host reads the register of the target interface device and configures its own SDCA standard audio parameters based on the read interface type. An embodiment of the present invention also provides an interface type configuration device, the device includes a memory and a processor, and the program stored in the memory can implement the steps of the above interface type configuration method when executed by the processor.
[0092] An embodiment of the present invention further provides a terminal device, including a memory and a processor, wherein a program stored in the memory can implement the steps of the above-mentioned interface type configuration method when executed by the processor.
[0093] An embodiment of the present invention further provides a storage medium, and when a program stored in the storage medium is executed by a processor, the steps of the above-mentioned interface type configuration method are implemented.
[0094] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for configuring an interface type, characterized in that: include: In the initial configuration mode, the host configures the interface types supported by each interface device in the slave based on the configuration file and writes them into the registers corresponding to each interface device. The slave configures the non-SDCA standard differentiated audio parameters of the corresponding interface device based on the information in each register, and the host configures its own SDCA standard audio parameters based on the interface type supported by each interface device in the slave; Entering a decision control mode, in which when the slave detects that a target peripheral device is currently inserted into its own target interface device, the slave identifies the interface type of the target peripheral device and writes it into a register of the target interface device; The slave configures the target interface device's non-SDCA standard differentiated audio parameters based on the interface type of the target peripheral device, and the host reads the register of the target interface device and configures its own SDCA standard audio parameters based on the read interface type; The host configures the interface type supported by each interface device in the slave based on the read configuration file, including: The host configures the interface type category of each interface device in the slave based on the read configuration file, and one interface type category includes all interface types that a single interface device can support.
2. The method according to claim 1, characterized in that Before the host configures the interface types supported by each interface device in the slave based on the configuration file, it also includes: The slave sends a communication connection establishment request to the host; The host responds to the communication connection establishment request and determines whether the slave is a legitimate slave. If so, a communication connection is established with the slave and the initial configuration mode is entered. Otherwise, communication with the slave is refused.
3. The method according to claim 2, characterized in that The host configures the interface types supported by each interface device in the slave based on the configuration file and writes them into the registers corresponding to each interface device, including: The host reads the configuration file stored in the host, and configures the interface type supported by each interface device in the slave based on the read configuration file; The host writes the interface types supported by each interface device in the configured slave into the designated addresses in the registers corresponding to each interface device; Accordingly, before the slave configures the non-SDCA standard differentiated audio parameters of the target interface device based on the interface type of the target peripheral device, the slave further includes: The slave determines whether there is information of interface type at the specified address in any register. If so, it configures the differentiated audio parameters of the corresponding interface device according to the non-SDCA standard based on the information of the specified address in any register. Otherwise, it determines that the initial configuration of the interface device corresponding to any register cannot be completed.
4. The method according to claim 3, characterized in that After the slave identifies the interface type of the target peripheral device and writes it into the register of the target peripheral device, the slave also includes: The slave reports an interrupt to the audio bus; Accordingly, the host reads the register of the target interface device, including: The host responds to an interrupt on the audio bus and reads a register of the target interface device.
5. The method according to claim 4, characterized in that The interface device includes a Codec chip, a control module, and virtual interfaces of multiple interface types. The control module is used to control the virtual interface of the corresponding interface type to be connected to the Codec chip after determining the interface type of the interface device, so that the interface device can realize the interface function of the corresponding interface type.
6. The method according to claim 5, characterized in that The control module is also used to control whether the interface device is muted for playback, the volume gain during playback, and the sampling frequency of the playback sound, or to control whether the interface device is muted for recording, the volume gain during recording, and the sampling frequency of the recording sound.
7. An interface type configuration system, characterized in that: It includes a master and a slave; among which: In the initial configuration mode, the host configures the interface types supported by each interface device in the slave based on the configuration file and writes them into the registers corresponding to each interface device. The slave configures the non-SDCA standard differentiated audio parameters of the corresponding interface device based on the information in each register, and the host configures its own SDCA standard audio parameters based on the interface type supported by each interface device in the slave; enters the decision control mode, and in the decision control mode, when the slave detects that there is currently a target peripheral device inserted into its own target interface device, identifies the interface type of the target peripheral device and writes it into the register of the target interface device; The slave configures the target interface device's non-SDCA standard differentiated audio parameters based on the interface type of the target peripheral device, and the host reads the register of the target interface device and configures its own SDCA standard audio parameters based on the read interface type; The host configures the interface type supportable by each interface device in the slave based on the read configuration file, including: the host configures the interface type category of each interface device in the slave based on the read configuration file, and one interface type category includes all interface types supportable by a single interface device.
8. A terminal device, characterized in that: The system comprises a memory and a processor, wherein the program stored in the memory can implement the steps of the interface type configuration method according to any one of claims 1 to 6 when executed by the processor.
9. A storage medium, characterized in that: When the program stored on the storage medium is executed by the processor, the steps of the interface type configuration method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for recognition and arbitration of an input connection
US20150304769A1
Unifying multiple audio bus interfaces in an audio system
US20240296009A1