The present subject matter relates generally to wireless communication, and in particular to synchronization for audio streaming of wireless communication.
Wireless communication is used for a variety of applications, including for use with hearing assistance devices. Modern hearing assistance devices typically include digital electronics to enhance the wearer's experience. In the specific case of hearing aids, current designs employ digital signal processors rich in features. Their functionality is further benefited from communications, either from a remote source or from ear-to-ear for advanced processing. Thus, it is desirable to include wireless functionality for a hearing aid to allow for functions such as ear to ear synchronization, remote control, programming and configuration, streaming audio, bi-directional audio, etc. The present subject matter can be used for any wireless communication system, including but not limited to hearing assistance device applications.
Disclosed herein, among other things, are methods and apparatus for providing a time-stamp based controller for synchronization of sink or source sampling rate with external packet rate. A method for wireless communications includes receiving a transmission of a packet using a wireless transceiver of an electronic device, and using a processor of the electronic device to read a first value of a system timer and store the first value as an arrival time-stamp. The packet is decoded and processed by the processor, and sent to an output. When the processed packet is sent, a second value of the system timer is read, adjusted and stored as a departure time-stamp. The arrival time-stamp and the departure time-stamp are used to calculate an adjustment stimulus for a sample rate actuator of the electronic device. The sample rate actuator is configured to maintain synchronization of sampling rate with an external packet rate.
Disclosed herein, among other things, are methods and apparatus for providing synchronization of incoming and outgoing audio streams in bidirectional fractional delay (FD) sampling rate converter (SRC). A method for bidirectional wireless communications includes receiving a transmission of a packet using a wireless transceiver of an electronic device, and calculating an incoming fractional delay (FD) using a FD sampling rate converter (SRC), where the FD SRC configured to synchronize sample rate of the device with an external packet rate. In various embodiments, the incoming FD and current phase increment value of the FD SRC are used to calculate an outgoing FD, to provide a one-to-one relation between incoming and outgoing packets for the device.
This Summary is an overview of some of the teachings of the present application and not intended to be an exclusive or exhaustive treatment of the present subject matter. Further details about the present subject matter are found in the detailed description and appended claims. The scope of the present invention is defined by the appended claims and their legal equivalents.
The following detailed description of the present subject matter refers to subject matter in the accompanying drawings which show, by way of illustration, specific aspects and embodiments in which the present subject matter may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the present subject matter. References to “an”, “one”, or “various” embodiments in this disclosure are not necessarily to the same embodiment, and such references contemplate more than one embodiment. The following detailed description is demonstrative and not to be taken in a limiting sense. The scope of the present subject matter is defined by the appended claims, along with the full scope of legal equivalents to which such claims are entitled.
Modern portable wireless communication equipment employs radio communications for various uses, some of which include the transmission of data such as audio and video data. Such communication utilizes highly reliable data networks capable of low packet and bit error rates. A wireless host can be the source of the audio or video information. Portable electronic devices such as headsets, hearing aids, head worn displays and the like can send and receive wireless communication.
The present detailed description will discuss hearing assistance devices using the example of hearing aids. Hearing aids are only one type of hearing assistance device. Other hearing assistance devices include, but are not limited to, those in this document. It is understood that their use in the description is intended to demonstrate the present subject matter, but not in a limited or exclusive or exhaustive sense.
Terminology
Total Throughput Delay of an audio streaming system—the time from when a reference signal is input into the system (i.e. a source device such as a hearing aid or accessory) to when the reference signal leaves the system (i.e. the sink device such as a hearing aid's speaker).
Device Delay (Latency) of audio stream—the tune it takes for a reference signal to travel into the device (e.g. through source's microphone) and then out of the device (e.g. through sink's receiver).
Source is a device, which generates (creates) an audio stream.
Sink is a device, which consumes an audio stream.
Relay is a device, which passes through an audio stream.
Source/Sink is a combination of Source and Sink in one device, which consumes one audio stream and creates another one.
Sampling Rate Actuator—software module or software-controlled hardware unit, which allows control of the effective audio sampling rate of the device.
Sampling Rate Converter (SA)—software module that performs sampling rate conversion of an audio stream to obtain a new discrete representation of the underlying continuous signal of the audio stream. There are two groups of SRC depending on the algorithm and implementation:
The present subject matter can be used for implementation of such features as a television (TV) streamer or for cellular phone/entertainment device (CPED) audio streaming, ear-to-ear streaming and CROS/BiCROS (Contra Lateral Routing of Signal (CROS) is a hearing aid technology for people with unilateral hearing), and uses of synchronization of audio input or output sampling rate with external packet rate. As described herein, a unified all-purpose solution has been developed.
In the development of audio streaming systems, it is often desirable to synchronize the sampling rate of an audio source and sink. In one example, source sampling rate is slightly higher than sink sampling rate. In that case, the audio samples will be accumulated in the sink buffer faster than samples are consumed from it. Eventually, this will result in overflow of the sink buffer and result in artifacts in the audio stream. It should be noted that, with accumulation of samples in the sink buffer, device delay of the sink increases as each samples “spends” more time in the sink buffer. Device delay will remain the same only in the case where the sampling frequencies of the source and the sink are perfectly identical.
The present subject matter measures the device delay and maintains it constant by adjusting the effective sampling rate of the device. To measure the device delay, time-stamps of the moments when samples enter and leave the device are measured and in some instances calculated. Thus two time-stamps, one of the sample's entry moment and one of the sample's leave moment are input as data to the feedback loop controller. Its output data is a control signal which adjusts the effective sampling rate of the device, as shown in the
For all audio streaming systems:
Previous solutions have been based on maintaining a number of samples in the audio stream buffer. When the number of samples grew above a predefined “watermark”, the effective sampling rate (consumption rate) was increased and the level of buffered data went down. When the number of samples dropped below the watermark, the effective sampling rate was decreased and the level of buffered data went up.
It should be noted that changes in the level of buffering is another manifestation of change of audio stream delay. From this point of view, maintaining a constant level of buffering is a way to maintain a constant device delay time. The main disadvantage of the previous solution is its low accuracy. To determine when the consumption rate needed to be adjusted, the number of buffer samples had to be at least one sample above or below watermark, i.e. variation of device group delay had to be more or equal than one sampling period. For example, for sampling rate 16 kHz variations of the device group delay would be >62 μsec. Such accuracy was not sufficient to prevent all audio artifacts listed above, e.g. “image shift” effect for binaural system.
The main difference of the present subject matter is that it has the ability to measure the device delay and maintain it equal to a preconfigured value much more accurately. The present subject matter maintains variations of device delay of an audio stream constant close to its preconfigured value with accuracy (absolute value and variations) better than 10 microseconds, in an embodiment.
In a typical wireless system, samples are transmitted over the communication channel in packets. It is assumed that the moment of start (or end) of packet reception can be time-stamped with high accuracy by reading a timer value from the associated firmware code, e.g. interrupt service routine (ISR) of the direct memory access (DMA) channel between CPU and radio chip. On the diagram shown in
Error=(DepartureTimeStamp−ArrivalTimeStamp)−PreConfiguredGroupDelay
In various embodiments, the error value is then used to calculate an adjustment stimulus for the sample rate actuator using one of algorithms discussed in process control theory, e.g. a proportional-integral-derivative (PID) controller algorithm.
Calculation of Departure Timestamp
In some circumstances, accurate measuring of the departure time requires additional calculations. Examples include multi-sample block DAC DMA transfer and using FD SRC as a sample rate actuator.
DepartureTimeStamp=DacDmaIsrTimeStamp+j·Tsamp−FD·Tsamp
Simple Example of Calculation of Sample Rate Adjustment Stimulus for FD SRC
A number of complex and sophisticated algorithms offered by the process control theory can be used to provide fast convergence, minimize variations and maintain stability of the device group delay. The following formula is a simple example of such a calculation, which provides the required quality.
where
φinc—Phase increment of FD SRC
TAi—Arrival timestamp of i-th packet
Nsamp—Number of samples per packet
Tsamp—Sampling period in timestamp units
Limited accuracy of arrival timestamp, jitter, rounding errors and other factors can lead to drift and variations of the device group delay. In order to lock device group delay to the preconfigured value, one more term has to be added to the above formula:
where
Error—Error signal calculated by the feedback loop controller (see above
α—Error gain
As mentioned above, the phase increment can be used as an interface to FD SRC to control the sampling rate conversion ratio.
Optimization of System Total Throughput Delay
In order to minimize system total throughput delay, the preconfigured value for the device group delay should be minimal, but sufficient to accommodate the longest branch of the signal processing scheme. If the signal processing scheme changes (e.g. different type of codec has been selected or packet loss concealment mechanism has been enabled or disabled), this value can be reconfigured to optimize system total throughput delay.
Various embodiments create an artificial intelligence (AI) system, which can track processing time over the different branches of the processing scheme and automatically reconfigure the value of the device group delay in order to minimize total system throughput delay. In this case, if such a receiver is used in a binaural system, a preconfigured value of device group delay time must be synchronized between receivers of the left and right channels.
Additional Embodiments
Source
The following formula can be used to calculate the feedback stimulus in case of using FD SRC as a sampling rate actuator:
Source/Sink
The following example assumes that transmission and reception over the wireless link are performed alternately. This means that external packet rates for reception and transmission are in sync. Thus either transmission or reception external packet rate can be used for sampling rate synchronization (in
Since SysClk equally affects the source and sink sampling rate, only one adjustment stimulus needs to be calculated by the feedback loop controller in case where SysClk is used as a sample rate actuator. In the case where FD SRC is used as an actuator, two phase increment values need to be calculated: for sink and source FD SRC instances (Rx FD SRC and Tx FD SRC in
Relay
The relay device forwards packets received from the input wireless link (Rx Link in
FD SRC Actuator of the Present Subject Matter Versus SysClk Actuator
Each of actuators has its advantages and disadvantages.
Advantages of the SysClk based sampling rate actuator:
In various embodiments, bidirectional audio streaming is used to support phone calls via hearing aid devices linked with a Cell Phone/Entertainment Device (CPED). Two-way communication between the hearing aid devices and the CPED is performed using TDD with two time slots as show in
When using TDD communication channel, incoming and outgoing audio streams are synchronized in order to avoid buffers overflow or underflow as well as noticeable audio artifacts. The present subject matter firmly synchronizes the number of incoming and outgoing samples per packet period without distorting quality of the audio stream.
The method described herein is applicable to a system where a FD SRC is used for synchronization of the device sample rate with external packet rate. The idea of the method is to generate one outgoing sample for each consumed incoming sample. As it is shown in
A block diagram of a previous implementation of a device with bidirectional audio streaming is shown in
source_φinc=sink_φinc−1
The value of sink_φinc is calculated and then source_φinc is calculated as a reciprocal. The problem is that in this case only the formula for source_φinc contains the feedback term and the formula for source_φinc does not. As a result device latency for the outgoing audio stream will vary (e.g. due to limited accuracy of computations) and such variation will not be compensated.
In previous solutions, the system clock rate of the sink device was selected so that the sampling rate of the sink was as close as possible to the sampling rate of the source but above it. For the incoming audio stream the number of samples received in one packet was equal or less than number of samples sent to the output in the packet period. If number of samples was less than required, zeros were inserted instead of missing samples. Typically, one zero sample was inserted after a few packets. For the outgoing audio stream the number of samples generated by the source in one packet period was equal to more than the number of samples. As a result, one of samples was occasionally discarded. Of course, inserting zeros and dropping “extra” samples resulted in audible distortions of the incoming and outgoing audio streams.
The present subject matter provides for outgoing FD SRC generating the same number of samples as is consumed by the incoming FD SRC. TDD external packet rate is the same for incoming and outgoing packets. If packet size is the same for the incoming and outgoing audio streams, input incoming and outgoing sample rates are also the same. We assume the sampling rate of input/output peripherals (e.g. ADC/DAC) are also the same. As is shown in
Incoming fractional delay is calculated as an intermediate result by the incoming FD SRC as shown in
To produce an outgoing sample by interpolator of the outgoing FD SRC “outgoing” fractional delay has to be calculated:
The following conversion expresses FD2 through FD1:
Using the formula above, it is possible to calculate outgoing fractional (FD2) delay through incoming fractional delay (FD1) and current phase increment value of the incoming FD SRC (φinc1). In this way, one outgoing output sample can be calculated for each incoming input sample. This ensures equality of numbers of incoming input samples and outgoing output samples per packet, completely, eliminating possibility of outgoing buffer overflow or underflow.
As a result, instead of two unidirectional FD SRC modules, we end up with one bidirectional FD SRC. A block diagram of such a bidirectional FD SRC is shown in
In the case where zero samples were copied, the outgoing interpolator reads one sample from the outgoing input buffer to the history buffer of the outgoing interpolator, but does not produce any output samples. In the case where more than one sample was copied, the outgoing interpolator reads one sample from the outgoing input buffer to the history buffer of the outgoing interpolator, and generates the same number of outgoing output samples using the following formula for calculation of the fractional delay of the ith sample:
Where
i—index of the outgoing output sample from 0 to (N−1)
N—number of samples copied from the incoming input buffer to the history buffer of the incoming interpolator to produce one output incoming sample
FD1—fractional delay calculated by the NCO of bidirectional FD SRC
φinc
The present subject matter can be applied for the case where sample rate of the outgoing audio stream is synchronized with external packet rate and interpolator parameters for the incoming audio sample are calculated from the interpolator parameters for the outgoing audio stream. The following formula can be used to calculate fractional delay of the incoming sample:
Advantages of the present subject matter include preventing underflow or overflow of the outgoing audio buffer in bidirectional TDD systems by locking the number of incoming and outgoing samples, improved quality of synchronization of incoming and outgoing sample rates that is better than provided by two independent FD SRC modules, and the present subject matter consumes less MIPS and memory than two independent FD SRC modules.
Various embodiments of the present subject matter support wireless communications with a hearing assistance device. In various embodiments the wireless communications can include standard or nonstandard communications. Some examples of standard wireless communications include link protocols including, but not limited to, Bluetooth™ IEEE 802.11 (wireless LANs), 802.15 (WPANs), 802.16 (WiMAX), cellular protocols including, but not limited to CDMA and GSM, ZigBee, and ultra-wideband (UWB) technologies. Such protocols support radio frequency communications and some support infrared communications. Although the present system is demonstrated as a radio system, it is possible that other forms of wireless communications can be used such as ultrasonic, optical, and others. It is understood that the standards which can be used include past and present standards. It is also contemplated that future versions of these standards and new future standards may be employed without departing from the scope of the present subject matter.
The wireless communications support a connection from other devices. Such connections include, but are not limited to, one or more mono or stereo connections or digital connections having link protocols including, but not limited to 802.3 (Ethernet), 802.4, 802.5, USB, ATM, Fibre-channel, Firewire or 1394, InfiniBand, or a native streaming interface. In various embodiments, such connections include all past and present link protocols. It is also contemplated that future versions of these protocols and new future standards may be employed without departing from the scope of the present subject matter.
It is understood that variations in communications protocols, antenna configurations, and combinations of components may be employed without departing from the scope of the present subject matter, Hearing assistance devices typically include an enclosure or housing, a microphone, hearing assistance device electronics including processing electronics, and a speaker or receiver. Processing electronics include a controller or processor, such as a digital signal processor (DSP), in various embodiments. Other types of processors may be used without departing from the scope of this disclosure. It is understood that in various embodiments the microphone is optional. It is understood that in various embodiments the receiver is optional. Antenna configurations may vary and may be included within an enclosure for the electronics or be external to an enclosure for the electronics. Thus, the examples set forth herein are intended to be demonstrative and not a limiting or exhaustive depiction of variations.
It is understood that the hearing aids referenced in this patent application include a processor. The processor may be a digital signal processor (DSP), microprocessor, microcontroller, other digital logic, or combinations thereof. The processing of signals referenced in this application can be performed using the processor. Processing may be done in the digital domain, the analog domain, or combinations thereof, Processing may be done using subband processing techniques. Processing may be done with frequency domain or time domain approaches. Some processing may involve both frequency and time domain aspects. For brevity, in some examples drawings may omit certain blocks that perform frequency synthesis, frequency analysis, analog-to-digital conversion, digital-to-analog conversion, amplification, and certain types of filtering and processing. In various embodiments the processor is adapted to perform instructions stored in memory which may or may not be explicitly shown. Various types of memory may be used, including volatile and nonvolatile forms of memory. In various embodiments, instructions are performed by the processor to perform a number of signal processing tasks. In such embodiments, analog components are in communication with the processor to perform signal tasks, such as microphone reception, or receiver sound embodiments (i.e., in applications where such transducers are used). In various embodiments, different realizations of the block diagrams, circuits, and processes set forth herein may occur without departing from the scope of the present subject matter.
The present subject matter can be used for a variety of hearing assistance devices, including but not limited to, cochlear implant type hearing devices, hearing aids, such as behind-the-ear (BTE), in-the-ear (ITE), in-the-canal (ITC), invisible-in-the-canal (IIC) or completely-in-the-canal (CIC) type hearing aids. It is understood that behind-the-ear type hearing aids may include devices that reside substantially behind the ear or over the ear. Such devices may include hearing aids with receivers associated with the electronics portion of the behind-the-ear device, or hearing aids of the type having receivers in the ear canal of the user. Such devices are also known as receiver-in-the-canal (RIC) or receiver-in-the-ear (RITE) hearing instruments. It is understood that other hearing assistance devices not expressly stated herein may fall within the scope of the present subject matter. Further, the present subject matter can be used for persons without hearing impairment that may be using wireless, or wired headphone and earbud devices for listening to audio streams.
This application is intended to cover adaptations or variations of the present subject matter. It is to be understood that the above description is intended to be illustrative, and not restrictive. The scope of the present subject matter should be determined with reference to the appended claims, along with the full scope of legal equivalents to which such claims are entitled.
The present application is a continuation of U.S. patent application Ser. No. 15/248,287, filed Aug. 26, 2016, which claims the benefit under 35 U.S.C. § 119(e) of U.S. Provisional Patent Application No. 62/211,242, filed Aug. 28, 2015, and of U.S. Provisional Patent Application No. 62/211,245, filed Aug. 28, 2015, the disclosures of which are hereby incorporated by reference herein in their entirety.
Number | Name | Date | Kind |
---|---|---|---|
5355363 | Takahashi et al. | Oct 1994 | A |
5666428 | Farinelli et al. | Sep 1997 | A |
5776797 | Nicewarner, Jr. et al. | Jul 1998 | A |
7339503 | Elenes | Mar 2008 | B1 |
7414550 | Sudharsanan | Aug 2008 | B1 |
7715578 | Zhu et al. | May 2010 | B2 |
8405532 | Clark et al. | Mar 2013 | B1 |
20050099341 | Zhang et al. | May 2005 | A1 |
20050282568 | Keerthi | Dec 2005 | A1 |
20070086610 | Niederdrank | Apr 2007 | A1 |
20080055123 | Buys | Mar 2008 | A1 |
20100202642 | LoPresti et al. | Aug 2010 | A1 |
20100208905 | Franck et al. | Aug 2010 | A1 |
20120308061 | Zhu et al. | Dec 2012 | A1 |
20130123919 | Goldstein et al. | May 2013 | A1 |
20130243203 | Franck | Sep 2013 | A1 |
20140321685 | Rabel | Oct 2014 | A1 |
20150071281 | Shiotani | Mar 2015 | A1 |
20150161145 | Butters | Jun 2015 | A1 |
20150289065 | Jensen et al. | Oct 2015 | A1 |
20170064651 | Volkov et al. | Mar 2017 | A1 |
Number | Date | Country |
---|---|---|
2355387 | Aug 2011 | EP |
2736274 | May 2014 | EP |
2897384 | Jul 2015 | EP |
Entry |
---|
“U.S. Appl. No. 15/248,287, Advisory Action dated Jun. 20, 2019”, 3 pgs. |
“U.S. Appl. No. 15/248,287, Advisory Action dated Jun. 23, 2020”, 3 pgs. |
“U.S. Appl. No. 15/248,287, Advisory Action dated Jul. 2, 2021”, 3 pgs. |
“U.S. Appl. No. 15/248,287, Final Office Action dated Mar. 18, 2020”, 18 pgs. |
“U.S. Appl. No. 15/248,287, Final Office Action dated Apr. 9, 2019”, 16 pgs. |
“U.S. Appl. No. 15/248,287, Final Office Action dated Apr. 23, 2021”, 20 pgs. |
“U.S. Appl. No. 15/248,287, Non Final Office Action dated Jul. 26, 2018”, 17 pgs. |
“U.S. Appl. No. 15/248,287, Non Final Office Action dated Sep. 3, 2019”, 17 pgs. |
“U.S. Appl. No. 15/248,287, Non Final Office Action dated Sep. 16, 2020”, 18 pgs. |
“U.S. Appl. No. 15/248,287, Response filed May 18, 2020 to Final Office Action dated Mar. 18, 2020”, 9 pgs. |
“U.S. Appl. No. 15/248,287, Response filed Jun. 10, 2019 to Final Office Action dated Apr. 9, 2019”, 9 pgs. |
“U.S. Appl. No. 15/248,287, Response filed Jun. 23, 2021 to Final Office Action dated Apr. 23, 2021”, 10 pgs. |
“U.S. Appl. No. 15/248,287, Response filed Oct. 23, 2018 to Non Final Office Action dated Jul. 26, 2018”, 8 pgs. |
“U.S. Appl. No. 15/248,287, Response filed Dec. 3, 2019 to Non Final Office Action dated Sep. 3, 2019”, 8 pgs. |
“U.S. Appl. No. 15/248,287, Response filed Dec. 16, 2020 to Non Final Office Action dated Sep. 16, 2020”, 9 pgs. |
“European Application Serial No. 16186053.1, Communication Pursuant to Article 94(3) EPC dated Jun. 21, 2018”, 9 pgs. |
“European Application Serial No. 16186053.1, Extended European Search Report dated Feb. 6, 2017”, 13 pgs. |
Akester, R, et al., “A new audio skew detection and correction algorithm”, Proceedings/2002 IEEE International conference on multimedia and expo, (Aug. 2002), 261-264. |
Blok, Marek, et al., “Fractional delay filter design for sample rate conversion”, Computer Science and information systems (FEDCSIS) 2012 Federated conference on IEEE, (Sep. 9, 2012), 701-706. |
Kleider, John, et al., “On the Performance of Variable Fractional Delay Arbitrary Sample Rate Conversion for Digital Signals”, 2014 IEEE Military Communications Conference, (Oct. 6, 2014), 724-730. |
Number | Date | Country | |
---|---|---|---|
20210410090 A1 | Dec 2021 | US |
Number | Date | Country | |
---|---|---|---|
62211242 | Aug 2015 | US | |
62211245 | Aug 2015 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 15248287 | Aug 2016 | US |
Child | 17443310 | US |