xref: /linux/drivers/media/pci/cobalt/cobalt-alsa.h (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  *  ALSA interface to cobalt PCM capture streams
4  *
5  *  Copyright 2014-2015 Cisco Systems, Inc. and/or its affiliates.
6  *  All rights reserved.
7  */
8 
9 struct snd_card;
10 
11 struct snd_cobalt_card {
12 	struct cobalt_stream *s;
13 	struct snd_card *sc;
14 	unsigned int capture_transfer_done;
15 	unsigned int hwptr_done_capture;
16 	unsigned alsa_record_cnt;
17 	struct snd_pcm_substream *capture_pcm_substream;
18 
19 	unsigned int pb_size;
20 	unsigned int pb_count;
21 	unsigned int pb_pos;
22 	unsigned pb_filled;
23 	bool alsa_pb_channel;
24 	unsigned alsa_playback_cnt;
25 	struct snd_pcm_substream *playback_pcm_substream;
26 };
27 
28 int cobalt_alsa_init(struct cobalt_stream *s);
29 void cobalt_alsa_exit(struct cobalt_stream *s);
30