Lines Matching refs:opts
366 struct f_uac2_opts *opts; in uac2_pcm_open() local
372 opts = container_of(audio_dev->func.fi, struct f_uac2_opts, func_inst); in uac2_pcm_open()
373 p_ssize = opts->p_ssize; in uac2_pcm_open()
374 c_ssize = opts->c_ssize; in uac2_pcm_open()
375 p_srate = opts->p_srate; in uac2_pcm_open()
376 c_srate = opts->c_srate; in uac2_pcm_open()
377 p_chmask = opts->p_chmask; in uac2_pcm_open()
378 c_chmask = opts->c_chmask; in uac2_pcm_open()
450 struct f_uac2_opts *opts; in snd_uac2_probe() local
455 opts = container_of(audio_dev->func.fi, struct f_uac2_opts, func_inst); in snd_uac2_probe()
456 p_chmask = opts->p_chmask; in snd_uac2_probe()
457 c_chmask = opts->c_chmask; in snd_uac2_probe()
1171 struct f_uac2_opts *opts = agdev_to_uac2_opts(agdev); in afunc_set_alt() local
1190 uac2->p_framesize = opts->p_ssize * in afunc_set_alt()
1191 num_channels(opts->p_chmask); in afunc_set_alt()
1192 rate = opts->p_srate * uac2->p_framesize; in afunc_set_alt()
1279 struct f_uac2_opts *opts; in in_rq_cur() local
1288 opts = agdev_to_uac2_opts(agdev); in in_rq_cur()
1289 p_srate = opts->p_srate; in in_rq_cur()
1290 c_srate = opts->c_srate; in in_rq_cur()
1320 struct f_uac2_opts *opts; in in_rq_range() local
1330 opts = agdev_to_uac2_opts(agdev); in in_rq_range()
1331 p_srate = opts->p_srate; in in_rq_range()
1332 c_srate = opts->c_srate; in in_rq_range()
1444 struct f_uac2_opts *opts = to_f_uac2_opts(item); in f_uac2_attr_release() local
1446 usb_put_function_instance(&opts->func_inst); in f_uac2_attr_release()
1457 struct f_uac2_opts *opts = to_f_uac2_opts(item); \
1460 mutex_lock(&opts->lock); \
1461 result = sprintf(page, "%u\n", opts->name); \
1462 mutex_unlock(&opts->lock); \
1470 struct f_uac2_opts *opts = to_f_uac2_opts(item); \
1474 mutex_lock(&opts->lock); \
1475 if (opts->refcnt) { \
1484 opts->name = num; \
1488 mutex_unlock(&opts->lock); \
1519 struct f_uac2_opts *opts; in afunc_free_inst() local
1521 opts = container_of(f, struct f_uac2_opts, func_inst); in afunc_free_inst()
1522 kfree(opts); in afunc_free_inst()
1527 struct f_uac2_opts *opts; in afunc_alloc_inst() local
1529 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in afunc_alloc_inst()
1530 if (!opts) in afunc_alloc_inst()
1533 mutex_init(&opts->lock); in afunc_alloc_inst()
1534 opts->func_inst.free_func_inst = afunc_free_inst; in afunc_alloc_inst()
1536 config_group_init_type_name(&opts->func_inst.group, "", in afunc_alloc_inst()
1539 opts->p_chmask = UAC2_DEF_PCHMASK; in afunc_alloc_inst()
1540 opts->p_srate = UAC2_DEF_PSRATE; in afunc_alloc_inst()
1541 opts->p_ssize = UAC2_DEF_PSSIZE; in afunc_alloc_inst()
1542 opts->c_chmask = UAC2_DEF_CCHMASK; in afunc_alloc_inst()
1543 opts->c_srate = UAC2_DEF_CSRATE; in afunc_alloc_inst()
1544 opts->c_ssize = UAC2_DEF_CSSIZE; in afunc_alloc_inst()
1545 return &opts->func_inst; in afunc_alloc_inst()
1551 struct f_uac2_opts *opts; in afunc_free() local
1554 opts = container_of(f->fi, struct f_uac2_opts, func_inst); in afunc_free()
1556 mutex_lock(&opts->lock); in afunc_free()
1557 --opts->refcnt; in afunc_free()
1558 mutex_unlock(&opts->lock); in afunc_free()
1579 struct f_uac2_opts *opts; in afunc_alloc() local
1585 opts = container_of(fi, struct f_uac2_opts, func_inst); in afunc_alloc()
1586 mutex_lock(&opts->lock); in afunc_alloc()
1587 ++opts->refcnt; in afunc_alloc()
1588 mutex_unlock(&opts->lock); in afunc_alloc()