This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PCM2912A: PCM2912A/PCM290x selection and technical questions

Part Number: PCM2912A
Other Parts Discussed in Thread: HID2, PCM2704C, PCM2706C

Tool/software: Linux

Hi, 

Our customer is thinking about using USB to Audio solution to drive speaker for voice notification purpose.

I am looking for a suitable solution and have some question for PCM2912A and PCM290x

Since the speaker will not be close to USB source and CPU, there's only 1 USB cable connect in between roughly 2m long.

And there's a USB hub sits in between speaker and PCM29xx.

And the hub connects to NFC only. So the shared bandwidth should be enough

(NFC will be active only for authentication, and right when the user taps the NFC reader, a 3-15 recorded human voice will be played.)

1. Is it possible the audio performance gets affected by the USB hub itself?

2. Is Linux driver, e.g. Debian/Ubuntu/Raspbian/Yocto/Ubuntu-Core already available?

3. Are PCM2912A/PCM290x using USB Audio Class driver under Linux - ALSA?

4. The HID0~HID2 interrupts on PCM290x chip, if I use it as volume Up/Down/Mute switches. Upon pressing, does PCM290x sends HID interrupt via USB protocol to host. And PCM290x driver can already handle the request under Linux (e.g. Raspbian or Ubuntu-Core.

5. Since PCM2912A does not include HID interface, how to control volume for PCM2912A? 

6. Since we only need speaker, is there any simpler solution supports USB interface?

7. If any professional knowledge can be shared: How much USB data rate/bandwidth would I possibly need if just play a pre-recorded audio file when the user uses NFC for identity authentication.

  • Hi Chieh Wei Huang,

    Chieh Wei Huang said:
    1. Is it possible the audio performance gets affected by the USB hub itself?

    The PCM2912A is a USB audio codec that takes USB isochronous audio streaming packets and converts them into analog output and takes analog audio and converts them into USB isochronous audio streaming packets. A hub should route these digital USB streaming packets properly and should not affect the audio performance unless the hub is not able to handle all the USB traffic or degrades the USB signals due to poor routing. These devices support full-speed transfer compatible with USB 2.0 Specification under USB Audio 1.0 Class device specification (UAC 1.0).

    Chieh Wei Huang said:
    2. Is Linux driver, e.g. Debian/Ubuntu/Raspbian/Yocto/Ubuntu-Core already available?

    The device transfers USB data in standard USB isochronous audio streaming packets. These are natively handled by Windows, Mac, and Linux OS under their respective USB audio codec device driver.

    Chieh Wei Huang said:
    3. Are PCM2912A/PCM290x using USB Audio Class driver under Linux - ALSA?

    These devices will enumerate as USB Audio codec using the USB Audio Class driver with:

    • Adaptive Isochronous Transfer for Playback
    • Asynchronous-Isochronous Transfer for Record

    So the ALSA driver should identify these devices as a USB sound card.

    Chieh Wei Huang said:
    The HID0~HID2 interrupts on PCM290x chip, if I use it as volume Up/Down/Mute switches. Upon pressing, does PCM290x sends HID interrupt via USB protocol to host. And PCM290x driver can already handle the request under Linux (e.g. Raspbian or Ubuntu-Core.

    These pins are converted to HID Interface and its endpoint reports the status of the pin every 32 msec. The native HID device driver on Windows, Mac, and Linux OS should be able to interpret these without additional drivers as mute, volume up, and volume down.

     

    Chieh Wei Huang said:
    5. Since PCM2912A does not include HID interface, how to control volume for PCM2912A? 

    The volume is controlled by the host sending in the endpoint 0 (control interface) a specific command to the feature unit. Please refer to Section 0.5.1.2 of the PCM2912A data sheet. This is supported by the native audio class driver.

    Chieh Wei Huang said:
    6. Since we only need speaker, is there any simpler solution supports USB interface?

    The PCM29xx products are all codecs. The PCM270xC are stereo Audio DAC with USB interface. The PCM2706C has 7 external HID Interrupts (mute, volume up, volume down, next track, previous track, play/pause, and stop). PCM2704C has 3 external HID interrupts (mute, volume up, volume down)

    Chieh Wei Huang said:
    7. If any professional knowledge can be shared: How much USB data rate/bandwidth would I possibly need if just play a pre-recorded audio file when the user uses NFC for identity authentication.

    This depends on the length of the audio to be played, mono or stereo, data width, and its sample rate. The data transmitted is 8- or 16-bits at 32, 44.1, or 48kHz. These devices utilize UAC 1.0 at USB 2.0 Full speed in 1msec packets. Thus, you can compute the amount of data and break it up into 1msec packets and add the overheads of the start fo frames per packet. This will also be affected by whatever else is transmitting on the bus and how it is polled and responded by the host.

    best regards,

      Pedro