aboutsummaryrefslogtreecommitdiff
path: root/sound/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2011-05-11 10:49:58 +0200
committerTakashi Iwai <tiwai@suse.de>2011-05-11 14:51:20 +0200
commit8839eedafd2e91e5b124730825e9b39b1ff493dd (patch)
tree3e7e331a9f4f7103b7432740666c2f4085a8213e /sound/firewire
parentf2934cd499ba2c7f605787508b4cfcfa3a45b0a4 (diff)
downloadlinux-8839eedafd2e91e5b124730825e9b39b1ff493dd.tar.gz
ALSA: isight: add AudioEnable register write
which is needed to get the iSight to talk. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r--sound/firewire/isight.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c
index 10a9b9b0b2c..1a8da2614db 100644
--- a/sound/firewire/isight.c
+++ b/sound/firewire/isight.c
@@ -345,7 +345,7 @@ static int isight_hw_free(struct snd_pcm_substream *substream)
static int isight_start_streaming(struct isight *isight)
{
- __be32 sample_rate;
+ __be32 value;
unsigned int i;
int err;
@@ -356,10 +356,10 @@ static int isight_start_streaming(struct isight *isight)
return 0;
}
- sample_rate = cpu_to_be32(RATE_48000);
+ value = cpu_to_be32(RATE_48000);
err = snd_fw_transaction(isight->unit, TCODE_WRITE_QUADLET_REQUEST,
isight->audio_base + REG_SAMPLE_RATE,
- &sample_rate, 4);
+ &value, 4);
if (err < 0)
return err;
@@ -367,6 +367,13 @@ static int isight_start_streaming(struct isight *isight)
if (err < 0)
goto error;
+ value = cpu_to_be32(AUDIO_ENABLE);
+ err = snd_fw_transaction(isight->unit, TCODE_WRITE_QUADLET_REQUEST,
+ isight->audio_base + REG_AUDIO_ENABLE,
+ &value, 4);
+ if (err < 0)
+ goto err_resources;
+
isight->context = fw_iso_context_create(isight->device->card,
FW_ISO_CONTEXT_RECEIVE,
isight->resources.channel,
@@ -400,6 +407,10 @@ err_context:
fw_iso_context_destroy(isight->context);
isight->context = NULL;
err_resources:
+ value = 0;
+ snd_fw_transaction(isight->unit, TCODE_WRITE_QUADLET_REQUEST,
+ isight->audio_base + REG_AUDIO_ENABLE,
+ &value, 4);
fw_iso_resources_free(&isight->resources);
error:
return err;