diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2014-04-25 15:44:59 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-26 14:23:13 +0200 |
commit | 1017abed18ae7087e7f3e256c48421d09d83176e (patch) | |
tree | b98d0848986364dd5bede66b9553da96a60fcfa1 /sound/firewire/fcp.h | |
parent | ALSA: firewire-lib: Add support for deferred transaction (diff) | |
download | linux-1017abed18ae7087e7f3e256c48421d09d83176e.tar.xz linux-1017abed18ae7087e7f3e256c48421d09d83176e.zip |
ALSA: firewire-lib: Add some AV/C general commands
This commit adds three commands, which may be used by some firewire device
drivers. These commands are defined in 'AV/C Digital Interface Command Set
General Specification Version 4.2 (2004006, 1394TA)'.
1. PLUG INFO command (clause 10.1)
2. INPUT PLUG SIGNAL FORMAT command (clause 10.10)
3. OUTPUT PLUG SIGNAL FORMAT command (clause 10.11)
By the command 1, the drivers can get the number of plugs for AV/C unit or
subunit.
By the command 2 and 3, the drivers can get/set sampling frequency.
The 'firewire-speakers' already uses INPUT PLUG SIGNAL FORMAT command to set
sampling rate. So this commit also affects the driver.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fcp.h')
-rw-r--r-- | sound/firewire/fcp.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sound/firewire/fcp.h b/sound/firewire/fcp.h index 86595688bd91..63ae4f7ce3af 100644 --- a/sound/firewire/fcp.h +++ b/sound/firewire/fcp.h @@ -1,8 +1,29 @@ #ifndef SOUND_FIREWIRE_FCP_H_INCLUDED #define SOUND_FIREWIRE_FCP_H_INCLUDED +#define AVC_PLUG_INFO_BUF_BYTES 4 + struct fw_unit; +/* + * AV/C Digital Interface Command Set General Specification 4.2 + * (Sep 2004, 1394TA) + */ +enum avc_general_plug_dir { + AVC_GENERAL_PLUG_DIR_IN = 0, + AVC_GENERAL_PLUG_DIR_OUT = 1, + AVC_GENERAL_PLUG_DIR_COUNT +}; +int avc_general_set_sig_fmt(struct fw_unit *unit, unsigned int rate, + enum avc_general_plug_dir dir, + unsigned short plug); +int avc_general_get_sig_fmt(struct fw_unit *unit, unsigned int *rate, + enum avc_general_plug_dir dir, + unsigned short plug); +int avc_general_get_plug_info(struct fw_unit *unit, unsigned int subunit_type, + unsigned int subunit_id, unsigned int subfunction, + u8 info[AVC_PLUG_INFO_BUF_BYTES]); + int fcp_avc_transaction(struct fw_unit *unit, const void *command, unsigned int command_size, void *response, unsigned int response_size, |