-
- linux框架
- 软件框架部分, 声卡驱动属于字符驱动,满足字符驱动模型
inux-3.4.2\sound\core\sound.c static int __init alsa_sound_init(void) { snd_major = major; register_chrdev(major, "alsa", &snd_fops)) } static const struct file_operations snd_fops = { .owner = THIS_MODULE, .open = snd_open, .llseek = noop_llseek, };
分析snd_open,
struct snd_minor { int type; /* SNDRV_DEVICE_TYPE_XXX */ int card; /* card number */ int device; /* device number */ const struct file_operations *f_ops; /* file operations */ void *private_data; /* private data for f_ops->open */ struct device *dev;
- linux框架
ALSA驱动框架
最新推荐文章于 2025-06-25 23:17:02 发布