Skip to content

Commit

Permalink
ALSA: fireworks: Add PCM interface
Browse files Browse the repository at this point in the history
This commit adds a functionality to capture/playback PCM samples.

When AMDTP stream is already running for PCM or the source of clock is not
internal, available sampling rate is limited at current one.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Sakamoto authored and Takashi Iwai committed May 26, 2014
1 parent 53111cd commit aa02bb6
Show file tree
Hide file tree
Showing 6 changed files with 404 additions and 34 deletions.
1 change: 1 addition & 0 deletions sound/firewire/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ config SND_FIREWORKS
tristate "Echo Fireworks board module support"
select SND_FIREWIRE_LIB
select SND_RAWMIDI
select SND_PCM
help
Say Y here to include support for FireWire devices based
on Echo Digital Audio Fireworks board:
Expand Down
2 changes: 1 addition & 1 deletion sound/firewire/fireworks/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
snd-fireworks-objs := fireworks_transaction.o fireworks_command.o \
fireworks_stream.o fireworks_proc.o fireworks_midi.o \
fireworks.o
fireworks_pcm.o fireworks.o
obj-m += snd-fireworks.o
4 changes: 4 additions & 0 deletions sound/firewire/fireworks/fireworks.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ efw_probe(struct fw_unit *unit,
goto error;
}

err = snd_efw_create_pcm_devices(efw);
if (err < 0)
goto error;

err = snd_efw_stream_init_duplex(efw);
if (err < 0)
goto error;
Expand Down
4 changes: 4 additions & 0 deletions sound/firewire/fireworks/fireworks.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <sound/pcm.h>
#include <sound/info.h>
#include <sound/rawmidi.h>
#include <sound/pcm_params.h>

#include "../packets-buffer.h"
#include "../iso-resources.h"
Expand Down Expand Up @@ -201,6 +202,9 @@ void snd_efw_proc_init(struct snd_efw *efw);

int snd_efw_create_midi_devices(struct snd_efw *efw);

int snd_efw_create_pcm_devices(struct snd_efw *efw);
int snd_efw_get_multiplier_mode(unsigned int sampling_rate, unsigned int *mode);

#define SND_EFW_DEV_ENTRY(vendor, model) \
{ \
.match_flags = IEEE1394_MATCH_VENDOR_ID | \
Expand Down
Loading

0 comments on commit aa02bb6

Please sign in to comment.