// SPDX-License-Identifier: GPL-2.0+ /* * virtio-snd: Virtio sound device * Copyright (C) 2021 OpenSynergy GmbH */ #include <linux/virtio_config.h> #include "virtio_card.h" /* VirtIO->ALSA channel position map */ static const u8 g_v2a_position_map[] = …; /** * virtsnd_chmap_parse_cfg() - Parse the channel map configuration. * @snd: VirtIO sound device. * * This function is called during initial device initialization. * * Context: Any context that permits to sleep. * Return: 0 on success, -errno on failure. */ int virtsnd_chmap_parse_cfg(struct virtio_snd *snd) { … } /** * virtsnd_chmap_add_ctls() - Create an ALSA control for channel maps. * @pcm: ALSA PCM device. * @direction: PCM stream direction (SNDRV_PCM_STREAM_XXX). * @vs: VirtIO PCM stream. * * Context: Any context. * Return: 0 on success, -errno on failure. */ static int virtsnd_chmap_add_ctls(struct snd_pcm *pcm, int direction, struct virtio_pcm_stream *vs) { … } /** * virtsnd_chmap_build_devs() - Build ALSA controls for channel maps. * @snd: VirtIO sound device. * * Context: Any context. * Return: 0 on success, -errno on failure. */ int virtsnd_chmap_build_devs(struct virtio_snd *snd) { … }