sound/core/sound.c 實現了最頂層的file_operations,它起中轉做用接口
sound/core/control.c 實現了控制接口的file_operationsio
sound/core/pcm_native.c 實現了playback,capture的file_operationsfile
這些file_operations規定了ALSA接口硬件
怎麼寫驅動?實現硬件相關的代碼便可:co
分配,設置,註冊snd_card結構體:new
1. snd_card_create //裏面會建立接口控制結構體
2. snd_pcm_new //裏面會建立playback,capture接口opera
3. snd_card_registergis