Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248173
b: refs/heads/master
c: 8839eed
h: refs/heads/master
i:
  248171: 0e4a428
v: v3
  • Loading branch information
Stefan Richter authored and Takashi Iwai committed May 11, 2011
1 parent f443a56 commit 0777129
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2934cd499ba2c7f605787508b4cfcfa3a45b0a4
refs/heads/master: 8839eedafd2e91e5b124730825e9b39b1ff493dd
17 changes: 14 additions & 3 deletions trunk/sound/firewire/isight.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -356,17 +356,24 @@ 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;

err = isight_connect(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,
Expand Down Expand Up @@ -400,6 +407,10 @@ static int isight_start_streaming(struct isight *isight)
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;
Expand Down

0 comments on commit 0777129

Please sign in to comment.