~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/virtio/virtio_pcm.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/virtio/virtio_pcm.h (Version linux-6.12-rc7) and /sound/virtio/virtio_pcm.h (Version linux-3.10.108)


  1 /* SPDX-License-Identifier: GPL-2.0+ */             1 
  2 /*                                                
  3  * virtio-snd: Virtio sound device                
  4  * Copyright (C) 2021 OpenSynergy GmbH            
  5  */                                               
  6 #ifndef VIRTIO_SND_PCM_H                          
  7 #define VIRTIO_SND_PCM_H                          
  8                                                   
  9 #include <linux/atomic.h>                         
 10 #include <linux/virtio_config.h>                  
 11 #include <sound/pcm.h>                            
 12 #include <sound/pcm-indirect.h>                   
 13                                                   
 14 struct virtio_pcm;                                
 15 struct virtio_pcm_msg;                            
 16                                                   
 17 /**                                               
 18  * struct virtio_pcm_substream - VirtIO PCM su    
 19  * @snd: VirtIO sound device.                     
 20  * @nid: Function group node identifier.          
 21  * @sid: Stream identifier.                       
 22  * @direction: Stream data flow direction (SND    
 23  * @features: Stream VirtIO feature bit map (1    
 24  * @substream: Kernel ALSA substream.             
 25  * @pcm_indirect: Kernel indirect pcm structur    
 26  * @hw: Kernel ALSA substream hardware descrip    
 27  * @elapsed_period: Kernel work to handle the     
 28  * @lock: Spinlock that protects fields shared    
 29  *        substream operators.                    
 30  * @buffer_bytes: Current buffer size in bytes    
 31  * @hw_ptr: Substream hardware pointer value i    
 32  * @xfer_enabled: Data transfer state (0 - off    
 33  * @xfer_xrun: Data underflow/overflow state (    
 34  * @stopped: True if the substream is stopped     
 35  *           side.                                
 36  * @suspended: True if the substream is suspen    
 37  *             the device side at resume.         
 38  * @msgs: Allocated I/O messages.                 
 39  * @nmsgs: Number of allocated I/O messages.      
 40  * @msg_last_enqueued: Index of the last I/O m    
 41  * @msg_count: Number of pending I/O messages     
 42  * @msg_empty: Notify when msg_count is zero.     
 43  */                                               
 44 struct virtio_pcm_substream {                     
 45         struct virtio_snd *snd;                   
 46         u32 nid;                                  
 47         u32 sid;                                  
 48         u32 direction;                            
 49         u32 features;                             
 50         struct snd_pcm_substream *substream;      
 51         struct snd_pcm_indirect pcm_indirect;     
 52         struct snd_pcm_hardware hw;               
 53         struct work_struct elapsed_period;        
 54         spinlock_t lock;                          
 55         size_t buffer_bytes;                      
 56         size_t hw_ptr;                            
 57         bool xfer_enabled;                        
 58         bool xfer_xrun;                           
 59         bool stopped;                             
 60         bool suspended;                           
 61         struct virtio_pcm_msg **msgs;             
 62         unsigned int nmsgs;                       
 63         unsigned int msg_count;                   
 64         wait_queue_head_t msg_empty;              
 65 };                                                
 66                                                   
 67 /**                                               
 68  * struct virtio_pcm_stream - VirtIO PCM strea    
 69  * @substreams: VirtIO substreams belonging to    
 70  * @nsubstreams: Number of substreams.            
 71  * @chmaps: Kernel channel maps belonging to t    
 72  * @nchmaps: Number of channel maps.              
 73  */                                               
 74 struct virtio_pcm_stream {                        
 75         struct virtio_pcm_substream **substrea    
 76         u32 nsubstreams;                          
 77         struct snd_pcm_chmap_elem *chmaps;        
 78         u32 nchmaps;                              
 79 };                                                
 80                                                   
 81 /**                                               
 82  * struct virtio_pcm - VirtIO PCM device.         
 83  * @list: VirtIO PCM list entry.                  
 84  * @nid: Function group node identifier.          
 85  * @pcm: Kernel PCM device.                       
 86  * @streams: VirtIO PCM streams (playback and     
 87  */                                               
 88 struct virtio_pcm {                               
 89         struct list_head list;                    
 90         u32 nid;                                  
 91         struct snd_pcm *pcm;                      
 92         struct virtio_pcm_stream streams[SNDRV    
 93 };                                                
 94                                                   
 95 extern const struct snd_pcm_ops virtsnd_pcm_op    
 96                                                   
 97 int virtsnd_pcm_validate(struct virtio_device     
 98                                                   
 99 int virtsnd_pcm_parse_cfg(struct virtio_snd *s    
100                                                   
101 int virtsnd_pcm_build_devs(struct virtio_snd *    
102                                                   
103 void virtsnd_pcm_event(struct virtio_snd *snd,    
104                                                   
105 void virtsnd_pcm_tx_notify_cb(struct virtqueue    
106                                                   
107 void virtsnd_pcm_rx_notify_cb(struct virtqueue    
108                                                   
109 struct virtio_pcm *virtsnd_pcm_find(struct vir    
110                                                   
111 struct virtio_pcm *virtsnd_pcm_find_or_create(    
112                                                   
113 struct virtio_snd_msg *                           
114 virtsnd_pcm_ctl_msg_alloc(struct virtio_pcm_su    
115                           unsigned int command    
116                                                   
117 int virtsnd_pcm_msg_alloc(struct virtio_pcm_su    
118                           unsigned int periods    
119                                                   
120 void virtsnd_pcm_msg_free(struct virtio_pcm_su    
121                                                   
122 int virtsnd_pcm_msg_send(struct virtio_pcm_sub    
123                          unsigned long bytes);    
124                                                   
125 unsigned int virtsnd_pcm_msg_pending_num(struc    
126                                                   
127 #endif /* VIRTIO_SND_PCM_H */                     
128                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php