sound/usb/line6/podhd.c
Source file repositories/reference/linux-study-clean/sound/usb/line6/podhd.c
File Facts
- System
- Linux kernel
- Corpus path
sound/usb/line6/podhd.c- Extension
.c- Size
- 16237 bytes
- Lines
- 588
- Domain
- Driver Families
- Bucket
- sound/usb
- 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/usb.hlinux/slab.hlinux/module.hsound/core.hsound/control.hsound/pcm.hdriver.hpcm.h
Detected Declarations
struct usb_line6_podhdfunction serial_number_showfunction firmware_version_showfunction podhd_dev_startfunction podhd_startupfunction podhd_disconnectfunction podhd_set_monitor_levelfunction snd_podhd_control_monitor_infofunction snd_podhd_control_monitor_getfunction snd_podhd_control_monitor_putfunction podhd_initfunction podhd_probe
Annotated Snippet
struct usb_line6_podhd {
/* Generic Line 6 USB data */
struct usb_line6 line6;
/* Serial number of device */
u32 serial_number;
/* Firmware version */
int firmware_version;
/* Monitor level */
int monitor_level;
};
#define line6_to_podhd(x) container_of(x, struct usb_line6_podhd, line6)
static const struct snd_ratden podhd_ratden = {
.num_min = 48000,
.num_max = 48000,
.num_step = 1,
.den = 1,
};
static struct line6_pcm_properties podhd_pcm_properties = {
.playback_hw = {
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_SYNC_START),
.formats = SNDRV_PCM_FMTBIT_S24_3LE,
.rates = SNDRV_PCM_RATE_48000,
.rate_min = 48000,
.rate_max = 48000,
.channels_min = 2,
.channels_max = 2,
.buffer_bytes_max = 60000,
.period_bytes_min = 64,
.period_bytes_max = 8192,
.periods_min = 1,
.periods_max = 1024},
.capture_hw = {
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_SYNC_START),
.formats = SNDRV_PCM_FMTBIT_S24_3LE,
.rates = SNDRV_PCM_RATE_48000,
.rate_min = 48000,
.rate_max = 48000,
.channels_min = 2,
.channels_max = 2,
.buffer_bytes_max = 60000,
.period_bytes_min = 64,
.period_bytes_max = 8192,
.periods_min = 1,
.periods_max = 1024},
.rates = {
.nrats = 1,
.rats = &podhd_ratden},
.bytes_per_channel = 3 /* SNDRV_PCM_FMTBIT_S24_3LE */
};
static struct line6_pcm_properties podx3_pcm_properties = {
.playback_hw = {
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_SYNC_START),
.formats = SNDRV_PCM_FMTBIT_S24_3LE,
.rates = SNDRV_PCM_RATE_48000,
.rate_min = 48000,
.rate_max = 48000,
.channels_min = 2,
.channels_max = 2,
.buffer_bytes_max = 60000,
.period_bytes_min = 64,
.period_bytes_max = 8192,
.periods_min = 1,
.periods_max = 1024},
.capture_hw = {
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_SYNC_START),
Annotation
- Immediate include surface: `linux/usb.h`, `linux/slab.h`, `linux/module.h`, `sound/core.h`, `sound/control.h`, `sound/pcm.h`, `driver.h`, `pcm.h`.
- Detected declarations: `struct usb_line6_podhd`, `function serial_number_show`, `function firmware_version_show`, `function podhd_dev_start`, `function podhd_startup`, `function podhd_disconnect`, `function podhd_set_monitor_level`, `function snd_podhd_control_monitor_info`, `function snd_podhd_control_monitor_get`, `function snd_podhd_control_monitor_put`.
- Atlas domain: Driver Families / sound/usb.
- 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.