*参照元 [#t4b9ede1] #backlinks *説明 [#q2dd1066] -パス: [[linux-4.4.1/sound/soc/soc-pcm.c]] -FIXME: これは何? --説明 **引数 [#p9966b8e] -struct snd_soc_pcm_runtime *fe -- --[[linux-4.4.1/snd_soc_pcm_runtime]] -struct snd_soc_pcm_runtime *be -- -int stream -- **返り値 [#h9411e08] -int -- **参考 [#p0981fa1] *実装 [#i694cf06] /* connect a FE and BE */ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, struct snd_soc_pcm_runtime *be, int stream) { struct snd_soc_dpcm *dpcm; - --[[linux-4.4.1/snd_soc_dpcm]] /* only add new dpcms */ list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { if (dpcm->be == be && dpcm->fe == fe) return 0; } - --[[linux-4.4.1/list_for_each_entry()]] dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL); if (!dpcm) return -ENOMEM; - --[[linux-4.4.1/kzalloc()]] dpcm->be = be; dpcm->fe = fe; be->dpcm[stream].runtime = fe->dpcm[stream].runtime; dpcm->state = SND_SOC_DPCM_LINK_STATE_NEW; list_add(&dpcm->list_be, &fe->dpcm[stream].be_clients); list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); - --[[linux-4.4.1/list_add()]] dev_dbg(fe->dev, "connected new DPCM %s path %s %s %s\n", stream ? "capture" : "playback", fe->dai_link->name, stream ? "<-" : "->", be->dai_link->name); - --[[linux-4.4.1/dev_dbg()]] #ifdef CONFIG_DEBUG_FS - --[[linux-4.4.1/CONFIG_DEBUG_FS]] if (fe->debugfs_dpcm_root) dpcm->debugfs_state = debugfs_create_u32(be->dai_link->name, 0644, fe->debugfs_dpcm_root, &dpcm->state); - --[[linux-4.4.1/debugfs_create_u32()]] #endif return 1; } *コメント [#bcc3f736]