xref: /linux/sound/firewire/fcp.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
231ef9134SClemens Ladisch #ifndef SOUND_FIREWIRE_FCP_H_INCLUDED
331ef9134SClemens Ladisch #define SOUND_FIREWIRE_FCP_H_INCLUDED
431ef9134SClemens Ladisch 
51017abedSTakashi Sakamoto #define	AVC_PLUG_INFO_BUF_BYTES	4
61017abedSTakashi Sakamoto 
731ef9134SClemens Ladisch struct fw_unit;
831ef9134SClemens Ladisch 
91017abedSTakashi Sakamoto /*
101017abedSTakashi Sakamoto  * AV/C Digital Interface Command Set General Specification 4.2
111017abedSTakashi Sakamoto  * (Sep 2004, 1394TA)
121017abedSTakashi Sakamoto  */
131017abedSTakashi Sakamoto enum avc_general_plug_dir {
141017abedSTakashi Sakamoto 	AVC_GENERAL_PLUG_DIR_IN		= 0,
151017abedSTakashi Sakamoto 	AVC_GENERAL_PLUG_DIR_OUT	= 1,
161017abedSTakashi Sakamoto 	AVC_GENERAL_PLUG_DIR_COUNT
171017abedSTakashi Sakamoto };
181017abedSTakashi Sakamoto int avc_general_set_sig_fmt(struct fw_unit *unit, unsigned int rate,
191017abedSTakashi Sakamoto 			    enum avc_general_plug_dir dir,
201017abedSTakashi Sakamoto 			    unsigned short plug);
211017abedSTakashi Sakamoto int avc_general_get_sig_fmt(struct fw_unit *unit, unsigned int *rate,
221017abedSTakashi Sakamoto 			    enum avc_general_plug_dir dir,
231017abedSTakashi Sakamoto 			    unsigned short plug);
241017abedSTakashi Sakamoto int avc_general_get_plug_info(struct fw_unit *unit, unsigned int subunit_type,
251017abedSTakashi Sakamoto 			      unsigned int subunit_id, unsigned int subfunction,
261017abedSTakashi Sakamoto 			      u8 info[AVC_PLUG_INFO_BUF_BYTES]);
271017abedSTakashi Sakamoto 
2831ef9134SClemens Ladisch int fcp_avc_transaction(struct fw_unit *unit,
2931ef9134SClemens Ladisch 			const void *command, unsigned int command_size,
3031ef9134SClemens Ladisch 			void *response, unsigned int response_size,
3131ef9134SClemens Ladisch 			unsigned int response_match_bytes);
3231ef9134SClemens Ladisch void fcp_bus_reset(struct fw_unit *unit);
3331ef9134SClemens Ladisch 
3431ef9134SClemens Ladisch #endif
35