Commit 8839eeda authored by Stefan Richter's avatar Stefan Richter Committed by Takashi Iwai

ALSA: isight: add AudioEnable register write

which is needed to get the iSight to talk.
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f2934cd4
...@@ -345,7 +345,7 @@ static int isight_hw_free(struct snd_pcm_substream *substream) ...@@ -345,7 +345,7 @@ static int isight_hw_free(struct snd_pcm_substream *substream)
static int isight_start_streaming(struct isight *isight) static int isight_start_streaming(struct isight *isight)
{ {
__be32 sample_rate; __be32 value;
unsigned int i; unsigned int i;
int err; int err;
...@@ -356,10 +356,10 @@ static int isight_start_streaming(struct isight *isight) ...@@ -356,10 +356,10 @@ static int isight_start_streaming(struct isight *isight)
return 0; 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, err = snd_fw_transaction(isight->unit, TCODE_WRITE_QUADLET_REQUEST,
isight->audio_base + REG_SAMPLE_RATE, isight->audio_base + REG_SAMPLE_RATE,
&sample_rate, 4); &value, 4);
if (err < 0) if (err < 0)
return err; return err;
...@@ -367,6 +367,13 @@ static int isight_start_streaming(struct isight *isight) ...@@ -367,6 +367,13 @@ static int isight_start_streaming(struct isight *isight)
if (err < 0) if (err < 0)
goto error; 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, isight->context = fw_iso_context_create(isight->device->card,
FW_ISO_CONTEXT_RECEIVE, FW_ISO_CONTEXT_RECEIVE,
isight->resources.channel, isight->resources.channel,
...@@ -400,6 +407,10 @@ static int isight_start_streaming(struct isight *isight) ...@@ -400,6 +407,10 @@ static int isight_start_streaming(struct isight *isight)
fw_iso_context_destroy(isight->context); fw_iso_context_destroy(isight->context);
isight->context = NULL; isight->context = NULL;
err_resources: 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); fw_iso_resources_free(&isight->resources);
error: error:
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment