Skip to content

Commit

Permalink
ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver
Browse files Browse the repository at this point in the history
Add a driver for two playback-only FireWire devices based on the OXFW970
chip.

v2: better AMDTP API abstraction; fix fw_unit leak; small fixes
v3: cache the iPCR value
v4: FireWave constraints; fix fw_device reference counting;
    fix PCR caching; small changes and fixes
v5: volume/mute support; fix crashing due to pcm stop races
v6: fix build; one-channel volume for LaCie
v7: use signed values to make volume (range checks) work; fix function
    block IDs for volume/mute; always use channel 0 for LaCie volume

Signed-off-by: Clemens Ladisch <[email protected]>
Acked-by: Stefan Richter <[email protected]>
Tested-by: Jay Fenlason <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
cladisch authored and tiwai committed Mar 15, 2011
1 parent a5abba9 commit 31ef913
Show file tree
Hide file tree
Showing 20 changed files with 2,651 additions and 4 deletions.
1 change: 1 addition & 0 deletions drivers/firewire/core-iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,4 @@ void fw_iso_resource_manage(struct fw_card *card, int generation,
*channel = ret;
}
}
EXPORT_SYMBOL(fw_iso_resource_manage);
3 changes: 0 additions & 3 deletions drivers/firewire/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event);
/* -iso */

int fw_iso_buffer_map(struct fw_iso_buffer *buffer, struct vm_area_struct *vma);
void fw_iso_resource_manage(struct fw_card *card, int generation,
u64 channels_mask, int *channel, int *bandwidth,
bool allocate, __be32 buffer[2]);


/* -topology */
Expand Down
7 changes: 7 additions & 0 deletions include/linux/firewire.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
#define CSR_BROADCAST_CHANNEL 0x234
#define CSR_CONFIG_ROM 0x400
#define CSR_CONFIG_ROM_END 0x800
#define CSR_OMPR 0x900
#define CSR_OPCR(i) (0x904 + (i) * 4)
#define CSR_IMPR 0x980
#define CSR_IPCR(i) (0x984 + (i) * 4)
#define CSR_FCP_COMMAND 0xB00
#define CSR_FCP_RESPONSE 0xD00
#define CSR_FCP_END 0xF00
Expand Down Expand Up @@ -441,5 +445,8 @@ int fw_iso_context_start(struct fw_iso_context *ctx,
int cycle, int sync, int tags);
int fw_iso_context_stop(struct fw_iso_context *ctx);
void fw_iso_context_destroy(struct fw_iso_context *ctx);
void fw_iso_resource_manage(struct fw_card *card, int generation,
u64 channels_mask, int *channel, int *bandwidth,
bool allocate, __be32 buffer[2]);

#endif /* _LINUX_FIREWIRE_H */
2 changes: 2 additions & 0 deletions sound/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ source "sound/sh/Kconfig"
# here assuming USB is defined before ALSA
source "sound/usb/Kconfig"

source "sound/firewire/Kconfig"

# the following will depend on the order of config.
# here assuming PCMCIA is defined before ALSA
source "sound/pcmcia/Kconfig"
Expand Down
2 changes: 1 addition & 1 deletion sound/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ obj-$(CONFIG_SOUND_PRIME) += sound_firmware.o
obj-$(CONFIG_SOUND_PRIME) += oss/
obj-$(CONFIG_DMASOUND) += oss/
obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ sh/ synth/ usb/ \
sparc/ spi/ parisc/ pcmcia/ mips/ soc/ atmel/
firewire/ sparc/ spi/ parisc/ pcmcia/ mips/ soc/ atmel/
obj-$(CONFIG_SND_AOA) += aoa/

# This one must be compilable even if sound is configured out
Expand Down
25 changes: 25 additions & 0 deletions sound/firewire/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
menuconfig SND_FIREWIRE
bool "FireWire sound devices"
depends on FIREWIRE
default y
help
Support for IEEE-1394/FireWire/iLink sound devices.

if SND_FIREWIRE && FIREWIRE

config SND_FIREWIRE_LIB
tristate
depends on SND_PCM

config SND_FIREWIRE_SPEAKERS
tristate "FireWire speakers"
select SND_PCM
select SND_FIREWIRE_LIB
help
Say Y here to include support for the Griffin FireWave Surround
and the LaCie FireWire Speakers.

To compile this driver as a module, choose M here: the module
will be called snd-firewire-speakers.

endif # SND_FIREWIRE
6 changes: 6 additions & 0 deletions sound/firewire/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
snd-firewire-lib-objs := lib.o iso-resources.o packets-buffer.o \
fcp.o cmp.o amdtp.o
snd-firewire-speakers-objs := speakers.o

obj-$(CONFIG_SND_FIREWIRE_LIB) += snd-firewire-lib.o
obj-$(CONFIG_SND_FIREWIRE_SPEAKERS) += snd-firewire-speakers.o
Loading

0 comments on commit 31ef913

Please sign in to comment.