The teachings of the present disclosure relate generally to isochronous audio transmission.
Electronic devices, such as mobile phones and computer tablets, have become common in contemporary society for supporting various everyday uses. These electronic devices are each commonly connected to output audio devices such as speakers, headsets, etc. In certain cases, an audio channel with a certain channel rate may be used at an electronic device (e.g., mobile terminal, host, personal computer, MP3 player, or similar devices) to transport audio sample data to one or more of these output audio devices. The audio channel may be provided over a communications bus. An example of a communications bus is the SoundWire bus.
The MIPI® Alliance has set forth the SoundWire standard, version 1.2 of which was released to adopters on April 2019. Copies of this standard can be found to members of the MIPI® Alliance at https://www.mipi.org/specifications/soundwire. SoundWire is designed as a comprehensive interface and scalable architecture that can be used to enable audio features and functions in multiple types of devices. SoundWire is used as a protocol over the SoundWire bus, which is time division multiplexed (TDM). In certain cases, the audio sample rate may not be the same as the channel rate. In fact, the ratio of the channel rate over the audio sample rate may not even be an integer ratio (i.e., it may be a fractional ratio). When the audio sample rate is not the same as the channel rate, it means that audio sample data may not be available for transmission over every transport opportunity provided by the audio channel. In such cases, it is advantageous for the transmitter of the information (e.g., the source) to determine whether audio sample data is available for transmission over a transport opportunity. It is similarly advantageous for the receiver of the information to be able to determine whether a transport opportunity comprises audio sample data so that it can receive it, if so.
The following presents a simplified summary of one or more aspects of the present disclosure, in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated features of the disclosure, and is intended neither to identify key or critical elements of all aspects of the disclosure nor to delineate the scope of any or all aspects of the disclosure. Its sole purpose is to present some concepts of one or more aspects of the disclosure in a simplified form as a prelude to the more detailed description that is presented later.
In some aspects, the present disclosure describes a method for communicating audio data. In one example, the method includes determining whether a condition for each transport opportunity on an audio channel is met based on an audio sample rate and a channel rate of the audio channel. For each transport opportunity, upon determining that the condition is met for the transport opportunity, the method also includes transmitting audio sample data over the transport opportunity or receiving audio sample data at the transport opportunity.
These and other aspects of the invention will become more fully understood upon a review of the detailed description, which follows. Other aspects, features, and embodiments of the present invention will become apparent to those of ordinary skill in the art, upon reviewing the following description of specific, exemplary embodiments of the present invention in conjunction with the accompanying figures. While features of the present invention may be discussed relative to certain embodiments and figures below, all embodiments of the present invention can include one or more of the advantageous features discussed herein. In other words, while one or more embodiments may be discussed as having certain advantageous features, one or more of such features may also be used in accordance with the various embodiments of the invention discussed herein. In similar fashion, while exemplary embodiments may be discussed below as device, system, or method embodiments it should be understood that such exemplary embodiments can be implemented in various devices, systems, and methods.
The detailed description set forth below in connection with the appended drawings is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described herein may be practiced. The detailed description includes specific details for the purpose of providing a thorough understanding of various concepts. However, it will be apparent to those skilled in the art that these concepts may be practiced without these specific details. In some instances, well known structures and components are shown in block diagram form in order to avoid obscuring such concepts.
With reference now to the drawing figures, several exemplary aspects of the present disclosure are described. The word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.
The various embodiments will be described in detail with reference to the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts. References made to particular examples and implementations are for illustrative purposes, and are not intended to limit the scope of the invention or the claims.
Other devices can be connected to the system bus 18. As illustrated in
The CPU(s) 12 may also be configured to access the display controller(s) 30 over the system bus 18 to control information sent to one or more displays 34. The display controller(s) 30 sends information to the display(s) 34 to be displayed via one or more video processors 36, which process the information to be displayed into a format suitable for the display(s) 34. The display(s) 34 can include any type of display, including but not limited to a cathode ray tube (CRT), a light emitting diode (LED) display, a liquid crystal display (LCD), a plasma display, etc.
While the mobile terminal 10 may include plural speakers and/or plural microphones coupled by a SoundWire bus, the mobile terminal 10 may be coupled to an external sound system such as through a docking station (or wirelessly). In this regard,
Note a mobile terminal 10 is merely described herein as an example of a device with a speaker path to an input device or an output device (e.g., an audio component such as a microphone, speaker, headset, coded, or other audio devices). Other examples of such devices include a personal computer, tablet, MP3 Player, or any other electronic device that can be configured with a speaker path to an audio component. Such devices are also within the scope of this disclosure.
Regardless of whether the audio components are internal to the mobile terminal 10 (or other processor based device) or an external system, the mobile terminal 10 (or other processor based device) may include a SoundWire bus to move audio data between audio components such as modems, codecs, and/or applications processors.
In this regard, a simplified audio system 60 is illustrated in
It should be appreciated that each component within the simplified audio system 60 may include multiple ports, each of which may be assigned to different audio channels. Exemplary aspects of this arrangement are illustrated in
In certain cases, it may be desired to deliver a native audio stream, which is an audio stream that is delivered as it was sampled, over a channel with a different audio clock rate or channel rate. In such cases, the ratio between the pulse density modulation (PDM) sample rate of the native audio stream and the channel rate may be a fractional ratio, instead of an integer ratio. A common example of this is delivering a 44.1 kilohertz (kHz) audio stream over a 48 kHz channel.
In the example of
Utilizing the flow control method when transporting single bit direct stream digital (DSD) audio samples over a channel with a common channel rate, however, causes a very large overhead and requires a larger bandwidth. DSD uses a single bit of information, which indicates whether the current sample of the analogue waveform is higher or lower than in the previous one. A single DSD corresponds to 1 bit with a 2.8224 MHz sampling rate. A double DSD corresponds to 1 bit with a 5.6448 MHz sampling rate. A quadruple DSD corresponds to 1 bit with a 11.2896 MHz sampling rate.
As discussed, transmitting two bits (e.g., RxRdy and TxRdy) with a single bit of audio data (i.e., 1-bit DSD) results in about 200% overhead. Although transmitting a single DSD with this large overhead may be possible using a common link capacity, transmitting a double DSD or a quadruple DSD with this overhead may require a bandwidth that exceeds the common link capacity.
Accordingly certain embodiments described herein relate to configuring the source (e.g., master 62) to independently determine whether there is audio sample data (e.g., DSD audio sample) available to be transmitted over a certain transport opportunity while also configuring the sink (e.g., slave 64) to independently determine whether a certain receiving opportunity is transporting an audio sample. The source and the sink being configured to independently make these determinations allows for transmitting audio samples with any rate over a channel with a common bandwidth (e.g., bandwidth used for isochronous transport, as described in relation to
In order to make the determinations described above, the source and the sink are configured, as further described below, to independently perform a set of one or more calculations to generate two integer values, referred to as M and N, based on an audio sample rate and a channel rate. M represents an integer corresponding to the audio sample rate associated with the audio data that is being transmitted over an audio channel (e.g. SoundWire bus) between the source and the sink. N represents an integer corresponding to the channel rate of the audio channel between the sink and the source. As described in more detail in relation to
M=LCM(audio sample rate, channel rate)/sample rate
In the formula above, LCM stands for the least common multiplier. As such, M is equal to the least common multiplier of the audio sample rate and the channel rate, divided by the audio sample rate. The formula for calculating N is:
N=LCM(audio sample rate, channel rate)/channel rate
As such, N is equal to the least common multiplier of the audio sample rate and the channel rate, divided by the channel rate. In the example where the DSD rate is 2.8224 MHz and the channel rate is 3.072, then M is 147 and N is 160. This means that for an embodiment where the DSD rate is 2.8224 MHz and the channel rate is 3.072, for every 160 transport opportunities in an audio channel, only 147 actual audio samples are delivered.
At 704, operation 700 continue by configuring the non-active banks in data ports of each of the sink and the source with information, including M and N. As one of ordinary skill in the art can appreciate, each data port in a sink or a source may comprise at least two sets of configuration registers. One set of registers represents a current active bank (e.g., current active configuration bank), which is used by the data port when the data port is active or operating. The other set of registers represent a “next” or a “non-active” bank, which allows the data port to be configured while it is operating. Any configuration in the non-active bank, however, is not uploaded to the current active bank until a bank switch event. Any configuration that is not uploaded to the active current bank is not used by the data port. A bank switch event refers to an operation by which the configurations in the non-active bank are uploaded to the current active bank. A bank switch event, as one of ordinary skill in the art can appreciate, occurs at a synchronous stream point (SSP). A SSP refers to a periodic point in time, at which all devices (e.g., sink and source) on the link or channel are synchronized. As such, at an SSP, each device is able to determine that it is synchronized with all other devices on the link. Subsequent to a bank switch event, the data port uses the configurations in the most updated current active bank (including the configurations that were previously in the non-active bank and then uploaded to the current active bank at the bank switch event).
At 706, operations 700 continue by sending a bank switch command. Sending a bank switch command refers to writing the command to a register, referred to as SCP_FrameCtrl. If the command is successful, operations 700 move to 708.
At 708, operations 700 continue by uploading all the configurations in the non-active bank into the current active bank. For example, upon the command being successful, the configurations of the non-active bank are selected and uploaded into the current active banks. The link transport is also changed, accordingly.
In certain embodiments, operations 1000A further comprise determining a first integer value and a second integer value based on the audio sample rate and the channel rate. In such embodiments, operations 1000A further comprise initializing a counter to zero.
In certain such embodiments, operations 1000A further comprise configuring a data port of the device with the first integer value, the second integer value, and a counter. In certain such embodiments operations 1000A further comprise initializing the counter to zero at a bank switch event.
In certain embodiments, determining whether the condition is met for each transport opportunity on the audio channel, as described in step 1002A, comprises adding the first integer value to the counter, and subsequent to the adding, based upon determining that a value of the counter is equal to or larger than the second integer value, determining that the condition is met. Having determined that the condition is met, the second integer value is subtracted from the value of the counter. However, based upon determining that the value of the counter does not exceed the second integer value, it is determined that the condition is not met.
In certain embodiments, determining the first integer value and the second integer value based on the audio sample rate and the channel rate is based on the following formulas:
the first integer value=LCM(the audio sample rate, the channel rate)/the audio sample rate
the second integer value=LCM(the audio sample rate, the channel rate)/the channel rate
In certain embodiments, determining whether the condition is met for each transport opportunity comprises determining whether each transport opportunity comprises audio sample data. In such embodiments, the receiving is performed upon determining that the transport opportunity comprises audio sample data.
In certain embodiments, determining whether the condition is met for each transport opportunity comprises determining whether audio sample data is available to be transmitted over the transport opportunity. In such embodiments, the transmitting is performed upon determining that audio sample data is available to be transmitted over the transport opportunity.
At step 1002B, a device (e.g., source or sink) determines whether an audio channel is activated. In one example, the audio channel may be activated at a bank switch event. If the channel is activated, the device moves to step 1004B to set a counter to 0. A visual example of a bank switch is shown at t0. If the audio channel is not activated, the operations 1000 remain in step 1002B until the channel is activated.
At step 1006B, the device determines whether a transport opportunity is present. If not, the device goes back to performing step 1006B until a transport opportunity is present. If yes, the device moves to step 1008B. Transport opportunities occur periodically based on the channel rate. For example, a channel with a channel rate of 3.072 MHz presents 3.072 million transport opportunities per second. In such an example, the device keeps polling until a transport opportunity occurs. In the example of
At step 1008B, the device adds M to the counter. In the example of
At step 1010B, the device determines whether the value of the counter is equal to or larger than N. In the example of
At step 1006B again, the device determines whether a transport opportunity is present. Continuing with the example above, at some point, the device determines that transport opportunity 1104b is present and, therefore, moves to step 1008B. At step 1008B, the device adds M to the counter. In this example, the device adds 147 to the value of the counter, which is 147, resulting in 294. At step 1010B, the device determines whether the value of the counter is equal to or larger than N. In this example, the device determines that the value of the counter, 294, is larger than N, 160. Based on the value of the counter being greater than or equal to N, the device determines that there is an audio sample available to be transmitted or received over transport opportunity 1104b.
As such, at step 1012B the device subtracts N from the counter. In the above example, the device subtracts 160 from 294, which results in a counter with a value of 134.
At step 1014B, the device transmits the available audio sample over transport opportunity 1104b if the device is a source. If the device is a sink, at step 1014B, the device receives the audio sample transported over transport opportunity 1104b. Having performed step 1014B, the device loops back to step 1006B to determine whether a transport opportunity is present again.
Accordingly, using the embodiments described herein allows for delivering and receiving audio sample data with any audio ample rate over an audio channel with any channel rate.
In some configurations, the term(s) ‘communicate,’ ‘communicating,’ and/or ‘communication’ may refer to ‘receive,’ ‘receiving,’ ‘reception,’ and/or other related or suitable aspects without necessarily deviating from the scope of the present disclosure. In some configurations, the term(s) ‘communicate,’ ‘communicating,’ ‘communication,’ may refer to ‘transmit,’ ‘transmitting,’ ‘transmission,’ and/or other related or suitable aspects without necessarily deviating from the scope of the present disclosure.
Within the present disclosure, the word “exemplary” is used to mean “serving as an example, instance, or illustration.” Any implementation or aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects of the disclosure. Likewise, the term “aspects” does not require that all aspects of the disclosure include the discussed feature, advantage or mode of operation. The term “coupled” is used herein to refer to the direct or indirect coupling between two objects. For example, if object A physically touches object B, and object B touches object C, then objects A and C may still be considered coupled to one another—even if they do not directly physically touch each other. For instance, a first object may be coupled to a second object even though the first object is never directly physically in contact with the second object. The terms “circuit” and “circuitry” are used broadly, and intended to include both hardware implementations of electrical devices and conductors that, when connected and configured, enable the performance of the functions described in the present disclosure, without limitation as to the type of electronic circuits.
One or more of the components, steps, features and/or functions illustrated herein may be rearranged and/or combined into a single component, step, feature or function or embodied in several components, steps, or functions. Additional elements, components, steps, and/or functions may also be added without departing from novel features disclosed herein. The apparatus, devices, and/or components illustrated herein may be configured to perform one or more of the methods, features, or steps described herein. The novel algorithms described herein may also be efficiently implemented in software and/or embedded in hardware.
It is to be understood that the specific order or hierarchy of steps in the methods disclosed is an illustration of exemplary processes. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the methods may be rearranged. The accompanying method claims present elements of the various steps in a sample order, and are not meant to be limited to the specific order or hierarchy presented unless specifically recited therein.
The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein, but are to be accorded the full scope consistent with the language of the claims, wherein reference to an element in the singular is not intended to mean “one and only one” unless specifically so stated, but rather “one or more.” Unless specifically stated otherwise, the term “some” refers to one or more. A phrase referring to “at least one of” a list of items refers to any combination of those items, including single members. As an example, “at least one of: a, b, or c” is intended to cover: a; b; c; a and b; a and c; b and c; and a, b and c. All structural and functional equivalents to the elements of the various aspects described throughout this disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims. Moreover, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the claims. No claim element is to be construed under the provisions of 35 U.S.C. § 112(f) unless the element is expressly recited using the phrase “means for” or, in the case of a method claim, the element is recited using the phrase “step for.”
These apparatus and methods described in the detailed description and illustrated in the accompanying drawings by various blocks, modules, components, circuits, steps, processes, algorithms, etc. (collectively referred to as “elements”). These elements may be implemented using hardware, software, or combinations thereof. Whether such elements are implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system.
By way of example, an element, or any portion of an element, or any combination of elements may be implemented with a “processing system” that includes one or more processors. One or more processors in the processing system may execute software. Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software modules, applications, software applications, software packages, firmware, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise.
Accordingly, in one or more exemplary embodiments, the functions described may be implemented in hardware, software, or combinations thereof. If implemented in software, the functions may be stored on or encoded as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media. Storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, PCM (phase change memory), flash memory, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.