Lines Matching refs:unit
50 struct fw_unit *unit; member
213 err = avc_general_set_sig_fmt(fwspk->unit, params_rate(hw_params), in fwspk_hw_params()
216 dev_err(&fwspk->unit->device, "failed to set sample rate\n"); in fwspk_hw_params()
367 err = fcp_avc_transaction(fwspk->unit, buf, 11, buf, 11, 0x3fe); in fwspk_mute_command()
371 dev_err(&fwspk->unit->device, "short FCP response\n"); in fwspk_mute_command()
376 dev_err(&fwspk->unit->device, "mute command failed\n"); in fwspk_mute_command()
428 err = fcp_avc_transaction(fwspk->unit, buf, 12, buf, 12, 0x3fe); in fwspk_volume_command()
432 dev_err(&fwspk->unit->device, "short FCP response\n"); in fwspk_volume_command()
437 dev_err(&fwspk->unit->device, "volume command failed\n"); in fwspk_volume_command()
603 static u32 fwspk_read_firmware_version(struct fw_unit *unit) in fwspk_read_firmware_version() argument
608 err = snd_fw_transaction(unit, TCODE_READ_QUADLET_REQUEST, in fwspk_read_firmware_version()
619 fw_unit_put(fwspk->unit); in fwspk_card_free()
623 static int fwspk_probe(struct fw_unit *unit, in fwspk_probe() argument
626 struct fw_device *fw_dev = fw_parent_device(unit); in fwspk_probe()
632 err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE, in fwspk_probe()
640 fwspk->unit = fw_unit_get(unit); in fwspk_probe()
643 err = cmp_connection_init(&fwspk->connection, unit, CMP_INPUT, 0); in fwspk_probe()
647 err = amdtp_stream_init(&fwspk->stream, unit, AMDTP_OUT_STREAM, in fwspk_probe()
656 firmware = fwspk_read_firmware_version(unit); in fwspk_probe()
662 dev_name(&unit->device), 100 << fw_dev->max_speed); in fwspk_probe()
677 dev_set_drvdata(&unit->device, fwspk); in fwspk_probe()
684 fw_unit_put(fwspk->unit); in fwspk_probe()
691 static void fwspk_bus_reset(struct fw_unit *unit) in fwspk_bus_reset() argument
693 struct fwspk *fwspk = dev_get_drvdata(&unit->device); in fwspk_bus_reset()
695 fcp_bus_reset(fwspk->unit); in fwspk_bus_reset()
708 static void fwspk_remove(struct fw_unit *unit) in fwspk_remove() argument
710 struct fwspk *fwspk = dev_get_drvdata(&unit->device); in fwspk_remove()