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.

PCM2906C: Distinction of Multiple USB Audio Codecs from Software

Part Number: PCM2906C

We are connecting multiple (up to 4) devices that are based on PCM2906C Audio Codec to one linux machine. The devices are properly detected as audio cards and sensor-data can be recorded from them via an ALSA API.

Now we need a way to distinguish the devices from inside our software. From the datasheet it is clear that PCM2906C does not support serial numbers. Is there any other way to uniquely identify each device from Software? Or is there a way to modify values such as Vendor ID or Product ID of an already purchased device? In the data sheet it is stated that the values of 0x08BB for Vendor ID and 0x2906 for Product ID are defaults that may be modified.

  • The changes to the vendor/product ID requires changing the mask which is not possible for a finished product.

    By the way where do you see vendor/product id can be modified in the datasheet?

    Regards,

  • Hi, thank you for your reply.

    I just saw that this information is not from the PCM2906C datasheet but from the PCM2906 one. There it says on page 19 in table 3 that Vendor ID & Product ID are default values that can be modified. Maybe it is to say that they can be changed in production process if the buyer wishes to. However in our case this would not apply as we purchesa the codecs built into a measurement device.

    We have found a workaround using udev rules to distiguish the devices by USB port, this works for now. I would still be interested if there is any way, any information that we can read from the device either through ALSA or the USB device information directly that may distinguish them.

    Thanks again and best regards

    Richard

  • Good to know.

    Let me ask our Linux expert if there's such a way.

  • Hi Richard,

    From Linux, we can distinguish devices by querying the PCM or sound cards. you can use below commands to get that:

    #cat /proc/asound/pcm

    #cat /proc/asound/cards

    ALSA API can use device ID to select which device will be used.

    Thanks & Best Regards

    Kevin Lu

    Application Engineer

  • Hi Kevin,

    thank you for your reply.

    I was actually looking for a unique identifier of the device like a serial number or similar. We were able to distinguish the devices via their device ID before but the problem was that the device ID was not fixed to the device when the system was rebooting. Sometimes after rebooting the device IDs would be switched, depending on which device by chance would power up faster.

    We have managed to mitigate this problem by changing the udev and ALSA rules in Linux to attach a specific device name to each USB port as they were numbered on the USB-hub. Now when a device is connected to say USB port 3 on the USB-hub it will always be assigned the device name "sound_usb_3"

    Thank you very much again and have a good week

    Best

    Richard