Lines Matching refs:bebob

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