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()
1177 struct f_uac2_opts *opts = agdev_to_uac2_opts(agdev); in afunc_set_alt() local
1196 uac2->p_framesize = opts->p_ssize * in afunc_set_alt()
1197 num_channels(opts->p_chmask); in afunc_set_alt()
1198 rate = opts->p_srate * uac2->p_framesize; in afunc_set_alt()
1285 struct f_uac2_opts *opts; in in_rq_cur() local
1294 opts = agdev_to_uac2_opts(agdev); in in_rq_cur()
1295 p_srate = opts->p_srate; in in_rq_cur()
1296 c_srate = opts->c_srate; in in_rq_cur()
1326 struct f_uac2_opts *opts; in in_rq_range() local
1336 opts = agdev_to_uac2_opts(agdev); in in_rq_range()
1337 p_srate = opts->p_srate; in in_rq_range()
1338 c_srate = opts->c_srate; in in_rq_range()
1453 struct f_uac2_opts *opts = to_f_uac2_opts(item); in f_uac2_attr_release() local
1455 usb_put_function_instance(&opts->func_inst); in f_uac2_attr_release()
1465 static ssize_t f_uac2_opts_##name##_show(struct f_uac2_opts *opts, \
1470 mutex_lock(&opts->lock); \
1471 result = sprintf(page, "%u\n", opts->name); \
1472 mutex_unlock(&opts->lock); \
1477 static ssize_t f_uac2_opts_##name##_store(struct f_uac2_opts *opts, \
1483 mutex_lock(&opts->lock); \
1484 if (opts->refcnt) { \
1493 opts->name = num; \
1497 mutex_unlock(&opts->lock); \
1531 struct f_uac2_opts *opts; in afunc_free_inst() local
1533 opts = container_of(f, struct f_uac2_opts, func_inst); in afunc_free_inst()
1534 kfree(opts); in afunc_free_inst()
1539 struct f_uac2_opts *opts; in afunc_alloc_inst() local
1541 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in afunc_alloc_inst()
1542 if (!opts) in afunc_alloc_inst()
1545 mutex_init(&opts->lock); in afunc_alloc_inst()
1546 opts->func_inst.free_func_inst = afunc_free_inst; in afunc_alloc_inst()
1548 config_group_init_type_name(&opts->func_inst.group, "", in afunc_alloc_inst()
1551 opts->p_chmask = UAC2_DEF_PCHMASK; in afunc_alloc_inst()
1552 opts->p_srate = UAC2_DEF_PSRATE; in afunc_alloc_inst()
1553 opts->p_ssize = UAC2_DEF_PSSIZE; in afunc_alloc_inst()
1554 opts->c_chmask = UAC2_DEF_CCHMASK; in afunc_alloc_inst()
1555 opts->c_srate = UAC2_DEF_CSRATE; in afunc_alloc_inst()
1556 opts->c_ssize = UAC2_DEF_CSSIZE; in afunc_alloc_inst()
1557 return &opts->func_inst; in afunc_alloc_inst()
1563 struct f_uac2_opts *opts; in afunc_free() local
1566 opts = container_of(f->fi, struct f_uac2_opts, func_inst); in afunc_free()
1568 mutex_lock(&opts->lock); in afunc_free()
1569 --opts->refcnt; in afunc_free()
1570 mutex_unlock(&opts->lock); in afunc_free()
1596 struct f_uac2_opts *opts; in afunc_alloc() local
1602 opts = container_of(fi, struct f_uac2_opts, func_inst); in afunc_alloc()
1603 mutex_lock(&opts->lock); in afunc_alloc()
1604 ++opts->refcnt; in afunc_alloc()
1605 mutex_unlock(&opts->lock); in afunc_alloc()