Lines Matching refs:vs
86 struct virtio_pcm_stream *vs; in virtsnd_chmap_parse_cfg() local
94 vs = &vpcm->streams[SNDRV_PCM_STREAM_PLAYBACK]; in virtsnd_chmap_parse_cfg()
97 vs = &vpcm->streams[SNDRV_PCM_STREAM_CAPTURE]; in virtsnd_chmap_parse_cfg()
106 vs->nchmaps++; in virtsnd_chmap_parse_cfg()
122 struct virtio_pcm_stream *vs) in virtsnd_chmap_add_ctls() argument
127 for (i = 0; i < vs->nchmaps; i++) in virtsnd_chmap_add_ctls()
128 if (max_channels < vs->chmaps[i].channels) in virtsnd_chmap_add_ctls()
129 max_channels = vs->chmaps[i].channels; in virtsnd_chmap_add_ctls()
131 return snd_pcm_add_chmap_ctls(pcm, direction, vs->chmaps, max_channels, in virtsnd_chmap_add_ctls()
146 struct virtio_pcm_stream *vs; in virtsnd_chmap_build_devs() local
153 vs = &vpcm->streams[i]; in virtsnd_chmap_build_devs()
155 if (!vs->nchmaps) in virtsnd_chmap_build_devs()
158 vs->chmaps = devm_kcalloc(&vdev->dev, vs->nchmaps + 1, in virtsnd_chmap_build_devs()
159 sizeof(*vs->chmaps), in virtsnd_chmap_build_devs()
161 if (!vs->chmaps) in virtsnd_chmap_build_devs()
164 vs->nchmaps = 0; in virtsnd_chmap_build_devs()
180 vs = &vpcm->streams[SNDRV_PCM_STREAM_PLAYBACK]; in virtsnd_chmap_build_devs()
182 vs = &vpcm->streams[SNDRV_PCM_STREAM_CAPTURE]; in virtsnd_chmap_build_devs()
184 chmap = &vs->chmaps[vs->nchmaps++]; in virtsnd_chmap_build_devs()
207 vs = &vpcm->streams[i]; in virtsnd_chmap_build_devs()
209 if (!vs->nchmaps) in virtsnd_chmap_build_devs()
212 rc = virtsnd_chmap_add_ctls(vpcm->pcm, i, vs); in virtsnd_chmap_build_devs()