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 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.