mPcm = pcm_open(0, 0, flags, &config);
//Why it always uses Card 0 and device 0.
//does this mean it can not support multi-devices
On the platforms I've worked with, all audio devices except for USB were located on card 0. I'm not saying that it's a good idea to hardcode card and device numbers - just that it's usually not going to be a real problem in practice. Until you start adding more cards..
On those platforms, the ALSA card/device number of the USB audio accessory would be picked up by the WiredAccessoryManager
(or the UsbDeviceManager in the case of host-mode accessories) (this is in the Java layers of Android). So the information is available if you want to avoid having the audio HAL hardcoding the card/device numbers for USB audio accessories (but I suspect that there are implementations that simply assume card 1 for USB audio accessories).
Here's a link to the audio HAL implementation at the CodeAurora Forum, which serves as the sort-of reference implementation for a lot of Qualcomm's platforms. And here's the driver for host-mode USB audio accessories (Android Open Accessory).