Lines Matching defs:snd
1 /* arch/arm/mach-msm/qdsp5/snd.c
3 * interface to "snd" service on the baseband cpu
90 static int get_endpoint(struct snd_ctxt *snd, unsigned long arg)
101 if (index < 0 || index >= snd->snd_epts->num) {
106 ept.id = snd->snd_epts->endpoints[index].id;
108 snd->snd_epts->endpoints[index].name,
125 struct snd_ctxt *snd = file->private_data;
128 mutex_lock(&snd->lock);
152 rc = msm_rpc_call(snd->ept,
179 rc = msm_rpc_call(snd->ept,
186 &snd->snd_epts->num, sizeof(unsigned))) {
193 rc = get_endpoint(snd, arg);
201 mutex_unlock(&snd->lock);
208 struct snd_ctxt *snd = file->private_data;
210 mutex_lock(&snd->lock);
211 snd->opened = 0;
212 mutex_unlock(&snd->lock);
218 struct snd_ctxt *snd = &the_snd;
221 mutex_lock(&snd->lock);
222 if (snd->opened == 0) {
223 if (snd->ept == NULL) {
224 snd->ept = msm_rpc_connect(RPC_SND_PROG, RPC_SND_VERS,
226 if (IS_ERR(snd->ept)) {
227 rc = PTR_ERR(snd->ept);
228 snd->ept = NULL;
229 pr_err("snd: failed to connect snd svc\n");
233 file->private_data = snd;
234 snd->opened = 1;
236 pr_err("snd already opened.\n");
241 mutex_unlock(&snd->lock);
260 struct snd_ctxt *snd = &the_snd;
261 mutex_init(&snd->lock);
262 snd->snd_epts = (struct msm_snd_endpoints *)pdev->dev.platform_data;