Hello:)
I would like to know how to change the bitresoultion to 8 bits for the keil usb audio descriptors
I have tried to change bSubFrameSize to 0x01 bBitResolution to 8 then WBVAL to 34 and I get bsod error on computer and it does not work I am running winxp.
I would like to run the usb speaker at 8bit resolution and 32000khz could you please help me make the changes to the descriptors
/* Audio Type I Format */ AUDIO_FORMAT_TYPE_I_DESC_SZ(1), /* bLength */ AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */ AUDIO_STREAMING_FORMAT_TYPE, /* bDescriptorSubtype */ AUDIO_FORMAT_TYPE_I, /* bFormatType */ 0x01, /* bNrChannels */ 0x02, /* bSubFrameSize */ 16, /* bBitResolution */ 0x01, /* bSamFreqType */ B3VAL(32000), /* tSamFreq */ /* Endpoint - Standard Descriptor */ AUDIO_STANDARD_ENDPOINT_DESC_SIZE, /* bLength */ USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */ USB_ENDPOINT_OUT(3), /* bEndpointAddress */ USB_ENDPOINT_TYPE_ISOCHRONOUS, /* bmAttributes */ WBVAL(64), /* wMaxPacketSize */ 0x01, /* bInterval */ 0x00, /* bRefresh */ 0x00, /* bSynchAddress */
/* Audio Definitions */ #define DATA_FREQ 32000 /* Audio Data Frequency */ #define P_S 32 /* Packet Size */ #if USB_DMA #define P_C 4 /* Packet Count */ #else #define P_C 1 /* Packet Count */ #endif #define B_S (8*P_C*P_S) /* Buffer Size */
thanks Mike pisces.
I was told to do it like this 1 * 1 *(32 + 1) 34 and we made changes so any value could be enter instead of just number of power of 2 2,4,6,8,16,32,64
X-posted:
www.microchip.com/.../fb.ashx
OK, we back from Microchip forum. :-) What is your MCU, and dev board? Also, which Keil example are you working on?
Tsuneo
It's this BlueBoard-LPC1768-H but nobody posts on that forum but it is keil code and uvision is used
It's this usbaudio sample code
www.standardics.nxp.com/.../code.bundle.lpc17xx.keil.zip
Do you know what is happing? why I have to change to 10bit for it to even work? am I getting Quantization error, do I need a 8bit timer?
with you saying
PCM (0x0001) means 2's complementary binary data
it made me think of bSubFrameSize or
0x02, // bLockDelayUnits (Decoded PCM Samples) 0x00, // wLockDelay (LSB) (512 Decoded PCM Samples) 0x02, // wLockDelay (MSB)
anything to do with
USB_MAX_PACKET0 64--- should be 32 maybe?
it can't read the samples properly? Timer 0 is 32bit?
--------------
it's not the execution time???
Timer Counter 0 Interrupt Service Routine * executed each 31.25us (32kHz frequency)
It is possible to do this right and get nice audio at 8bits?
I just thought, I would of thought most audio on pc is 16bit do I need to convert to 8bits, like including a lossless compression method in my code or is that built into windows usb drivers. Because it manages to play 16bit audio so it seems strange it cannot do the same for 8bit without needing anything extra?
Tsuneo Chinzei, do you have a email account So I can talk about some other stuff private with you;)
It would help if you explain what needs to be done in the code to make16bit resolution then I may understand what needs to be done to 8bit. I did not write these example myself, how can you possible except me to know these things.
I am not a student I can't ask teacher.
PCM (0x0001) means 2's complementary binary data. PCM8 (0x0002) means offset binary data.
Hi I have the MCB1700 board and would be interested in how to do this please.
Charlie