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

TOMOYO Linux Cross Reference
Linux/include/sound/sb16_csp.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  *  Copyright (c) 1999 by Uros Bizjak <uros@kss-loka.si>
  4  *                        Takashi Iwai <tiwai@suse.de>
  5  *
  6  *  SB16ASP/AWE32 CSP control
  7  */
  8 #ifndef __SOUND_SB16_CSP_H
  9 #define __SOUND_SB16_CSP_H
 10 
 11 #include <sound/sb.h>
 12 #include <sound/hwdep.h>
 13 #include <linux/firmware.h>
 14 #include <uapi/sound/sb16_csp.h>
 15 
 16 struct snd_sb_csp;
 17 
 18 /* indices for the known CSP programs */
 19 enum {
 20         CSP_PROGRAM_MULAW,
 21         CSP_PROGRAM_ALAW,
 22         CSP_PROGRAM_ADPCM_INIT,
 23         CSP_PROGRAM_ADPCM_PLAYBACK,
 24         CSP_PROGRAM_ADPCM_CAPTURE,
 25 
 26         CSP_PROGRAM_COUNT
 27 };
 28 
 29 /*
 30  * CSP operators
 31  */
 32 struct snd_sb_csp_ops {
 33         int (*csp_use) (struct snd_sb_csp * p);
 34         int (*csp_unuse) (struct snd_sb_csp * p);
 35         int (*csp_autoload) (struct snd_sb_csp * p, snd_pcm_format_t pcm_sfmt, int play_rec_mode);
 36         int (*csp_start) (struct snd_sb_csp * p, int sample_width, int channels);
 37         int (*csp_stop) (struct snd_sb_csp * p);
 38         int (*csp_qsound_transfer) (struct snd_sb_csp * p);
 39 };
 40 
 41 /*
 42  * CSP private data
 43  */
 44 struct snd_sb_csp {
 45         struct snd_sb *chip;            /* SB16 DSP */
 46         int used;               /* usage flag - exclusive */
 47         char codec_name[16];    /* name of codec */
 48         unsigned short func_nr; /* function number */
 49         unsigned int acc_format;        /* accepted PCM formats */
 50         int acc_channels;       /* accepted channels */
 51         int acc_width;          /* accepted sample width */
 52         int acc_rates;          /* accepted sample rates */
 53         int mode;               /* MODE */
 54         int run_channels;       /* current CSP channels */
 55         int run_width;          /* current sample width */
 56         int version;            /* CSP version (0x10 - 0x1f) */
 57         int running;            /* running state */
 58 
 59         struct snd_sb_csp_ops ops;      /* operators */
 60 
 61         spinlock_t q_lock;      /* locking */
 62         int q_enabled;          /* enabled flag */
 63         int qpos_left;          /* left position */
 64         int qpos_right;         /* right position */
 65         int qpos_changed;       /* position changed flag */
 66 
 67         struct snd_kcontrol *qsound_switch;
 68         struct snd_kcontrol *qsound_space;
 69 
 70         struct mutex access_mutex;      /* locking */
 71 
 72         const struct firmware *csp_programs[CSP_PROGRAM_COUNT];
 73 };
 74 
 75 int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep);
 76 #endif /* __SOUND_SB16_CSP */
 77 

~ [ 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