diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-11 04:49:58 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-11 08:51:20 -0400 |
commit | 8839eedafd2e91e5b124730825e9b39b1ff493dd (patch) | |
tree | 3e7e331a9f4f7103b7432740666c2f4085a8213e | |
parent | f2934cd499ba2c7f605787508b4cfcfa3a45b0a4 (diff) |
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>
-rw-r--r-- | sound/firewire/isight.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c index 10a9b9b0b2c2..1a8da2614db6 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) | |||
345 | 345 | ||
346 | static int isight_start_streaming(struct isight *isight) | 346 | static int isight_start_streaming(struct isight *isight) |
347 | { | 347 | { |
348 | __be32 sample_rate; | 348 | __be32 value; |
349 | unsigned int i; | 349 | unsigned int i; |
350 | int err; | 350 | int err; |
351 | 351 | ||
@@ -356,10 +356,10 @@ static int isight_start_streaming(struct isight *isight) | |||
356 | return 0; | 356 | return 0; |
357 | } | 357 | } |
358 | 358 | ||
359 | sample_rate = cpu_to_be32(RATE_48000); | 359 | value = cpu_to_be32(RATE_48000); |
360 | err = snd_fw_transaction(isight->unit, TCODE_WRITE_QUADLET_REQUEST, | 360 | err = snd_fw_transaction(isight->unit, TCODE_WRITE_QUADLET_REQUEST, |
361 | isight->audio_base + REG_SAMPLE_RATE, | 361 | isight->audio_base + REG_SAMPLE_RATE, |
362 | &sample_rate, 4); | 362 | &value, 4); |
363 | if (err < 0) | 363 | if (err < 0) |
364 | return err; | 364 | return err; |
365 | 365 | ||
@@ -367,6 +367,13 @@ static int isight_start_streaming(struct isight *isight) | |||
367 | if (err < 0) | 367 | if (err < 0) |
368 | goto error; | 368 | goto error; |
369 | 369 | ||
370 | value = cpu_to_be32(AUDIO_ENABLE); | ||
371 | err = snd_fw_transaction(isight->unit, TCODE_WRITE_QUADLET_REQUEST, | ||
372 | isight->audio_base + REG_AUDIO_ENABLE, | ||
373 | &value, 4); | ||
374 | if (err < 0) | ||
375 | goto err_resources; | ||
376 | |||
370 | isight->context = fw_iso_context_create(isight->device->card, | 377 | isight->context = fw_iso_context_create(isight->device->card, |
371 | FW_ISO_CONTEXT_RECEIVE, | 378 | FW_ISO_CONTEXT_RECEIVE, |
372 | isight->resources.channel, | 379 | isight->resources.channel, |
@@ -400,6 +407,10 @@ err_context: | |||
400 | fw_iso_context_destroy(isight->context); | 407 | fw_iso_context_destroy(isight->context); |
401 | isight->context = NULL; | 408 | isight->context = NULL; |
402 | err_resources: | 409 | err_resources: |
410 | value = 0; | ||
411 | snd_fw_transaction(isight->unit, TCODE_WRITE_QUADLET_REQUEST, | ||
412 | isight->audio_base + REG_AUDIO_ENABLE, | ||
413 | &value, 4); | ||
403 | fw_iso_resources_free(&isight->resources); | 414 | fw_iso_resources_free(&isight->resources); |
404 | error: | 415 | error: |
405 | return err; | 416 | return err; |