参照元

説明

引数

返り値

参考

実装

/* 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;
        /* 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;
        }
        dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL);
        if (!dpcm)
                return -ENOMEM;
        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);
        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);
#ifdef 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);
#endif
        return 1;
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-02-10 (水) 22:21:09