aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/s3c24xx/s3c-i2s-v2.c68
1 files changed, 30 insertions, 38 deletions
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c
index 65d1cddc4b3..b846f563cb5 100644
--- a/sound/soc/s3c24xx/s3c-i2s-v2.c
+++ b/sound/soc/s3c24xx/s3c-i2s-v2.c
@@ -463,29 +463,25 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
463 463
464 switch (div_id) { 464 switch (div_id) {
465 case S3C_I2SV2_DIV_BCLK: 465 case S3C_I2SV2_DIV_BCLK:
466 if (div > 3) { 466 switch (div) {
467 /* convert value to bit field */ 467 case 16:
468 468 div = S3C2412_IISMOD_BCLK_16FS;
469 switch (div) { 469 break;
470 case 16:
471 div = S3C2412_IISMOD_BCLK_16FS;
472 break;
473 470
474 case 32: 471 case 32:
475 div = S3C2412_IISMOD_BCLK_32FS; 472 div = S3C2412_IISMOD_BCLK_32FS;
476 break; 473 break;
477 474
478 case 24: 475 case 24:
479 div = S3C2412_IISMOD_BCLK_24FS; 476 div = S3C2412_IISMOD_BCLK_24FS;
480 break; 477 break;
481 478
482 case 48: 479 case 48:
483 div = S3C2412_IISMOD_BCLK_48FS; 480 div = S3C2412_IISMOD_BCLK_48FS;
484 break; 481 break;
485 482
486 default: 483 default:
487 return -EINVAL; 484 return -EINVAL;
488 }
489 } 485 }
490 486
491 reg = readl(i2s->regs + S3C2412_IISMOD); 487 reg = readl(i2s->regs + S3C2412_IISMOD);
@@ -496,29 +492,25 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
496 break; 492 break;
497 493
498 case S3C_I2SV2_DIV_RCLK: 494 case S3C_I2SV2_DIV_RCLK:
499 if (div > 3) { 495 switch (div) {
500 /* convert value to bit field */ 496 case 256:
501 497 div = S3C2412_IISMOD_RCLK_256FS;
502 switch (div) { 498 break;
503 case 256:
504 div = S3C2412_IISMOD_RCLK_256FS;
505 break;
506 499
507 case 384: 500 case 384:
508 div = S3C2412_IISMOD_RCLK_384FS; 501 div = S3C2412_IISMOD_RCLK_384FS;
509 break; 502 break;
510 503
511 case 512: 504 case 512:
512 div = S3C2412_IISMOD_RCLK_512FS; 505 div = S3C2412_IISMOD_RCLK_512FS;
513 break; 506 break;
514 507
515 case 768: 508 case 768:
516 div = S3C2412_IISMOD_RCLK_768FS; 509 div = S3C2412_IISMOD_RCLK_768FS;
517 break; 510 break;
518 511
519 default: 512 default:
520 return -EINVAL; 513 return -EINVAL;
521 }
522 } 514 }
523 515
524 reg = readl(i2s->regs + S3C2412_IISMOD); 516 reg = readl(i2s->regs + S3C2412_IISMOD);