xref: /linux/sound/firewire/fcp.h (revision 1017abed18ae7087e7f3e256c48421d09d83176e)
131ef9134SClemens Ladisch #ifndef SOUND_FIREWIRE_FCP_H_INCLUDED
231ef9134SClemens Ladisch #define SOUND_FIREWIRE_FCP_H_INCLUDED
331ef9134SClemens Ladisch 
4*1017abedSTakashi Sakamoto #define	AVC_PLUG_INFO_BUF_BYTES	4
5*1017abedSTakashi Sakamoto 
631ef9134SClemens Ladisch struct fw_unit;
731ef9134SClemens Ladisch 
8*1017abedSTakashi Sakamoto /*
9*1017abedSTakashi Sakamoto  * AV/C Digital Interface Command Set General Specification 4.2
10*1017abedSTakashi Sakamoto  * (Sep 2004, 1394TA)
11*1017abedSTakashi Sakamoto  */
12*1017abedSTakashi Sakamoto enum avc_general_plug_dir {
13*1017abedSTakashi Sakamoto 	AVC_GENERAL_PLUG_DIR_IN		= 0,
14*1017abedSTakashi Sakamoto 	AVC_GENERAL_PLUG_DIR_OUT	= 1,
15*1017abedSTakashi Sakamoto 	AVC_GENERAL_PLUG_DIR_COUNT
16*1017abedSTakashi Sakamoto };
17*1017abedSTakashi Sakamoto int avc_general_set_sig_fmt(struct fw_unit *unit, unsigned int rate,
18*1017abedSTakashi Sakamoto 			    enum avc_general_plug_dir dir,
19*1017abedSTakashi Sakamoto 			    unsigned short plug);
20*1017abedSTakashi Sakamoto int avc_general_get_sig_fmt(struct fw_unit *unit, unsigned int *rate,
21*1017abedSTakashi Sakamoto 			    enum avc_general_plug_dir dir,
22*1017abedSTakashi Sakamoto 			    unsigned short plug);
23*1017abedSTakashi Sakamoto int avc_general_get_plug_info(struct fw_unit *unit, unsigned int subunit_type,
24*1017abedSTakashi Sakamoto 			      unsigned int subunit_id, unsigned int subfunction,
25*1017abedSTakashi Sakamoto 			      u8 info[AVC_PLUG_INFO_BUF_BYTES]);
26*1017abedSTakashi Sakamoto 
2731ef9134SClemens Ladisch int fcp_avc_transaction(struct fw_unit *unit,
2831ef9134SClemens Ladisch 			const void *command, unsigned int command_size,
2931ef9134SClemens Ladisch 			void *response, unsigned int response_size,
3031ef9134SClemens Ladisch 			unsigned int response_match_bytes);
3131ef9134SClemens Ladisch void fcp_bus_reset(struct fw_unit *unit);
3231ef9134SClemens Ladisch 
3331ef9134SClemens Ladisch #endif
34