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

TOMOYO Linux Cross Reference
Linux/sound/pci/lx6464es/lx6464es.h

Version: ~ [ linux-6.0 ] ~ [ linux-5.19.12 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.71 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.146 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.215 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.260 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.295 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.330 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /* -*- linux-c -*- *
  3  *
  4  * ALSA driver for the digigram lx6464es interface
  5  *
  6  * Copyright (c) 2009 Tim Blechmann <tim@klingt.org>
  7  */
  8 
  9 #ifndef LX6464ES_H
 10 #define LX6464ES_H
 11 
 12 #include <linux/spinlock.h>
 13 #include <linux/atomic.h>
 14 
 15 #include <sound/core.h>
 16 #include <sound/pcm.h>
 17 
 18 #include "lx_core.h"
 19 
 20 #define LXP "LX6464ES: "
 21 
 22 enum {
 23     ES_cmd_free         = 0,    /* no command executing */
 24     ES_cmd_processing   = 1,    /* execution of a read/write command */
 25     ES_read_pending     = 2,    /* a asynchron read command is pending */
 26     ES_read_finishing   = 3,    /* a read command has finished waiting (set by
 27                                  * Interrupt or CancelIrp) */
 28 };
 29 
 30 enum lx_stream_status {
 31         LX_STREAM_STATUS_FREE,
 32 /*      LX_STREAM_STATUS_OPEN, */
 33         LX_STREAM_STATUS_SCHEDULE_RUN,
 34 /*      LX_STREAM_STATUS_STARTED, */
 35         LX_STREAM_STATUS_RUNNING,
 36         LX_STREAM_STATUS_SCHEDULE_STOP,
 37 /*      LX_STREAM_STATUS_STOPPED, */
 38 /*      LX_STREAM_STATUS_PAUSED */
 39 };
 40 
 41 
 42 struct lx_stream {
 43         struct snd_pcm_substream  *stream;
 44         snd_pcm_uframes_t          frame_pos;
 45         enum lx_stream_status      status; /* free, open, running, draining
 46                                             * pause */
 47         unsigned int               is_capture:1;
 48 };
 49 
 50 
 51 struct lx6464es {
 52         struct snd_card        *card;
 53         struct pci_dev         *pci;
 54         int                     irq;
 55 
 56         u8                      mac_address[6];
 57 
 58         struct mutex            lock;        /* interrupt lock */
 59         struct mutex            setup_mutex; /* mutex used in hw_params, open
 60                                               * and close */
 61 
 62         /* ports */
 63         unsigned long           port_plx;          /* io port (size=256) */
 64         void __iomem           *port_plx_remapped; /* remapped plx port */
 65         void __iomem           *port_dsp_bar;      /* memory port (32-bit,
 66                                                     * non-prefetchable,
 67                                                     * size=8K) */
 68 
 69         /* messaging */
 70         struct mutex            msg_lock;          /* message lock */
 71         struct lx_rmh           rmh;
 72         u32                     irqsrc;
 73 
 74         /* configuration */
 75         uint                    freq_ratio : 2;
 76         uint                    playback_mute : 1;
 77         uint                    hardware_running[2];
 78         u32                     board_sample_rate; /* sample rate read from
 79                                                     * board */
 80         u16                     pcm_granularity;   /* board blocksize */
 81 
 82         /* dma */
 83         struct snd_dma_buffer   capture_dma_buf;
 84         struct snd_dma_buffer   playback_dma_buf;
 85 
 86         /* pcm */
 87         struct snd_pcm         *pcm;
 88 
 89         /* streams */
 90         struct lx_stream        capture_stream;
 91         struct lx_stream        playback_stream;
 92 };
 93 
 94 
 95 #endif /* LX6464ES_H */
 96 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp