INCREASED SPEED OF PROCESSING OF AUDIO SAMPLES RECEIVED OVER A SERIAL COMMUNICATIONS LINK BY USE OF CHANNEL MAP AND STEERING TABLE
First Claim
1. A method for processing sampled data received over a serial bus from a device, the method comprising:
- receiving a device descriptor, the device descriptor containing channel ordering information describing a channel order within a frame of sample data;
generating a channel map from the channel order, the channel map having beginning addresses for channels in a plurality of channel buffers;
generating a sample buffer of data, the sample buffer of data indexed and having an initial index value, offset values associated with each index value and a stride size and a multiplier value related to the stride size;
receiving packets containing data samples divided into frames; and
while there are unprocessed packets among the received packets;
loading a sample buffer with sample data from the received packet;
selecting a frame within the packet according to a frame index value;
selecting a beginning data sample within the frame;
reading from the channel map a starting address for a buffer within the plurality of channel buffers from the channel map, the starting address located at an index within the channel map that corresponds to an index position within the frame in which the data sample is located;
reading an address offset from the sample buffer;
reading from the stride map a stride size associated with data samples stored in the sample buffer;
generating an address within a buffer in the plurality of channel buffers by adding the starting address to the product of the offset value, the stride size multiplier value, and the size of the sample;
writing data from the sample buffer into the buffer in the plurality of channel buffers at the generated address;
if an end of frame is reached, then resetting the frame index value to an initial value, incrementing the sample buffer index;
if an end of frame is not reached, then incrementing the sample frame index and incrementing the sample buffer index.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for processing data samples utilizes a channel map populated by device descriptor, or by an application program interface. Packet processing code loops through all of the samples contained in a packet while incrementing through a channel map and steering table without having to look up a table to determine in what audio buffer the sample is to be stored or read. Additionally, the present invention utilizes a stride map, so the audio subsystem knows how many samples to skip in order to reach the next sample frame. The present invention can be used for handling received packets as well as forming packets to send over a bus.
-
Citations
25 Claims
-
1. A method for processing sampled data received over a serial bus from a device, the method comprising:
-
receiving a device descriptor, the device descriptor containing channel ordering information describing a channel order within a frame of sample data;
generating a channel map from the channel order, the channel map having beginning addresses for channels in a plurality of channel buffers;
generating a sample buffer of data, the sample buffer of data indexed and having an initial index value, offset values associated with each index value and a stride size and a multiplier value related to the stride size;
receiving packets containing data samples divided into frames; and
while there are unprocessed packets among the received packets;
loading a sample buffer with sample data from the received packet;
selecting a frame within the packet according to a frame index value;
selecting a beginning data sample within the frame;
reading from the channel map a starting address for a buffer within the plurality of channel buffers from the channel map, the starting address located at an index within the channel map that corresponds to an index position within the frame in which the data sample is located;
reading an address offset from the sample buffer;
reading from the stride map a stride size associated with data samples stored in the sample buffer;
generating an address within a buffer in the plurality of channel buffers by adding the starting address to the product of the offset value, the stride size multiplier value, and the size of the sample;
writing data from the sample buffer into the buffer in the plurality of channel buffers at the generated address;
if an end of frame is reached, then resetting the frame index value to an initial value, incrementing the sample buffer index;
if an end of frame is not reached, then incrementing the sample frame index and incrementing the sample buffer index. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for processing sampled data received over a serial bus from a device, the method comprising:
-
receiving a request for data stored in packets, the packets divided into frames;
until all requested audio data is packetized;
reading a start address from a channel map;
reading an address offset from an indexed position within a sample buffer having data samples, the data samples having sizes;
reading a multiplier from a stride map;
generating an address by adding the start address to the product of the address offset multiplied by the multiplier from the stride map multiplied by the size of a data sample;
reading sample data stored in a buffer, the data corresponding to the generated address;
writing the read data to a packet;
if an end of frame is reached in the read sample data, then setting a sample frame index to an initial value, and incrementing the sample buffer index; and
if an end of frame is not reached, then incrementing the sample frame index and incrementing the sample buffer index; and
sending the packets in response to the received request for sample data. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A method for transmitting sample data across a serial network connection, the method comprising:
-
receiving a device descriptor, the device descriptor containing channel ordering information describing a channel order within a frame of sample data;
generating a channel map from the channel order, the channel map having beginning addresses for channels in a plurality of channel buffers;
generating a sample buffer of data, the sample buffer of data indexed and having an initial index value, offset values associated with each index value and a stride size and a multiplier value related to the stride size;
receiving packets containing data samples divided into frames; and
while there are unprocessed packets among the received packets;
selecting a frame within the packet according to a frame index value;
selecting a beginning data sample within the frame;
reading from the channel map a starting address for a buffer within the plurality of channel buffers from the channel map, the starting address located at an index within the channel map that corresponds to an index position within the frame in which the data sample is located;
reading an address offset from the sample buffer;
reading from the stride map a stride size associated with data samples stored in the sample buffer;
generating an address within a buffer in the plurality of channel buffers by adding the starting address to the product of the offset value, the stride size multiplier value, and the size of the sample;
writing data from the sample buffer into the buffer in the plurality of channel buffers at the generated address;
if an end of frame is reached, then resetting the sample frame index to an initial value, incrementing the sample buffer index;
if an end of frame is not reached, then incrementing the sample frame index and incrementing the sample buffer index;
receiving a request for data stored in packets, wherein the packets are divided into frames;
until all requested audio data is packetized;
reading a start address from the channel map;
reading an address offset from the sample buffer;
reading a multiplier from a stride map;
generating an address by adding the start address to the product of the address offset multiplied by the multiplier from the stride map multiplied by the size of a data sample;
reading sample data stored in a buffer, the data corresponding to the generated address;
writing the read data to a packet;
if an end of frame is reached in the read sample data, then setting a sample frame index to an initial value, and incrementing the sample buffer index; and
if an end of frame is not reached, then incrementing the sample frame index and incrementing the sample buffer index; and
sending the packets in response to the received request for sample data.
-
-
18. An apparatus for processing sampled data received over a serial bus from a device, the apparatus comprising:
-
a driver, the driver in communication with at least one device;
a sample data buffer, the sample data buffer having offset values, stride sizes and containing sampled data, the sampled data having sample sizes;
a channel map, the channel map comprising beginning addresses for channels within buffers in a plurality of buffers; and
a stride map, the stride map indicating multiplier values for sample data; and
a connection between the plurality of buffers and an operating system;
wherein data is published to the operating system when it is written to buffers in the plurality at an address calculated by adding an address value for a beginning address in the channel map to the product of an offset value multiplied by a stride size multiplied by a sample size.
-
-
19. An apparatus for processing sampled data received over a serial bus from a device, the method comprising:
-
means for receiving a device descriptor, the device descriptor containing channel ordering information describing a channel order within a frame of sample data;
means for generating a channel map from the channel order, the channel map having beginning addresses for channels in a plurality of channel buffers;
means for generating a sample buffer of data, the sample buffer of data indexed and having an initial index value, offset values associated with each index value and a stride size and a multiplier value related to the stride size;
means for receiving packets containing data samples divided into frames; and
means for, while there are unprocessed packets among the received packets;
loading a sample buffer with sample data from the received packet;
selecting a frame within the packet according to a frame index value;
selecting a beginning data sample within the frame;
reading from the channel map a starting address for a buffer within the plurality of channel buffers from the channel map, the starting address located at an index within the channel map that corresponds to an index position within the frame in which the data sample is located;
reading an address offset from the sample buffer;
reading from the stride map a stride size associated with data samples stored in the sample buffer;
generating an address within a buffer in the plurality of channel buffers by adding the starting address to the product of the offset value, the stride size multiplier value, and the size of the sample;
writing data from the sample buffer into the buffer in the plurality of channel buffers at the generated address;
if an end of frame is reached, then resetting the frame index value to an initial value, incrementing the sample buffer index;
if an end of frame is not reached, then incrementing the sample frame index and incrementing the sample buffer index. - View Dependent Claims (20, 21, 22, 23, 24, 25)
-
Specification