alsa-pcm: add device to object path

Use card id and device in the object path.
This commit is contained in:
Wim Taymans 2020-02-04 18:01:48 +01:00
parent 41b47e726e
commit 1404cb4182

View file

@ -140,7 +140,7 @@ static int emit_node(struct impl *this, snd_ctl_card_info_t *cardinfo, snd_pcm_i
snprintf(dev, sizeof(dev), "%d", snd_pcm_info_get_device(pcminfo));
snprintf(subdev, sizeof(subdev), "%d", snd_pcm_info_get_subdevice(pcminfo));
snprintf(device_name, sizeof(device_name), "%s,%s", this->props.device, dev);
snprintf(path, sizeof(path), "alsa:pcm:%s:%s", snd_ctl_card_info_get_id(cardinfo), stream);
snprintf(path, sizeof(path), "alsa:pcm:%s:%s:%s", snd_ctl_card_info_get_id(cardinfo), dev, stream);
items[0] = SPA_DICT_ITEM_INIT(SPA_KEY_OBJECT_PATH, path);
items[1] = SPA_DICT_ITEM_INIT(SPA_KEY_API_ALSA_PATH, device_name);
items[2] = SPA_DICT_ITEM_INIT(SPA_KEY_API_ALSA_PCM_CARD, card);