Lines Matching refs:bebob
138 get_meter(struct snd_bebob *bebob, void *buf, unsigned int size) in get_meter() argument
140 return snd_fw_transaction(bebob->unit, TCODE_READ_BLOCK_REQUEST, in get_meter()
146 check_clk_sync(struct snd_bebob *bebob, unsigned int size, bool *sync) in check_clk_sync() argument
155 err = get_meter(bebob, buf, size); in check_clk_sync()
171 avc_maudio_set_special_clk(struct snd_bebob *bebob, unsigned int clk_src, in avc_maudio_set_special_clk() argument
175 struct special_params *params = bebob->maudio_special_quirk; in avc_maudio_set_special_clk()
179 if (amdtp_stream_running(&bebob->rx_stream) || in avc_maudio_set_special_clk()
180 amdtp_stream_running(&bebob->tx_stream)) in avc_maudio_set_special_clk()
200 err = fcp_avc_transaction(bebob->unit, buf, 12, buf, 12, in avc_maudio_set_special_clk()
219 snd_ctl_notify(bebob->card, SNDRV_CTL_EVENT_MASK_VALUE, in avc_maudio_set_special_clk()
228 special_stream_formation_set(struct snd_bebob *bebob) in special_stream_formation_set() argument
238 struct special_params *params = bebob->maudio_special_quirk; in special_stream_formation_set()
246 bebob->tx_stream_formations[i + 1].pcm = in special_stream_formation_set()
248 bebob->tx_stream_formations[i + 1].midi = 1; in special_stream_formation_set()
250 bebob->rx_stream_formations[i + 1].pcm = in special_stream_formation_set()
252 bebob->rx_stream_formations[i + 1].midi = 1; in special_stream_formation_set()
256 static int add_special_controls(struct snd_bebob *bebob);
258 snd_bebob_maudio_special_discover(struct snd_bebob *bebob, bool is1814) in snd_bebob_maudio_special_discover() argument
263 params = devm_kzalloc(&bebob->card->card_dev, in snd_bebob_maudio_special_discover()
268 mutex_lock(&bebob->mutex); in snd_bebob_maudio_special_discover()
270 bebob->maudio_special_quirk = (void *)params; in snd_bebob_maudio_special_discover()
274 bebob->rx_stream.context = ERR_PTR(-1); in snd_bebob_maudio_special_discover()
275 bebob->tx_stream.context = ERR_PTR(-1); in snd_bebob_maudio_special_discover()
276 err = avc_maudio_set_special_clk(bebob, 0x03, 0x00, 0x00, 0x00); in snd_bebob_maudio_special_discover()
278 dev_err(&bebob->unit->device, in snd_bebob_maudio_special_discover()
283 err = add_special_controls(bebob); in snd_bebob_maudio_special_discover()
287 special_stream_formation_set(bebob); in snd_bebob_maudio_special_discover()
290 bebob->midi_input_ports = 1; in snd_bebob_maudio_special_discover()
291 bebob->midi_output_ports = 1; in snd_bebob_maudio_special_discover()
293 bebob->midi_input_ports = 2; in snd_bebob_maudio_special_discover()
294 bebob->midi_output_ports = 2; in snd_bebob_maudio_special_discover()
297 mutex_unlock(&bebob->mutex); in snd_bebob_maudio_special_discover()
302 static int special_get_rate(struct snd_bebob *bebob, unsigned int *rate) in special_get_rate() argument
308 err = avc_general_get_sig_fmt(bebob->unit, rate, in special_get_rate()
314 static int special_set_rate(struct snd_bebob *bebob, unsigned int rate) in special_set_rate() argument
316 struct special_params *params = bebob->maudio_special_quirk; in special_set_rate()
319 err = avc_general_set_sig_fmt(bebob->unit, rate, in special_set_rate()
330 err = avc_general_set_sig_fmt(bebob->unit, rate, in special_set_rate()
336 snd_ctl_notify(bebob->card, SNDRV_CTL_EVENT_MASK_VALUE, in special_set_rate()
349 static int special_clk_get(struct snd_bebob *bebob, unsigned int *id) in special_clk_get() argument
351 struct special_params *params = bebob->maudio_special_quirk; in special_clk_get()
370 struct snd_bebob *bebob = snd_kcontrol_chip(kctl); in special_clk_ctl_get() local
371 struct special_params *params = bebob->maudio_special_quirk; in special_clk_ctl_get()
378 struct snd_bebob *bebob = snd_kcontrol_chip(kctl); in special_clk_ctl_put() local
379 struct special_params *params = bebob->maudio_special_quirk; in special_clk_ctl_put()
386 mutex_lock(&bebob->mutex); in special_clk_ctl_put()
388 err = avc_maudio_set_special_clk(bebob, id, in special_clk_ctl_put()
392 mutex_unlock(&bebob->mutex); in special_clk_ctl_put()
422 struct snd_bebob *bebob = snd_kcontrol_chip(kctl); in special_sync_ctl_get() local
426 err = check_clk_sync(bebob, METER_SIZE_SPECIAL, &synced); in special_sync_ctl_get()
454 struct snd_bebob *bebob = snd_kcontrol_chip(kctl); in special_dig_in_iface_ctl_get() local
455 struct special_params *params = bebob->maudio_special_quirk; in special_dig_in_iface_ctl_get()
459 mutex_lock(&bebob->mutex); in special_dig_in_iface_ctl_get()
461 err = avc_audio_get_selector(bebob->unit, 0x00, 0x04, in special_dig_in_iface_ctl_get()
464 dev_err(&bebob->unit->device, in special_dig_in_iface_ctl_get()
478 mutex_unlock(&bebob->mutex); in special_dig_in_iface_ctl_get()
484 struct snd_bebob *bebob = snd_kcontrol_chip(kctl); in special_dig_in_iface_ctl_set() local
485 struct special_params *params = bebob->maudio_special_quirk; in special_dig_in_iface_ctl_set()
497 mutex_lock(&bebob->mutex); in special_dig_in_iface_ctl_set()
499 err = avc_maudio_set_special_clk(bebob, in special_dig_in_iface_ctl_set()
514 err = avc_audio_set_selector(bebob->unit, 0x00, 0x04, dig_in_iface); in special_dig_in_iface_ctl_set()
516 dev_err(&bebob->unit->device, in special_dig_in_iface_ctl_set()
520 special_stream_formation_set(bebob); in special_dig_in_iface_ctl_set()
521 mutex_unlock(&bebob->mutex); in special_dig_in_iface_ctl_set()
547 struct snd_bebob *bebob = snd_kcontrol_chip(kctl); in special_dig_out_iface_ctl_get() local
548 struct special_params *params = bebob->maudio_special_quirk; in special_dig_out_iface_ctl_get()
549 mutex_lock(&bebob->mutex); in special_dig_out_iface_ctl_get()
551 mutex_unlock(&bebob->mutex); in special_dig_out_iface_ctl_get()
557 struct snd_bebob *bebob = snd_kcontrol_chip(kctl); in special_dig_out_iface_ctl_set() local
558 struct special_params *params = bebob->maudio_special_quirk; in special_dig_out_iface_ctl_set()
566 mutex_lock(&bebob->mutex); in special_dig_out_iface_ctl_set()
568 err = avc_maudio_set_special_clk(bebob, in special_dig_out_iface_ctl_set()
573 special_stream_formation_set(bebob); in special_dig_out_iface_ctl_set()
577 mutex_unlock(&bebob->mutex); in special_dig_out_iface_ctl_set()
589 static int add_special_controls(struct snd_bebob *bebob) in add_special_controls() argument
592 struct special_params *params = bebob->maudio_special_quirk; in add_special_controls()
595 kctl = snd_ctl_new1(&special_clk_ctl, bebob); in add_special_controls()
596 err = snd_ctl_add(bebob->card, kctl); in add_special_controls()
600 kctl = snd_ctl_new1(&special_sync_ctl, bebob); in add_special_controls()
601 err = snd_ctl_add(bebob->card, kctl); in add_special_controls()
606 kctl = snd_ctl_new1(&special_dig_in_iface_ctl, bebob); in add_special_controls()
607 err = snd_ctl_add(bebob->card, kctl); in add_special_controls()
611 kctl = snd_ctl_new1(&special_dig_out_iface_ctl, bebob); in add_special_controls()
612 err = snd_ctl_add(bebob->card, kctl); in add_special_controls()
629 special_meter_get(struct snd_bebob *bebob, u32 *target, unsigned int size) in special_meter_get() argument
644 err = get_meter(bebob, (void *)buf, METER_SIZE_SPECIAL - 4); in special_meter_get()
688 normal_meter_get(struct snd_bebob *bebob, u32 *buf, unsigned int size) in normal_meter_get() argument
690 const struct snd_bebob_meter_spec *spec = bebob->spec->meter; in normal_meter_get()
698 err = get_meter(bebob, (void *)buf, size); in normal_meter_get()