sound/pcmcia/vx/vxpocket.c
Source file repositories/reference/linux-study-clean/sound/pcmcia/vx/vxpocket.c
File Facts
- System
- Linux kernel
- Corpus path
sound/pcmcia/vx/vxpocket.c- Extension
.c- Size
- 7246 bytes
- Lines
- 336
- Domain
- Driver Families
- Bucket
- sound/pcmcia
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/module.hlinux/slab.hsound/core.hvxpocket.hpcmcia/ciscode.hpcmcia/cisreg.hsound/initval.hsound/tlv.h
Detected Declarations
function vxpocket_releasefunction snd_vxpocket_newfunction snd_vxpocket_assign_resourcesfunction vxpocket_configfunction vxp_suspendfunction vxp_resumefunction vxpocket_probefunction vxpocket_detach
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Driver for Digigram VXpocket V2/440 soundcards
*
* Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <sound/core.h>
#include "vxpocket.h"
#include <pcmcia/ciscode.h>
#include <pcmcia/cisreg.h>
#include <sound/initval.h>
#include <sound/tlv.h>
MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
MODULE_DESCRIPTION("Digigram VXPocket");
MODULE_LICENSE("GPL");
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable switches */
static int ibl[SNDRV_CARDS];
module_param_array(index, int, NULL, 0444);
MODULE_PARM_DESC(index, "Index value for VXPocket soundcard.");
module_param_array(id, charp, NULL, 0444);
MODULE_PARM_DESC(id, "ID string for VXPocket soundcard.");
module_param_array(enable, bool, NULL, 0444);
MODULE_PARM_DESC(enable, "Enable VXPocket soundcard.");
module_param_array(ibl, int, NULL, 0444);
MODULE_PARM_DESC(ibl, "Capture IBL size for VXPocket soundcard.");
/*
*/
static unsigned int card_alloc;
/*
*/
static void vxpocket_release(struct pcmcia_device *link)
{
free_irq(link->irq, link->priv);
pcmcia_disable_device(link);
}
/*
* Hardware information
*/
/* VX-pocket V2
*
* 1 DSP, 1 sync UER
* 1 programmable clock (NIY)
* 1 stereo analog input (line/micro)
* 1 stereo analog output
* Only output levels can be modified
*/
static const DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0);
static const struct snd_vx_hardware vxpocket_hw = {
.name = "VXPocket",
.type = VX_TYPE_VXPOCKET,
/* hardware specs */
.num_codecs = 1,
.num_ins = 1,
.num_outs = 1,
.output_level_max = VX_ANALOG_OUT_LEVEL_MAX,
.output_level_db_scale = db_scale_old_vol,
};
/* VX-pocket 440
*
* 1 DSP, 1 sync UER, 1 sync World Clock (NIY)
* SMPTE (NIY)
* 2 stereo analog input (line/micro)
* 2 stereo analog output
* Only output levels can be modified
* UER, but only for the first two inputs and outputs.
*/
static const struct snd_vx_hardware vxp440_hw = {
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/slab.h`, `sound/core.h`, `vxpocket.h`, `pcmcia/ciscode.h`, `pcmcia/cisreg.h`, `sound/initval.h`.
- Detected declarations: `function vxpocket_release`, `function snd_vxpocket_new`, `function snd_vxpocket_assign_resources`, `function vxpocket_config`, `function vxp_suspend`, `function vxp_resume`, `function vxpocket_probe`, `function vxpocket_detach`.
- Atlas domain: Driver Families / sound/pcmcia.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.