CN111124353A - Control method and electronic equipment - Google Patents

Control method and electronic equipment Download PDF

Info

Publication number
CN111124353A
CN111124353A CN201911360985.8A CN201911360985A CN111124353A CN 111124353 A CN111124353 A CN 111124353A CN 201911360985 A CN201911360985 A CN 201911360985A CN 111124353 A CN111124353 A CN 111124353A
Authority
CN
China
Prior art keywords
audio output
audio
equipment
indication information
electronic equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911360985.8A
Other languages
Chinese (zh)
Other versions
CN111124353B (en
Inventor
吴彦永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201911360985.8A priority Critical patent/CN111124353B/en
Publication of CN111124353A publication Critical patent/CN111124353A/en
Application granted granted Critical
Publication of CN111124353B publication Critical patent/CN111124353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The application relates to a control method and electronic equipment, under the condition that the electronic equipment is externally connected with display equipment, the audio output modes of the electronic equipment and the externally connected display equipment are determined by combining the actual conditions of audio output devices respectively arranged on the electronic equipment and the externally connected display equipment, and when the audio output control is carried out on the electronic equipment and the externally connected display equipment based on the determined audio output modes, a first audio output function is provided for the electronic equipment and a second audio output function is provided for the externally connected display equipment at the same time, so that the application realizes that the audio output functions are respectively provided for the local machine and the externally connected display equipment under the double/multi-screen display state, and breaks through the limitation that only one of the local machine and the externally connected display equipment can provide the audio output function under the double/multi-screen display state in the traditional technology, the multi-purpose device is multifunctional from the aspect of audio output, and the functions of the device in a double/multi-screen display state are enriched.

Description

Control method and electronic equipment
Technical Field
The present application relates to the field of input and output control of electronic devices, and in particular, to a control method and an electronic device.
Background
The electronic equipment (such as a notebook computer and a desktop computer) can realize dual/multi-screen display through the external display equipment so as to enrich the display function of the electronic equipment.
At present, in a dual/multi-screen display state implemented by an electronic device through an external display device, an audio output (play) function can be provided only for one of the local electronic device or the external display device, and audio output functions cannot be provided for the local electronic device and the external display device respectively, so that limitations in audio output exist, and inconvenience is brought to a user to use the electronic device in the state.
Disclosure of Invention
In view of the above, the present application provides a control method and an electronic device, so as to overcome the above limitation of the current electronic device in the dual/multi-screen display state, and achieve that the local device and the external display device are respectively provided with audio output functions in the state.
Therefore, the application discloses the following technical scheme:
a control method is applied to an electronic device with an audio output device; the method comprises the following steps:
detecting whether the electronic equipment is externally connected with display equipment or not;
if so, acquiring first indication information and second indication information; the first indication information can indicate an audio output device provided by the electronic equipment, and the second indication information can indicate an audio output device provided by the display equipment;
determining an audio output mode based on the first indication information and the second indication information;
and controlling the audio output of the electronic equipment and the display equipment based on the audio output mode, so that a first audio output function is provided for the electronic equipment and a second audio output function is provided for the display equipment at the same time based on at least an audio output device of the electronic equipment.
Preferably, the method for detecting whether the electronic device is externally connected with a display device includes:
detecting whether a preset pin of a first audio codec of the electronic equipment receives a preset signal;
the preset pin is connected with at least one multimedia interface of the electronic equipment, and the multimedia interface can be used for being externally connected with display equipment.
Preferably, the acquiring the first indication information and the second indication information includes:
acquiring first detection information of a built-in audio output device and/or an audio interface of the electronic equipment as the first indication information; the audio interface is used for externally connecting an audio output device;
acquiring at least one of the following information as the second indication information:
the electronic equipment is externally connected with an interface type of a multimedia interface of the display equipment;
the equipment model of the externally connected display equipment;
second detection information for a built-in audio output device and/or an audio interface of the display apparatus.
Preferably, the determining an audio output mode based on the first indication information and the second indication information includes:
if the second indication information indicates that the display equipment does not have an audio output device, determining that the audio output mode is a first output mode;
and if the second indication information indicates that the display equipment is provided with an audio output device, determining that the audio output mode is a second output mode.
Preferably, the method for controlling audio output of the electronic device and the display device based on the audio output mode includes:
under the first output mode, different output devices in a built-in audio output device and an external audio output device of the electronic equipment are utilized to respectively perform audio output on the audio required to be output by the electronic equipment and the display equipment;
and in the second output mode, the audio output device of the electronic equipment is used for carrying out audio output on the audio required to be output by the electronic equipment, and the audio output device of the display equipment is used for carrying out audio output on the audio required to be output by the display equipment.
Preferably, the method, wherein the audio output device of the display device is used to output the audio to be output by the display device, and the method includes:
and transmitting the audio to be output by the display equipment to a second audio codec of the display equipment through a corresponding multimedia interface on the electronic equipment, so that the second audio codec decodes the received audio, and transmits the decoded audio to an audio output device of the display equipment for output.
An electronic device, comprising:
the audio output device is used for carrying out audio output on the electronic equipment;
a memory for storing at least one set of instructions;
a processor for calling and executing the set of instructions in the memory, by executing the set of instructions:
detecting whether the electronic equipment is externally connected with display equipment or not;
if so, acquiring first indication information and second indication information; the first indication information can indicate an audio output device provided by the electronic equipment, and the second indication information can indicate an audio output device provided by the display equipment;
determining an audio output mode based on the first indication information and the second indication information;
and controlling the audio output of the electronic equipment and the display equipment based on the audio output mode, so that a first audio output function is provided for the electronic equipment and a second audio output function is provided for the display equipment at the same time based on at least an audio output device of the electronic equipment.
Preferably, the electronic device further includes a first audio codec and a multimedia interface;
when detecting whether the electronic device is externally connected with the display device, the processor is specifically configured to:
detecting whether a preset pin of a first audio codec of the electronic equipment receives a preset signal;
the preset pin is connected with at least one multimedia interface of the electronic equipment, and the multimedia interface can be used for being externally connected with display equipment.
Preferably, the electronic device further includes a built-in audio output device and/or an audio interface;
when the processor acquires the first indication information and the second indication information, the processor is specifically configured to:
acquiring first detection information of a built-in audio output device and/or an audio interface of the electronic equipment as the first indication information; the audio interface is used for externally connecting an audio output device;
acquiring at least one of the following information as the second indication information:
the electronic equipment is externally connected with an interface type of a multimedia interface of the display equipment;
the equipment model of the externally connected display equipment;
second detection information for a built-in audio output device and/or an audio interface of the display apparatus.
Preferably, when the processor determines the audio output mode based on the first indication information and the second indication information, the processor is specifically configured to:
if the second indication information indicates that the display equipment does not have an audio output device, determining that the audio output mode is a first output mode;
if the second indication information indicates that the display equipment is provided with an audio output device, determining that the audio output mode is a second output mode;
the processor, when controlling the audio output of the electronic device and the display device based on the audio output mode, is specifically configured to:
under the first output mode, different output devices in a built-in audio output device and an external audio output device of the electronic equipment are utilized to respectively perform audio output on the audio required to be output by the electronic equipment and the display equipment;
and in the second output mode, the audio output device of the electronic equipment is used for carrying out audio output on the audio required to be output by the electronic equipment, and the audio output device of the display equipment is used for carrying out audio output on the audio required to be output by the display equipment.
Through the above technical solutions, it can be known that, in the case that the electronic device is externally connected with the display device, the control method and the electronic device provided by the present application determine the audio output modes for the electronic device and the externally connected display device in combination with the actual situations of the audio output devices of the electronic device and the externally connected display device, and when performing audio output control on the electronic device and the externally connected display device based on the determined audio output modes, provide the electronic device with the first audio output function and simultaneously provide the externally connected display device with the second audio output function based on at least the audio output device of the electronic device, so that the present application realizes that the audio output functions are respectively provided for the local device and the externally connected display device in the dual/multi-screen display state, and breaks through the limitation that only one of the local device and the externally connected display device can be provided with the audio output function in the dual/multi-screen display state in the conventional technology, the multi-purpose device is multifunctional from the aspect of audio output, and the functions of the device in a double/multi-screen display state are enriched.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of an electronic device with a display device attached to it for use in a dual-screen mode;
fig. 2 is a schematic diagram illustrating an audio output configuration when an electronic device is applied to a dual/multi-screen mode in a conventional technology provided by an embodiment of the present application;
FIG. 3 is a schematic flow chart of a control method provided by an embodiment of the present application;
FIG. 4 is a schematic flow chart of another control method provided in the embodiments of the present application;
fig. 5 is a schematic pin design diagram for performing hardware information detection and audio output control on a sound card chip of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic processing logic diagram illustrating that the method of the present application simultaneously provides an audio output function for an electronic device and an external display device according to an embodiment of the present application;
FIG. 7 is an audio stack relationship diagram provided by an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 9 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the conventional art, as shown in fig. 1, when an electronic device 101 is applied to a dual/multi-screen display state through an external display device 102, can only provide audio output (playing) function for one of the local or external display device of the electronic device, and can not provide audio output function for both the local and external display devices, more specifically, referring to fig. 2, the audio output configuration interface of the electronic device may be called up through a horn icon in a desktop taskbar (e.g. lower right corner) of the electronic device 101, in the interface, the default configuration is to provide an audio output function for the external display device, and the electronic device cannot output audio for the local device, and if the user has different requirements, the audio output function of the device can be switched to the local device only by selecting the 'forbidden' option in the configuration interface of fig. 2, and meanwhile, the external display device cannot output audio.
The above limitation of the conventional technology in the dual/multi-screen display state brings inconvenience to the user using the electronic device, and a typical scenario is that the user plays a game by using the local display screen and plays a movie by using an external screen (it may be that one user plays the game and watches the movie at the same time, or that one or some users of two or more users play the game and another/some users watch the movie), and in the conventional technology, the audio playing can be performed only for the video frame of one screen, so that the limitation is brought to the device application in the dual/multi-screen display state, and the one-machine multi-use in the true sense cannot be realized.
Therefore, the present application provides a control method and an electronic device, which aims to overcome the above problems of the conventional technology, so as to provide an audio output function for both a device local machine and an external display device of the electronic device in a dual/multi-screen display state, thereby realizing one machine with multiple functions in the true sense.
In an alternative embodiment of the present application, a control method is disclosed, which can be applied to an electronic device with an audio output device, such as but not limited to a portable computer (e.g., a mobile phone, a tablet, a notebook, etc.), a desktop computer, a midrange computer, etc. in a general/special purpose computing or configuration environment. The audio output device of the electronic device may generally include an internal audio output device (e.g., an internal speaker) of the device, and/or an audio interface for accessing an external audio output device (e.g., an earphone, a sound box), where the audio interface may be, but is not limited to, an audio interface based on wired/wireless technologies such as USB (universal serial Bus) or bluetooth.
Referring to fig. 3, in the present embodiment, the control method may include:
step 301, detecting whether the electronic device is externally connected with a display device.
The electronic equipment such as a notebook computer, a desktop computer and the like can realize double/multi-screen display by externally connecting display equipment, when a user has a demand of one machine with multiple functions and needs to extend one or more external display devices for the electronic equipment, one or more required display devices may be accessed at a corresponding Multimedia Interface of the electronic device, e.g., one or more interfaces such as VGA (Video Graphics Array), DP (display Interface) and/or HDMI (High Definition Multimedia Interface), therefore, information can be displayed on the display screen of the electronic equipment and the screens of one or more external display devices simultaneously, and it is easy to understand that the double/multi-screen display functions provided by the display screens of the electronic equipment and the external display devices are supported by the host of the electronic equipment and share the data processing function provided by the host of the electronic equipment.
In order to provide audio output functions for the local computer and the external display device respectively in a dual/multi-screen display state, in the embodiment of the application, whether the electronic device is externally connected with the display device is detected firstly, so that an indication can be provided for triggering different processing under the condition that the display device is externally connected and under the condition that the display device is not externally connected.
Step 302, if yes, acquiring first indication information and second indication information; the first indication information can indicate an audio output device provided in the electronic apparatus, and the second indication information can indicate an audio output device provided in the display apparatus.
Conventionally, electronic devices such as a notebook computer and a desktop computer have a built-in audio output device, such as a built-in speaker, and also have an audio interface capable of being connected to an external audio output device (such as an earphone and a sound box), and both the built-in audio output device and the audio interface of the electronic device can support audio output; for example, the external display devices of various types supporting the VGA interface generally do not have audio output devices such as a built-in speaker and an audio interface of an earphone/speaker, and cannot output audio by using the audio output device of the display device itself, and the display devices of various types supporting the DP/HDMI interface generally have audio output devices, such as a built-in speaker and an audio interface of an earphone/speaker, so that the display devices of these types can support playing audio by using the audio output device of the display device itself.
In the present embodiment, in combination with the above situations of the electronic device and the external display device, when it is detected that the display device is connected to the electronic device, the first indication information capable of indicating the audio output device of the electronic device and the second indication information capable of indicating the audio output device of the external display device are continuously obtained. The electronic device can respectively know the configuration conditions of the electronic device and the audio output devices of the external display device based on the first indication information and the second indication information, such as whether the electronic device has the audio output device, which (built-in or external) audio output devices, and whether the external display device has the audio output device, which (built-in or external) audio output devices.
Step 303, determining an audio output mode based on the first indication information and the second indication information.
In summary, the electronic device can respectively know the configuration of the audio output devices of the electronic device itself and the external display device based on the first indication information and the second indication information, and can further adapt to a suitable audio output mode according to the audio output devices actually configured by the electronic device itself and the external display device after knowing the configuration of the audio output devices of the electronic device itself and the external display device.
The determined audio output mode is used for indicating different target audio output devices adopted by audio output for the electronic equipment and the external display equipment respectively, and aims to effectively utilize the audio output devices, such as a built-in loudspeaker, an audio interface capable of being externally connected with an earphone/a sound box and the like, of the electronic equipment and/or the external display equipment, and simultaneously provide audio output functions for the electronic equipment and the external display equipment so that the electronic equipment and the external display equipment can play audio simultaneously.
And 304, controlling audio output of the electronic equipment and the display equipment based on the audio output mode, so that a first audio output function is provided for the electronic equipment and a second audio output function is provided for the display equipment at the same time based on at least an audio output device of the electronic equipment.
After the audio output mode is determined, different target audio output devices can be respectively allocated to the electronic equipment and the external display equipment based on the audio output mode, so that the target audio output devices allocated to the electronic equipment and the external display equipment can be driven, and an audio output function is provided for the electronic equipment and the external display equipment.
It should be noted that, in an actual application scenario, the electronic device generally has both a built-in speaker and an audio interface capable of accessing an earphone/sound box, and the external display device may have or may not have an audio output device according to different device models, so that when providing an audio output function for the electronic device and the external display device simultaneously based on a determined audio output mode, the electronic device and the external display device may be provided with an audio output function for the electronic device and the external display device respectively by using only different audio output devices of the electronic device itself, or by using respective audio output devices of the electronic device and the external display device, respectively providing an audio output function for the respective devices, which is not limited in this application.
Through the technical scheme, the control method provided by the application determines the audio output modes of the electronic equipment and the external display equipment by combining the actual conditions of the audio output devices of the electronic equipment and the external display equipment under the condition that the electronic equipment is externally connected with the display equipment, and provides the first audio output function for the electronic equipment and simultaneously provides the second audio output function for the external display equipment based on at least the audio output device of the electronic equipment when the audio output control is performed on the electronic equipment and the external display equipment based on the determined audio output modes, so that the application realizes that the audio output functions are respectively provided for the local equipment and the external display equipment under the double/multi-screen display state, breaks through the limitation that only one of the local equipment and the external display equipment can be provided with the audio output function under the double/multi-screen display state in the traditional technology, the multi-purpose device is multifunctional from the aspect of audio output, and the functions of the device in a double/multi-screen display state are enriched.
Referring to fig. 4, in an alternative embodiment of the present application, the control method may be further implemented by the following processing procedures:
step 401, detecting whether a preset pin of a first audio codec of an electronic device receives a predetermined signal.
The preset pin is connected with at least one multimedia interface of the electronic equipment, and the multimedia interface can be used for being externally connected with display equipment.
The first audio codec of the electronic device is a sound card chip of the electronic device.
The number of the preset pins may be one or more.
The predetermined signal may be, but is not limited to, a General-purpose input/output (GPIO) signal.
In this embodiment, optionally, the detection pin is led out from the sound card chip of the electronic device, and is accessed to the multimedia interfaces of the electronic device, such as VGA, DP, and/or HDMI, for example, the VGA interface is accessed to the first detection pin of the sound card chip, the DP interface is accessed to the second detection pin of the sound card chip, and the HDMI interface is accessed to the third detection pin of the sound card chip. The multimedia interface of the electronic equipment is usually in a high level state when no external equipment is connected, and when the external equipment is connected, the level of the multimedia interface is pulled down and is in a low level state.
Otherwise, if the detection pin of the sound card chip does not receive the GPIO signal, it indicates that no display device is connected to the multimedia interface connected to the detection pin.
402, if yes, acquiring first detection information of a built-in audio output device and/or an audio interface of the electronic equipment as the first indication information; the audio interface is used for externally connecting an audio output device.
When the electronic equipment is detected to be externally connected with the display equipment, first indication information capable of indicating an audio output device provided by the electronic equipment and second indication information capable of indicating the audio output device provided by the externally connected display equipment are continuously acquired. More specifically, the first indication information can be used to indicate the configuration of the audio output device of the electronic device, such as whether the electronic device has the audio output device, which (built-in or external) audio output devices are provided, and similarly, the second indication information can be used to indicate the configuration of the audio output device of the external display device, such as whether the external display device has the audio output device, which (built-in or external) audio output devices are provided, and the like.
In this embodiment, first detection information of a built-in audio output device and/or an audio interface of an electronic device is acquired and used as the first indication information.
More specifically, as an optional implementation manner, the first detection information may be obtained by reading related configuration information about the audio output devices in the detailed configuration information of the electronic device, such as which audio output devices (internal speakers, audio interfaces) the electronic device has, and related specification parameters of the audio output devices; or, as another optional implementation, the device model of the electronic device may be detected (usually, the electronic device of a specific model has a matched hardware configuration), and based on the correspondence between the maintained device model and the configuration information of the audio output devices such as the built-in speaker and the audio interface, the relevant configuration information of the audio output devices of the electronic device (which audio output devices and their specification parameters are configured, etc.) may be further determined, and is used as the first detection information, that is, the first indication information.
Step 403, acquiring at least one of the following information as the second indication information:
the electronic equipment is externally connected with an interface type of a multimedia interface of the display equipment;
the equipment model of the externally connected display equipment;
and second detection information of a built-in audio playing device and/or an audio interface of the display equipment.
As an optional implementation manner, the second indication information may be obtained as an interface type of a multimedia interface, such as VGA, DP, or HDMI, of the electronic device, where the display device is externally connected. In general, each model of display device supporting the VGA interface does not have an audio output device such as a built-in speaker and an audio interface of an earphone/speaker, and each model of display device supporting the DP/HDMI interface generally has an audio output device such as a built-in speaker and an audio interface of an earphone/speaker, so that configuration information of the audio output device indicated by different interface types can be preset, for example: the VGA interface type indicates that the external display equipment does not have an audio output device, and the DP/HDMI interface type indicates that the external display equipment has a built-in loudspeaker and audio output devices such as an audio interface.
As another optional implementation, the device model of the external display device may be obtained as the second indication information, each device model is usually matched with a corresponding hardware configuration, and the configuration information of the audio output device indicated by each device model may be preset based on the hardware configuration actually corresponding to each device model, so that when the display device is accessed on the multimedia interface of the electronic device, the configuration condition of the audio output device may be determined by obtaining the device model of the external display device.
As still another optional implementation, the second detection information for the built-in audio output device and/or the audio interface of the external display device may also be directly acquired as the second indication information.
In the latter two embodiments, referring to fig. 5 in particular, a group of pins may be preset on the sound card chip as protocol channel pins of the electronic device and the external display device, for example, pin 6(I2C-DATA) and pin 7(I2C-CLK) on the sound card chip ALC274-CG in fig. 5 are set as the protocol channel pins, once the sound card chip of the electronic device detects that the display device is connected to the multimedia interface, the group of pins is used to perform protocol communication with the external display device, and specifically, the group of pins is used to capture relevant information of the external display device through the multimedia interface based on a predetermined protocol, specifically, but not limited to capture device model, resolution and/or speaker of the external display device, configuration information of the audio interface, and so on, and the device model and/or speaker, configuration information of the audio interface therein, as the second indication information.
Step 404, if the second indication information indicates that the display device does not have an audio output device, determining that the audio output mode is the first output mode.
If the second indication information indicates that the display device does not have an audio output device, it indicates that the audio output device of the electronic device itself, such as an internal speaker and an audio interface of the electronic device (which may be connected to an external audio output device such as an earphone or a sound box), can only be utilized to provide an audio output function for the electronic device and the external display device at the same time, and in this case, the audio output mode of the electronic device in the dual/multi-screen display state is determined as the first output mode.
Step 405, if the second indication information indicates that the display device has an audio output device, determining that the audio output mode is a second output mode.
On the contrary, if the second indication information indicates that the display device has the audio output device, it indicates that the audio output device of the electronic device and the audio output device of the external display device can be utilized to provide the audio output function for the electronic device and the external display device at the same time, respectively, in this case, the audio output mode of the electronic device in the dual/multi-screen display state is determined as the second output mode.
And 406, in the first output mode, using different output devices in the built-in audio playing device and the external audio output device of the electronic device to respectively perform audio output on the audio to be output by the electronic device and the display device.
Correspondingly, in the first output mode, the sound card chip of the electronic device can be used to control different audio output devices such as a built-in audio output device of the electronic device itself and an audio interface (which can be connected to an external audio output device such as an earphone or a sound box) to perform two/multiple audio outputs, so as to provide an audio output function for the electronic device and an external display device thereof at the same time.
Specifically, referring to fig. 5, the sound card chip may control two audio channels, namely, an audio output channel (e.g., a LEFT channel LINE _ LEFT and a RIGHT channel LINE _ RIGHT in fig. 5) of a built-in speaker of the electronic device and an audio output channel (e.g., a LEFT channel HP _ OUTL and a RIGHT channel HP _ OUTR in fig. 5) of an audio interface of the electronic device to open, so as to simultaneously provide an audio output function for a display screen of the electronic device and an external display device of the electronic device, and further, the audio output channel of the built-in speaker of the electronic device may be used to output an audio to be played by the electronic device, and the audio output channel of the audio interface of the electronic device may be used to output an audio to be played by the external display device to an external earphone or a sound box, or the audio output channel of the built-in speaker of the electronic device may be used to output an audio to be played by the external display device to the external earphone or the sound box.
Typically, in a dual-screen application scenario, if a user plays a game using a display screen of the electronic device itself and watches a movie using an external display screen, the user may play a game audio (or play a movie audio) using a built-in speaker of the electronic device itself and play a movie audio (or play a game audio) using an earphone connected to an audio interface of the device itself, and of course, in the actual application scenario, the same user may play the game while watching the movie, or some users among different users may play the game on the display screen of the device itself and another user/users may watch the movie on the extended display screen.
Step 407, in the second output mode, performing audio output on the audio that needs to be output by the electronic device using the audio output device of the electronic device, and performing audio output on the audio that needs to be output by the display device using the audio output device of the display device.
In the second output mode, the audio output device of the electronic equipment and the external display equipment can be combined and utilized, and the audio output function is provided for the electronic equipment and the external display equipment. Preferably, the audio output device of the electronic device is used for audio output of the audio required to be output by the electronic device, and the audio output device of the display device is used for audio output of the audio required to be output by the display device.
In the first mode, different audio output devices of the electronic equipment are utilized to simultaneously provide audio output functions for the electronic equipment and the external display equipment respectively, and correspondingly, a sound card chip of the electronic equipment can directly control corresponding audio output channels to output audio to corresponding audio output devices of the electronic equipment, so that the audio data does not need to be output to the external display equipment through a multimedia interface; in the second output mode, the electronic device local machine may transmit the audio to be played by the external display device to a second audio codec of the external display device through a multimedia interface accessed by the external display device, that is, to a sound card chip of the external display device, decode the received audio data by the sound card chip of the external display device, and transmit the decoded audio to an audio output device (such as a built-in speaker or an external earphone/sound device) of the external display device for output.
A specific application example of the present application is provided below, in this example, as shown in fig. 6, after the electronic device is powered on, it may first detect whether the electronic device is externally connected with a display, and if so, may continue to detect an interface type of a multimedia interface accessed by the externally connected display, where if the detected multimedia interface type is DP or HDMI, a second output mode is adopted, and the electronic device sound card chip controls to provide an audio output function for the local display screen of the electronic device by using an audio output device (a speaker is built in or an audio interface accessed with an earphone/speaker) of the electronic device, and simultaneously controls the audio output device (a speaker is built in or an audio interface accessed with an earphone/speaker) of the externally connected display device to provide an audio output function for the externally connected display device; if the detected multimedia interface type is VGA, a first output mode is adopted, and the sound card chip of the electronic equipment controls different audio output devices of the electronic equipment, such as a built-in loudspeaker of the electronic equipment and an audio interface connected with an earphone/a sound box, and simultaneously provides an audio output function for a display screen of the electronic equipment and an external display device.
Of course, other forms of application situations are also possible, such as determining an output mode to be adopted according to the device model of the external display device and/or the detection information of the audio output device of the external display device, and controlling different audio output devices in the electronic device and/or the external display device to simultaneously provide an audio output function for the local display screen of the electronic device and the external display device, perform audio output, and the like.
In specific implementation, referring to the audio stack relationship diagram shown in fig. 7, the corresponding relationship information of different values of the first indication information and the second indication information and different output modes, the corresponding relationship information of different output modes and the adopted specific audio channel, and the like may be preset in the audio driver of the driver layer, on this basis, after the sound card chip of the hardware layer of the electronic device detects corresponding hardware information (such as the first indication information and the second indication information), the corresponding audio channel is controlled to be opened by using the setting information in the sound card driver, and the audio engine is responsible for the conversion and communication between the application layer (such as various playing software) and the bottom layer driver, so as to realize the playing of the audio of the application layer playing software based on the opened audio channel.
In the embodiment, two/multiple paths of audio output aiming at the display screen of the electronic equipment local machine and one or more external display equipment are realized by utilizing the audio output device of the electronic equipment local machine or combining and utilizing the audio output device of the external display equipment, the audio output function can be simultaneously provided for the display screen of the electronic equipment local machine and the external display equipment, the one machine with multiple purposes is realized from the audio output angle, and the equipment functions under the double/multiple screen display state are enriched.
Corresponding to the control method, the application also provides an electronic device, which can be, but is not limited to, a portable computer (such as a mobile phone, a tablet, a notebook, etc.), a desktop computer, a medium-sized computer, or the like in a general/special purpose computing or configuration environment.
Referring to the schematic structural diagram of the electronic device shown in fig. 8, the electronic device may include:
and the audio output device 801 is used for outputting audio to the electronic equipment.
The audio output device 801 may generally include an internal audio output device (e.g., an internal speaker) of the apparatus, and/or an audio interface for accessing an external audio output device (e.g., a headset, a sound box), and the audio interface may be, but is not limited to, an audio interface based on wired/wireless technologies such as USB or bluetooth.
A memory 802 for storing at least one set of instructions.
A processor 803, configured to call and execute the instruction set in the memory, and by executing the instruction set, perform the following processing:
detecting whether the electronic equipment is externally connected with display equipment or not;
if so, acquiring first indication information and second indication information; the first indication information can indicate an audio output device provided by the electronic equipment, and the second indication information can indicate an audio output device provided by the display equipment;
determining an audio output mode based on the first indication information and the second indication information;
and controlling the audio output of the electronic equipment and the display equipment based on the audio output mode, so that a first audio output function is provided for the electronic equipment and a second audio output function is provided for the display equipment at the same time based on at least an audio output device of the electronic equipment.
In order to provide audio output functions for the local computer and the external display device respectively in a dual/multi-screen display state, in the embodiment of the application, whether the electronic device is externally connected with the display device is detected firstly, so that an indication can be provided for triggering different processing under the condition that the display device is externally connected and under the condition that the display device is not externally connected.
In the present embodiment, in combination with the above situations of the electronic device and the external display device, when it is detected that the display device is connected to the electronic device, the first indication information capable of indicating the audio output device of the electronic device and the second indication information capable of indicating the audio output device of the external display device are continuously obtained. The electronic device can respectively know the configuration conditions of the electronic device and the audio output devices of the external display device based on the first indication information and the second indication information, such as whether the electronic device has the audio output device, which (built-in or external) audio output devices, and whether the external display device has the audio output device, which (built-in or external) audio output devices.
In summary, the electronic device can respectively know the configuration of the audio output devices of the electronic device itself and the external display device based on the first indication information and the second indication information, and can further adapt to a suitable audio output mode according to the audio output devices actually configured by the electronic device itself and the external display device after knowing the configuration of the audio output devices of the electronic device itself and the external display device.
The determined audio output mode is used for indicating different target audio output devices adopted by audio output for the electronic equipment and the external display equipment respectively, and aims to effectively utilize the audio output devices, such as a built-in loudspeaker, an audio interface capable of being externally connected with an earphone/a sound box and the like, of the electronic equipment and/or the external display equipment, and simultaneously provide audio output functions for the electronic equipment and the external display equipment so that the electronic equipment and the external display equipment can play audio simultaneously.
After the audio output mode is determined, different target audio output devices can be respectively allocated to the electronic equipment and the external display equipment based on the audio output mode, so that the target audio output devices allocated to the electronic equipment and the external display equipment can be driven, and an audio output function is provided for the electronic equipment and the external display equipment.
In this embodiment, when the electronic device is externally connected with the display device, the audio output modes of the electronic device and the externally connected display device are determined according to the actual conditions of the respective audio output devices of the electronic device and the externally connected display device, and when the audio output control is performed on the electronic device and the externally connected display device based on the determined audio output modes, the first audio output function is provided for the electronic device and the second audio output function is provided for the externally connected display device at the same time based on at least the audio output device of the electronic device, so that the present embodiment realizes that the audio output functions are respectively provided for the local device and the externally connected display device in the dual/multi-screen display state, and breaks through the limitation that only one of the local device and the externally connected display device can provide the audio output function in the dual/multi-screen display state in the conventional technology, the multi-purpose device is multifunctional from the aspect of audio output, and the functions of the device in a double/multi-screen display state are enriched.
In an alternative embodiment of the present application, the processor 803 may be, but is not limited to, a first audio codec of an electronic device, that is, a sound card chip of the electronic device.
As shown in fig. 9, the electronic device may also include a multimedia interface 804. The multimedia interface 804 may be, but is not limited to, VGA, DP, HDMI, etc. interfaces.
The processor 803 may further implement its functions by the following processes:
detecting whether a preset pin of a first audio codec of the electronic equipment receives a preset signal; if so, acquiring first detection information of a built-in audio output device and/or an audio interface of the electronic equipment as the first indication information; acquiring at least one of the following information as the second indication information: the electronic equipment is externally connected with an interface type of a multimedia interface of the display equipment, an equipment model of the externally connected display equipment, and second detection information of a built-in audio playing device and/or an audio interface of the display equipment; if the second indication information indicates that the display equipment does not have an audio output device, determining that the audio output mode is a first output mode; if the second indication information indicates that the display equipment is provided with an audio output device, determining that the audio output mode is a second output mode; under the first output mode, different output devices in a built-in audio playing device and an external audio output device of the electronic equipment are utilized to respectively output audio required to be output by the electronic equipment and the display equipment; and in the second output mode, the audio output device of the electronic equipment is used for carrying out audio output on the audio required to be output by the electronic equipment, and the audio output device of the display equipment is used for carrying out audio output on the audio required to be output by the display equipment.
The preset pin is connected with at least one multimedia interface of the electronic equipment, and the multimedia interface can be used for being externally connected with display equipment.
The number of the preset pins may be one or more.
The predetermined signal may be, but is not limited to, a GPIO signal.
In this embodiment, optionally, the detection pin is led out from the sound card chip of the electronic device, and is accessed to the multimedia interfaces of the electronic device, such as VGA, DP, and/or HDMI, for example, the VGA interface is accessed to the first detection pin of the sound card chip, the DP interface is accessed to the second detection pin of the sound card chip, and the HDMI interface is accessed to the third detection pin of the sound card chip. The multimedia interface of the electronic equipment is usually in a high level state when no external equipment is connected, and when the external equipment is connected, the level of the multimedia interface is pulled down and is in a low level state.
Otherwise, if the detection pin of the sound card chip does not receive the GPIO signal, it indicates that no display device is connected to the multimedia interface connected to the detection pin.
When the electronic equipment is detected to be externally connected with the display equipment, first indication information capable of indicating an audio output device provided by the electronic equipment and second indication information capable of indicating the audio output device provided by the externally connected display equipment are continuously acquired.
In this embodiment, first detection information of a built-in audio output device and/or an audio interface of an electronic device is acquired and used as the first indication information.
As an optional implementation manner, the second indication information may be obtained as an interface type of a multimedia interface, such as VGA, DP, or HDMI, of the electronic device, where the display device is externally connected.
As another optional implementation, the device model of the external display device may be obtained as the second indication information, each device model is usually matched with a corresponding hardware configuration, and the configuration information of the audio output device indicated by each device model may be preset based on the hardware configuration actually corresponding to each device model, so that when the display device is accessed on the multimedia interface of the electronic device, the configuration condition of the audio output device may be determined by obtaining the device model of the external display device.
As still another optional implementation, the second detection information for the built-in audio output device and/or the audio interface of the external display device may also be directly acquired as the second indication information.
If the second indication information indicates that the display device does not have an audio output device, it indicates that the audio output device of the electronic device itself, such as an internal speaker and an audio interface of the electronic device (which may be connected to an external audio output device such as an earphone or a sound box), can only be utilized to provide an audio output function for the electronic device and the external display device at the same time, and in this case, the audio output mode of the electronic device in the dual/multi-screen display state is determined as the first output mode.
On the contrary, if the second indication information indicates that the display device has the audio output device, it indicates that the audio output device of the electronic device and the audio output device of the external display device can be utilized to provide the audio output function for the electronic device and the external display device at the same time, respectively, in this case, the audio output mode of the electronic device in the dual/multi-screen display state is determined as the second output mode.
Correspondingly, in the first output mode, the sound card chip of the electronic device can be used to control different audio output devices such as a built-in audio output device of the electronic device itself and an audio interface (which can be connected to an external audio output device such as an earphone or a sound box) to perform two/multiple audio outputs, so as to provide an audio output function for the electronic device and an external display device thereof at the same time.
In the second output mode, the audio output device of the electronic equipment and the external display equipment can be combined and utilized, and the audio output function is provided for the electronic equipment and the external display equipment. Preferably, the audio output device of the electronic device is used for audio output of the audio required to be output by the electronic device, and the audio output device of the display device is used for audio output of the audio required to be output by the display device.
In the embodiment, two/multiple paths of audio output aiming at the display screen of the electronic equipment local machine and one or more external display equipment are realized by utilizing the audio output device of the electronic equipment local machine or combining and utilizing the audio output device of the external display equipment, the audio output function can be simultaneously provided for the display screen of the electronic equipment local machine and the external display equipment, the one machine with multiple purposes is realized from the audio output angle, and the equipment functions under the double/multiple screen display state are enriched.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
For convenience of description, the above system or apparatus is described as being divided into various modules or units by function, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
Finally, it is further noted that, herein, relational terms such as first, second, third, fourth, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A control method is applied to an electronic device with an audio output device; the method comprises the following steps:
detecting whether the electronic equipment is externally connected with display equipment or not;
if so, acquiring first indication information and second indication information; the first indication information can indicate an audio output device provided by the electronic equipment, and the second indication information can indicate an audio output device provided by the display equipment;
determining an audio output mode based on the first indication information and the second indication information;
and controlling the audio output of the electronic equipment and the display equipment based on the audio output mode, so that a first audio output function is provided for the electronic equipment and a second audio output function is provided for the display equipment at the same time based on at least an audio output device of the electronic equipment.
2. The method of claim 1, wherein the detecting whether the electronic device is externally connected with a display device comprises:
detecting whether a preset pin of a first audio codec of the electronic equipment receives a preset signal;
the preset pin is connected with at least one multimedia interface of the electronic equipment, and the multimedia interface can be used for being externally connected with display equipment.
3. The method of claim 1, wherein the obtaining the first indication information and the second indication information comprises:
acquiring first detection information of a built-in audio output device and/or an audio interface of the electronic equipment as the first indication information; the audio interface is used for externally connecting an audio output device;
acquiring at least one of the following information as the second indication information:
the electronic equipment is externally connected with an interface type of a multimedia interface of the display equipment;
the equipment model of the externally connected display equipment;
second detection information for a built-in audio output device and/or an audio interface of the display apparatus.
4. The method of claim 1, the determining an audio output mode based on the first indication information and the second indication information, comprising:
if the second indication information indicates that the display equipment does not have an audio output device, determining that the audio output mode is a first output mode;
and if the second indication information indicates that the display equipment is provided with an audio output device, determining that the audio output mode is a second output mode.
5. The method of claim 4, the controlling audio output of the electronic device and the display device based on the audio output mode comprising:
under the first output mode, different output devices in a built-in audio output device and an external audio output device of the electronic equipment are utilized to respectively perform audio output on the audio required to be output by the electronic equipment and the display equipment;
and in the second output mode, the audio output device of the electronic equipment is used for carrying out audio output on the audio required to be output by the electronic equipment, and the audio output device of the display equipment is used for carrying out audio output on the audio required to be output by the display equipment.
6. The method of claim 5, wherein the audio output of the audio to be output by the display device by using the audio output device of the display device comprises:
and transmitting the audio to be output by the display equipment to a second audio codec of the display equipment through a corresponding multimedia interface on the electronic equipment, so that the second audio codec decodes the received audio, and transmits the decoded audio to an audio output device of the display equipment for output.
7. An electronic device, comprising:
the audio output device is used for carrying out audio output on the electronic equipment;
a memory for storing at least one set of instructions;
a processor for calling and executing the set of instructions in the memory, by executing the set of instructions:
detecting whether the electronic equipment is externally connected with display equipment or not;
if so, acquiring first indication information and second indication information; the first indication information can indicate an audio output device provided by the electronic equipment, and the second indication information can indicate an audio output device provided by the display equipment;
determining an audio output mode based on the first indication information and the second indication information;
and controlling the audio output of the electronic equipment and the display equipment based on the audio output mode, so that a first audio output function is provided for the electronic equipment and a second audio output function is provided for the display equipment at the same time based on at least an audio output device of the electronic equipment.
8. The electronic device of claim 7, further comprising a first audio codec and a multimedia interface;
when detecting whether the electronic device is externally connected with the display device, the processor is specifically configured to:
detecting whether a preset pin of a first audio codec of the electronic equipment receives a preset signal;
the preset pin is connected with at least one multimedia interface of the electronic equipment, and the multimedia interface can be used for being externally connected with display equipment.
9. The electronic device of claim 8, further comprising a built-in audio output device and/or an audio interface;
when the processor acquires the first indication information and the second indication information, the processor is specifically configured to:
acquiring first detection information of a built-in audio output device and/or an audio interface of the electronic equipment as the first indication information; the audio interface is used for externally connecting an audio output device;
acquiring at least one of the following information as the second indication information:
the electronic equipment is externally connected with an interface type of a multimedia interface of the display equipment;
the equipment model of the externally connected display equipment;
second detection information for a built-in audio output device and/or an audio interface of the display apparatus.
10. The electronic device of claim 7, wherein the processor, when determining the audio output mode based on the first indication information and the second indication information, is specifically configured to:
if the second indication information indicates that the display equipment does not have an audio output device, determining that the audio output mode is a first output mode;
if the second indication information indicates that the display equipment is provided with an audio output device, determining that the audio output mode is a second output mode;
the processor, when controlling the audio output of the electronic device and the display device based on the audio output mode, is specifically configured to:
under the first output mode, different output devices in a built-in audio output device and an external audio output device of the electronic equipment are utilized to respectively perform audio output on the audio required to be output by the electronic equipment and the display equipment;
and in the second output mode, the audio output device of the electronic equipment is used for carrying out audio output on the audio required to be output by the electronic equipment, and the audio output device of the display equipment is used for carrying out audio output on the audio required to be output by the display equipment.
CN201911360985.8A 2019-12-25 2019-12-25 Control method and electronic equipment Active CN111124353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911360985.8A CN111124353B (en) 2019-12-25 2019-12-25 Control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911360985.8A CN111124353B (en) 2019-12-25 2019-12-25 Control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111124353A true CN111124353A (en) 2020-05-08
CN111124353B CN111124353B (en) 2021-07-16

Family

ID=70502531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911360985.8A Active CN111124353B (en) 2019-12-25 2019-12-25 Control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111124353B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040288A (en) * 2020-09-04 2020-12-04 华人运通(上海)云计算科技有限公司 Multimedia system
CN112988249A (en) * 2021-03-23 2021-06-18 上海摩勤智能技术有限公司 Method and device for creating sound card, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104680A (en) * 2010-12-08 2011-06-22 华为终端有限公司 Audio playing method, plug-in playing terminal and mobile terminal
CN106293559A (en) * 2015-05-27 2017-01-04 联想(北京)有限公司 A kind of audio-frequency processing method, the method controlling electronic system and electronic equipment
US20170213554A1 (en) * 2014-06-24 2017-07-27 Google Inc. Device designation for audio input monitoring

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104680A (en) * 2010-12-08 2011-06-22 华为终端有限公司 Audio playing method, plug-in playing terminal and mobile terminal
US20170213554A1 (en) * 2014-06-24 2017-07-27 Google Inc. Device designation for audio input monitoring
CN106293559A (en) * 2015-05-27 2017-01-04 联想(北京)有限公司 A kind of audio-frequency processing method, the method controlling electronic system and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040288A (en) * 2020-09-04 2020-12-04 华人运通(上海)云计算科技有限公司 Multimedia system
CN112040288B (en) * 2020-09-04 2022-07-12 华人运通(上海)云计算科技有限公司 Multimedia system
CN112988249A (en) * 2021-03-23 2021-06-18 上海摩勤智能技术有限公司 Method and device for creating sound card, electronic equipment and storage medium
CN112988249B (en) * 2021-03-23 2024-05-28 上海摩勤智能技术有限公司 Method and device for creating sound card, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111124353B (en) 2021-07-16

Similar Documents

Publication Publication Date Title
US11496835B2 (en) Speaker control method and mobile terminal
JP5016040B2 (en) Portable electronic device, method for selecting user-detectable output, computer system and computer program
US20050265565A1 (en) Information processing apparatus
JP6702451B2 (en) In-vehicle device, control method for in-vehicle device, and control program
CN103282871B (en) The electronic equipment of system time-out based on media detection reset and method
JP2020523710A (en) Display method and device
US20220283828A1 (en) Application sharing method, electronic device and computer readable storage medium
JP3828498B2 (en) Electronic device and display device setting method
US9973855B2 (en) Method and electronic device for controlling output depending on type of external output device
US10140086B2 (en) Electronic device and audio ouputting method thereof
US20150121278A1 (en) Method and apparatus for providing user interface in multi-window
CN111124353B (en) Control method and electronic equipment
WO2021037074A1 (en) Audio output method and electronic apparatus
CN105049932A (en) Detection noise or object interruption in audio video viewing and altering presentation based thereon
US20230222989A1 (en) Automatic input style selection or augmentation for an external display device
CN109144642B (en) Display control method, display control device, electronic equipment and storage medium
US8925032B2 (en) AV output system performing video output
US9402129B2 (en) Audio control method and audio player using audio control method
EP3929714A1 (en) Information processing device, information processing method, and program
CA3098735C (en) Display interface switching method, display interface switching apparatus, and electronic device
US20080036918A1 (en) Audio Control System Applied for Television and Method Thereof
KR100654845B1 (en) Apparutus for rolling electronic album
WO2006052076A1 (en) Method and apparatus for playing multimedia content
JP6493483B2 (en) Communication apparatus, method and program
WO2019011270A1 (en) Method and terminal for playing audio, and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant