diff options
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-audio.c')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-audio.c | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/video/cx25840/cx25840-audio.c index 6faad34df3ac..34b96c7cfd62 100644 --- a/drivers/media/video/cx25840/cx25840-audio.c +++ b/drivers/media/video/cx25840/cx25840-audio.c | |||
@@ -437,41 +437,45 @@ void cx25840_audio_set_path(struct i2c_client *client) | |||
437 | { | 437 | { |
438 | struct cx25840_state *state = to_state(i2c_get_clientdata(client)); | 438 | struct cx25840_state *state = to_state(i2c_get_clientdata(client)); |
439 | 439 | ||
440 | /* assert soft reset */ | 440 | if (!is_cx2583x(state)) { |
441 | cx25840_and_or(client, 0x810, ~0x1, 0x01); | 441 | /* assert soft reset */ |
442 | cx25840_and_or(client, 0x810, ~0x1, 0x01); | ||
442 | 443 | ||
443 | /* stop microcontroller */ | 444 | /* stop microcontroller */ |
444 | cx25840_and_or(client, 0x803, ~0x10, 0); | 445 | cx25840_and_or(client, 0x803, ~0x10, 0); |
445 | 446 | ||
446 | /* Mute everything to prevent the PFFT! */ | 447 | /* Mute everything to prevent the PFFT! */ |
447 | cx25840_write(client, 0x8d3, 0x1f); | 448 | cx25840_write(client, 0x8d3, 0x1f); |
448 | 449 | ||
449 | if (state->aud_input == CX25840_AUDIO_SERIAL) { | 450 | if (state->aud_input == CX25840_AUDIO_SERIAL) { |
450 | /* Set Path1 to Serial Audio Input */ | 451 | /* Set Path1 to Serial Audio Input */ |
451 | cx25840_write4(client, 0x8d0, 0x01011012); | 452 | cx25840_write4(client, 0x8d0, 0x01011012); |
452 | 453 | ||
453 | /* The microcontroller should not be started for the | 454 | /* The microcontroller should not be started for the |
454 | * non-tuner inputs: autodetection is specific for | 455 | * non-tuner inputs: autodetection is specific for |
455 | * TV audio. */ | 456 | * TV audio. */ |
456 | } else { | 457 | } else { |
457 | /* Set Path1 to Analog Demod Main Channel */ | 458 | /* Set Path1 to Analog Demod Main Channel */ |
458 | cx25840_write4(client, 0x8d0, 0x1f063870); | 459 | cx25840_write4(client, 0x8d0, 0x1f063870); |
460 | } | ||
459 | } | 461 | } |
460 | 462 | ||
461 | set_audclk_freq(client, state->audclk_freq); | 463 | set_audclk_freq(client, state->audclk_freq); |
462 | 464 | ||
463 | if (state->aud_input != CX25840_AUDIO_SERIAL) { | 465 | if (!is_cx2583x(state)) { |
464 | /* When the microcontroller detects the | 466 | if (state->aud_input != CX25840_AUDIO_SERIAL) { |
465 | * audio format, it will unmute the lines */ | 467 | /* When the microcontroller detects the |
466 | cx25840_and_or(client, 0x803, ~0x10, 0x10); | 468 | * audio format, it will unmute the lines */ |
467 | } | 469 | cx25840_and_or(client, 0x803, ~0x10, 0x10); |
470 | } | ||
468 | 471 | ||
469 | /* deassert soft reset */ | 472 | /* deassert soft reset */ |
470 | cx25840_and_or(client, 0x810, ~0x1, 0x00); | 473 | cx25840_and_or(client, 0x810, ~0x1, 0x00); |
471 | 474 | ||
472 | /* Ensure the controller is running when we exit */ | 475 | /* Ensure the controller is running when we exit */ |
473 | if (is_cx2388x(state) || is_cx231xx(state)) | 476 | if (is_cx2388x(state) || is_cx231xx(state)) |
474 | cx25840_and_or(client, 0x803, ~0x10, 0x10); | 477 | cx25840_and_or(client, 0x803, ~0x10, 0x10); |
478 | } | ||
475 | } | 479 | } |
476 | 480 | ||
477 | static void set_volume(struct i2c_client *client, int volume) | 481 | static void set_volume(struct i2c_client *client, int volume) |