.. | .. |
---|
442 | 442 | /* power up class d */ |
---|
443 | 443 | pr_debug("SND_SOC_DAPM_PRE_PMU = 0x%x\n", event); |
---|
444 | 444 | /* read the clock configure */ |
---|
445 | | - regv1 = snd_soc_component_read32(component, ES8396_CLK_CTRL_REG08); |
---|
| 445 | + regv1 = snd_soc_component_read(component, ES8396_CLK_CTRL_REG08); |
---|
446 | 446 | regv1 &= 0xcf; |
---|
447 | 447 | /* enable class d clock */ |
---|
448 | 448 | snd_soc_component_write(component, ES8396_CLK_CTRL_REG08, regv1); |
---|
.. | .. |
---|
452 | 452 | snd_soc_component_update_bits(component, ES8396_DAC_REF_PWR_CTRL_REG6E, |
---|
453 | 453 | 0xff, 0x34); |
---|
454 | 454 | |
---|
455 | | - regv2 = snd_soc_component_read32(component, ES8396_SPK_CTRL_1_REG3C); |
---|
| 455 | + regv2 = snd_soc_component_read(component, ES8396_SPK_CTRL_1_REG3C); |
---|
456 | 456 | /* set speaker ldo level */ |
---|
457 | 457 | if (es8396_valid_spkldo(es8396->spk_ldo_lvl) == false) { |
---|
458 | 458 | pr_err("speaker LDO Level error.\n"); |
---|
.. | .. |
---|
473 | 473 | |
---|
474 | 474 | snd_soc_component_write(component, ES8396_SPK_CTRL_2_REG3D, 0x10); |
---|
475 | 475 | |
---|
476 | | - regv1 = snd_soc_component_read32(component, ES8396_SPK_MIXER_REG26); |
---|
| 476 | + regv1 = snd_soc_component_read(component, ES8396_SPK_MIXER_REG26); |
---|
477 | 477 | /* clear pdnspkl_biasgen, clear pdnspkr_biasgen */ |
---|
478 | 478 | regv1 &= 0xee; |
---|
479 | 479 | snd_soc_component_write(component, ES8396_SPK_MIXER_REG26, regv1); |
---|
.. | .. |
---|
484 | 484 | snd_soc_component_write(component, ES8396_DAC_LDAC_VOL_REG6A, 0x00); |
---|
485 | 485 | snd_soc_component_write(component, ES8396_DAC_RDAC_VOL_REG6B, 0x00); |
---|
486 | 486 | |
---|
487 | | - regv1 = snd_soc_component_read32(component, ES8396_HP_MIXER_BOOST_REG2B); |
---|
| 487 | + regv1 = snd_soc_component_read(component, ES8396_HP_MIXER_BOOST_REG2B); |
---|
488 | 488 | regv1 &= 0xcc; |
---|
489 | 489 | snd_soc_component_write(component, ES8396_HP_MIXER_BOOST_REG2B, regv1); |
---|
490 | 490 | |
---|
491 | | - regv1 = snd_soc_component_read32(component, ES8396_CPHP_CTRL_3_REG44); |
---|
| 491 | + regv1 = snd_soc_component_read(component, ES8396_CPHP_CTRL_3_REG44); |
---|
492 | 492 | regv1 &= 0xcc; |
---|
493 | 493 | snd_soc_component_write(component, ES8396_CPHP_CTRL_3_REG44, regv1); |
---|
494 | 494 | |
---|
495 | | - regv1 = snd_soc_component_read32(component, ES8396_CPHP_CTRL_1_REG42); |
---|
| 495 | + regv1 = snd_soc_component_read(component, ES8396_CPHP_CTRL_1_REG42); |
---|
496 | 496 | regv1 &= 0xdf; |
---|
497 | 497 | snd_soc_component_write(component, ES8396_CPHP_CTRL_1_REG42, regv1); |
---|
498 | 498 | |
---|
499 | | - regv1 = snd_soc_component_read32(component, ES8396_CPHP_CTRL_2_REG43); |
---|
| 499 | + regv1 = snd_soc_component_read(component, ES8396_CPHP_CTRL_2_REG43); |
---|
500 | 500 | regv1 &= 0x7f; |
---|
501 | 501 | snd_soc_component_write(component, ES8396_CPHP_CTRL_2_REG43, regv1); |
---|
502 | 502 | es8396->output_device_selected = 0; |
---|
.. | .. |
---|
509 | 509 | case SND_SOC_DAPM_PRE_PMD: /* prepare power down */ |
---|
510 | 510 | pr_debug("SND_SOC_DAPM_PRE_PMD = 0x%x\n", event); |
---|
511 | 511 | /* read the clock configure */ |
---|
512 | | - regv1 = snd_soc_component_read32(component, ES8396_CLK_CTRL_REG08); |
---|
| 512 | + regv1 = snd_soc_component_read(component, ES8396_CLK_CTRL_REG08); |
---|
513 | 513 | regv1 |= 0x10; |
---|
514 | 514 | /* stop class d clock */ |
---|
515 | 515 | snd_soc_component_write(component, ES8396_CLK_CTRL_REG08, regv1); |
---|
516 | 516 | /* dac csm startup, dac digital still on */ |
---|
517 | 517 | /* snd_soc_component_update_bits(w->component, ES8396_DAC_CSM_REG66, |
---|
518 | 518 | 0x01, 0x01); */ |
---|
519 | | - regv1 = snd_soc_component_read32(component, ES8396_SPK_EN_VOL_REG3B); |
---|
| 519 | + regv1 = snd_soc_component_read(component, ES8396_SPK_EN_VOL_REG3B); |
---|
520 | 520 | regv1 &= 0x77; |
---|
521 | 521 | /* clear enspk_l,enspk_r */ |
---|
522 | 522 | snd_soc_component_write(component, ES8396_SPK_EN_VOL_REG3B, regv1); |
---|
523 | 523 | |
---|
524 | | - regv1 = snd_soc_component_read32(component, ES8396_SPK_CTRL_SRC_REG3A); |
---|
| 524 | + regv1 = snd_soc_component_read(component, ES8396_SPK_CTRL_SRC_REG3A); |
---|
525 | 525 | regv1 |= 0x44; /* set pdnspkl_biasgen, set pdnspkr_biasgen */ |
---|
526 | 526 | snd_soc_component_write(component, ES8396_SPK_CTRL_SRC_REG3A, regv1); |
---|
527 | | - regv1 = snd_soc_component_read32(component, ES8396_SPK_MIXER_REG26); |
---|
| 527 | + regv1 = snd_soc_component_read(component, ES8396_SPK_MIXER_REG26); |
---|
528 | 528 | /* clear pdnspkl_biasgen, clear pdnspkr_biasgen */ |
---|
529 | 529 | regv1 |= 0x11; |
---|
530 | 530 | snd_soc_component_write(component, ES8396_SPK_MIXER_REG26, regv1); |
---|
.. | .. |
---|
560 | 560 | snd_soc_component_write(component, ES8396_SYS_MICBIAS_CTRL_REG74, |
---|
561 | 561 | regv); |
---|
562 | 562 | } |
---|
563 | | - regv = snd_soc_component_read32(component, ES8396_ALRCK_GPIO_SEL_REG15); |
---|
| 563 | + regv = snd_soc_component_read(component, ES8396_ALRCK_GPIO_SEL_REG15); |
---|
564 | 564 | if (es8396->dmic_amic == MIC_DMIC) { |
---|
565 | 565 | regv &= 0xf0; /* enable DMIC CLK */ |
---|
566 | 566 | regv |= 0x0A; |
---|
.. | .. |
---|
570 | 570 | snd_soc_component_write(component, ES8396_ALRCK_GPIO_SEL_REG15, regv); |
---|
571 | 571 | break; |
---|
572 | 572 | case SND_SOC_DAPM_POST_PMD: |
---|
573 | | - regv = snd_soc_component_read32(component, ES8396_ALRCK_GPIO_SEL_REG15); |
---|
| 573 | + regv = snd_soc_component_read(component, ES8396_ALRCK_GPIO_SEL_REG15); |
---|
574 | 574 | regv &= 0xf0; /* disable DMIC CLK */ |
---|
575 | 575 | snd_soc_component_write(component, ES8396_ALRCK_GPIO_SEL_REG15, regv); |
---|
576 | 576 | break; |
---|
.. | .. |
---|
618 | 618 | snd_soc_component_write(component, ES8396_SYS_MIC_IBIAS_EN_REG75, 0x02); |
---|
619 | 619 | |
---|
620 | 620 | /* axMixer Gain boost */ |
---|
621 | | - regv = snd_soc_component_read32(component, ES8396_AX_MIXER_BOOST_REG2F); |
---|
| 621 | + regv = snd_soc_component_read(component, ES8396_AX_MIXER_BOOST_REG2F); |
---|
622 | 622 | regv |= 0x88; |
---|
623 | 623 | snd_soc_component_write(component, ES8396_AX_MIXER_BOOST_REG2F, regv); |
---|
624 | 624 | /* axmixer vol = +12db */ |
---|
.. | .. |
---|
627 | 627 | snd_soc_component_write(component, ES8396_AX_MIXER_REF_LP_REG31, 0x02); |
---|
628 | 628 | |
---|
629 | 629 | /* MNMixer Gain boost */ |
---|
630 | | - regv = snd_soc_component_read32(component, ES8396_MN_MIXER_BOOST_REG37); |
---|
| 630 | + regv = snd_soc_component_read(component, ES8396_MN_MIXER_BOOST_REG37); |
---|
631 | 631 | regv |= 0x88; |
---|
632 | 632 | snd_soc_component_write(component, ES8396_MN_MIXER_BOOST_REG37, regv); |
---|
633 | 633 | /* mnmixer vol = +12db */ |
---|
.. | .. |
---|
700 | 700 | snd_soc_component_update_bits(component, ES8396_DAC_REF_PWR_CTRL_REG6E, |
---|
701 | 701 | 0xC0, 0xC0); |
---|
702 | 702 | /* read the clock configure */ |
---|
703 | | - regv = snd_soc_component_read32(component, ES8396_CLK_CTRL_REG08); |
---|
| 703 | + regv = snd_soc_component_read(component, ES8396_CLK_CTRL_REG08); |
---|
704 | 704 | regv |= 0x20; |
---|
705 | 705 | /* stop charge pump clock */ |
---|
706 | 706 | snd_soc_component_write(component, ES8396_CLK_CTRL_REG08, regv); |
---|
707 | 707 | |
---|
708 | | - regv = snd_soc_component_read32(component, ES8396_HP_MIXER_BOOST_REG2B); |
---|
| 708 | + regv = snd_soc_component_read(component, ES8396_HP_MIXER_BOOST_REG2B); |
---|
709 | 709 | regv |= 0x11; |
---|
710 | 710 | snd_soc_component_write(component, ES8396_HP_MIXER_BOOST_REG2B, regv); |
---|
711 | 711 | break; |
---|
.. | .. |
---|
1967 | 1967 | /* Allow no source specification when stopping */ |
---|
1968 | 1968 | if (freq_out) |
---|
1969 | 1969 | return -EINVAL; |
---|
1970 | | - reg = snd_soc_component_read32(component, ES8396_CLK_SRC_SEL_REG01); |
---|
| 1970 | + reg = snd_soc_component_read(component, ES8396_CLK_SRC_SEL_REG01); |
---|
1971 | 1971 | reg &= 0xF0; |
---|
1972 | 1972 | if (source == 0) |
---|
1973 | 1973 | reg |= 0x01; /* clksrc2= 0, clksrc1 = 1 */ |
---|
.. | .. |
---|
1975 | 1975 | reg |= 0x09; /* clksrc2= 1, clksrc1 = 1 */ |
---|
1976 | 1976 | |
---|
1977 | 1977 | snd_soc_component_write(component, ES8396_CLK_SRC_SEL_REG01, reg); |
---|
1978 | | - reg = snd_soc_component_read32(component, ES8396_CLK_CTRL_REG08); |
---|
| 1978 | + reg = snd_soc_component_read(component, ES8396_CLK_CTRL_REG08); |
---|
1979 | 1979 | reg |= 0x0F; |
---|
1980 | 1980 | snd_soc_component_write(component, ES8396_CLK_CTRL_REG08, reg); |
---|
1981 | 1981 | pr_debug("ES8396 PLL No Clock source\n"); |
---|
1982 | 1982 | break; |
---|
1983 | 1983 | case ES8396_PLL_SRC_FRM_MCLK: |
---|
1984 | | - reg = snd_soc_component_read32(component, ES8396_CLK_SRC_SEL_REG01); |
---|
| 1984 | + reg = snd_soc_component_read(component, ES8396_CLK_SRC_SEL_REG01); |
---|
1985 | 1985 | reg &= 0xF3; |
---|
1986 | 1986 | reg |= 0x04; /* clksrc2= mclk */ |
---|
1987 | 1987 | /* use clk2 for pll clk source */ |
---|
1988 | 1988 | snd_soc_component_write(component, ES8396_CLK_SRC_SEL_REG01, reg); |
---|
1989 | | - reg = snd_soc_component_read32(component, ES8396_CLK_CTRL_REG08); |
---|
| 1989 | + reg = snd_soc_component_read(component, ES8396_CLK_CTRL_REG08); |
---|
1990 | 1990 | reg |= 0x0F; |
---|
1991 | 1991 | snd_soc_component_write(component, ES8396_CLK_CTRL_REG08, reg); |
---|
1992 | 1992 | pr_debug("ES8396 PLL Clock Source from MCLK pin\n"); |
---|
1993 | 1993 | break; |
---|
1994 | 1994 | case ES8396_PLL_SRC_FRM_BCLK: |
---|
1995 | | - reg = snd_soc_component_read32(component, ES8396_CLK_SRC_SEL_REG01); |
---|
| 1995 | + reg = snd_soc_component_read(component, ES8396_CLK_SRC_SEL_REG01); |
---|
1996 | 1996 | reg &= 0xF3; |
---|
1997 | 1997 | reg |= 0x0c; /* clksrc2= bclk, */ |
---|
1998 | 1998 | /* use clk2 for pll clk source */ |
---|
1999 | 1999 | snd_soc_component_write(component, ES8396_CLK_SRC_SEL_REG01, reg); |
---|
2000 | | - reg = snd_soc_component_read32(component, ES8396_CLK_CTRL_REG08); |
---|
| 2000 | + reg = snd_soc_component_read(component, ES8396_CLK_CTRL_REG08); |
---|
2001 | 2001 | reg |= 0x0F; |
---|
2002 | 2002 | snd_soc_component_write(component, ES8396_CLK_CTRL_REG08, reg); |
---|
2003 | 2003 | pr_debug("ES8396 PLL Clock Source from BCLK signal\n"); |
---|
.. | .. |
---|
2116 | 2116 | switch (clk_id) { |
---|
2117 | 2117 | /* the clock source form MCLK pin, don't use PLL */ |
---|
2118 | 2118 | case ES8396_CLKID_MCLK: |
---|
2119 | | - reg = snd_soc_component_read32(component, ES8396_CLK_SRC_SEL_REG01); |
---|
| 2119 | + reg = snd_soc_component_read(component, ES8396_CLK_SRC_SEL_REG01); |
---|
2120 | 2120 | reg &= 0xFC; |
---|
2121 | 2121 | reg |= 0x00; /* clksrc1= mclk */ |
---|
2122 | 2122 | snd_soc_component_write(component, ES8396_CLK_SRC_SEL_REG01, reg); |
---|
2123 | 2123 | |
---|
2124 | 2124 | /* always use clk1 */ |
---|
2125 | | - reg = snd_soc_component_read32(component, ES8396_CLK_CTRL_REG08); |
---|
| 2125 | + reg = snd_soc_component_read(component, ES8396_CLK_CTRL_REG08); |
---|
2126 | 2126 | reg &= 0xf0; |
---|
2127 | 2127 | snd_soc_component_write(component, ES8396_CLK_CTRL_REG08, reg); |
---|
2128 | 2128 | |
---|
.. | .. |
---|
2158 | 2158 | break; |
---|
2159 | 2159 | /* the clock source form internal BCLK signal, don't use PLL */ |
---|
2160 | 2160 | case ES8396_CLKID_BCLK: |
---|
2161 | | - reg = snd_soc_component_read32(component, ES8396_CLK_SRC_SEL_REG01); |
---|
| 2161 | + reg = snd_soc_component_read(component, ES8396_CLK_SRC_SEL_REG01); |
---|
2162 | 2162 | reg &= 0xFC; |
---|
2163 | 2163 | reg |= 0x03; /* clksrc1= bclk */ |
---|
2164 | 2164 | snd_soc_component_write(component, ES8396_CLK_SRC_SEL_REG01, reg); |
---|
2165 | 2165 | /* always use clk1 */ |
---|
2166 | | - reg = snd_soc_component_read32(component, ES8396_CLK_CTRL_REG08); |
---|
| 2166 | + reg = snd_soc_component_read(component, ES8396_CLK_CTRL_REG08); |
---|
2167 | 2167 | reg &= 0xf0; |
---|
2168 | 2168 | snd_soc_component_write(component, ES8396_CLK_CTRL_REG08, reg); |
---|
2169 | 2169 | |
---|
.. | .. |
---|
2301 | 2301 | |
---|
2302 | 2302 | switch (id) { |
---|
2303 | 2303 | case ES8396_SDP1: |
---|
2304 | | - spc = snd_soc_component_read32(component, ES8396_SDP1_IN_FMT_REG1F) & 0x3f; |
---|
2305 | | - mmcc = snd_soc_component_read32(component, ES8396_SDP_1_MS_REG12); |
---|
| 2304 | + spc = snd_soc_component_read(component, ES8396_SDP1_IN_FMT_REG1F) & 0x3f; |
---|
| 2305 | + mmcc = snd_soc_component_read(component, ES8396_SDP_1_MS_REG12); |
---|
2306 | 2306 | break; |
---|
2307 | 2307 | case ES8396_SDP2: |
---|
2308 | | - spc = snd_soc_component_read32(component, ES8396_SDP2_IN_FMT_REG22) & 0x3f; |
---|
2309 | | - mmcc = snd_soc_component_read32(component, ES8396_SDP_2_MS_REG13); |
---|
| 2308 | + spc = snd_soc_component_read(component, ES8396_SDP2_IN_FMT_REG22) & 0x3f; |
---|
| 2309 | + mmcc = snd_soc_component_read(component, ES8396_SDP_2_MS_REG13); |
---|
2310 | 2310 | break; |
---|
2311 | 2311 | case ES8396_SDP3: |
---|
2312 | | - spc = snd_soc_component_read32(component, ES8396_SDP3_IN_FMT_REG24) & 0x3f; |
---|
2313 | | - mmcc = snd_soc_component_read32(component, ES8396_SDP_3_MS_REG14); |
---|
| 2312 | + spc = snd_soc_component_read(component, ES8396_SDP3_IN_FMT_REG24) & 0x3f; |
---|
| 2313 | + mmcc = snd_soc_component_read(component, ES8396_SDP_3_MS_REG14); |
---|
2314 | 2314 | break; |
---|
2315 | 2315 | default: |
---|
2316 | 2316 | return -EINVAL; |
---|
.. | .. |
---|
2398 | 2398 | |
---|
2399 | 2399 | switch (id) { |
---|
2400 | 2400 | case ES8396_SDP1: |
---|
2401 | | - bdiv = snd_soc_component_read32(component, ES8396_BCLK_DIV_M2_REG0F); |
---|
| 2401 | + bdiv = snd_soc_component_read(component, ES8396_BCLK_DIV_M2_REG0F); |
---|
2402 | 2402 | bdiv &= 0xe0; |
---|
2403 | 2403 | bdiv |= es8396_mclk_coeffs[mclk_coeff].bclkdiv; |
---|
2404 | | - lrdiv = snd_soc_component_read32(component, ES8396_LRCK_DIV_M4_REG11); |
---|
| 2404 | + lrdiv = snd_soc_component_read(component, ES8396_LRCK_DIV_M4_REG11); |
---|
2405 | 2405 | lrdiv &= 0xe0; |
---|
2406 | 2406 | lrdiv |= 0x22; /* es8396_mclk_coeffs[mclk_coeff].lrcdiv; */ |
---|
2407 | 2407 | snd_soc_component_write(component, ES8396_BCLK_DIV_M2_REG0F, bdiv); |
---|
.. | .. |
---|
2412 | 2412 | break; |
---|
2413 | 2413 | case ES8396_SDP2: |
---|
2414 | 2414 | case ES8396_SDP3: |
---|
2415 | | - bdiv = snd_soc_component_read32(component, ES8396_BCLK_DIV_M1_REG0E); |
---|
| 2415 | + bdiv = snd_soc_component_read(component, ES8396_BCLK_DIV_M1_REG0E); |
---|
2416 | 2416 | bdiv &= 0xe0; |
---|
2417 | 2417 | bdiv |= es8396_mclk_coeffs[mclk_coeff].bclkdiv; |
---|
2418 | | - lrdiv = snd_soc_component_read32(component, ES8396_LRCK_DIV_M3_REG10); |
---|
| 2418 | + lrdiv = snd_soc_component_read(component, ES8396_LRCK_DIV_M3_REG10); |
---|
2419 | 2419 | lrdiv &= 0xe0; |
---|
2420 | 2420 | lrdiv |= es8396_mclk_coeffs[mclk_coeff].lrcdiv; |
---|
2421 | 2421 | snd_soc_component_write(component, ES8396_BCLK_DIV_M1_REG0E, bdiv); |
---|
.. | .. |
---|
2511 | 2511 | int i; |
---|
2512 | 2512 | |
---|
2513 | 2513 | pr_debug(">>>>>>>>es8396_pcm_startup\n"); |
---|
2514 | | - ret = snd_soc_component_read32(component, ES8396_ADC_CSM_REG53); |
---|
| 2514 | + ret = snd_soc_component_read(component, ES8396_ADC_CSM_REG53); |
---|
2515 | 2515 | pr_debug("ES8396_ADC_CSM_REG53===0x%x\n", ret); |
---|
2516 | 2516 | /* |
---|
2517 | 2517 | * set the clock source to MCLK pin |
---|
.. | .. |
---|
2571 | 2571 | snd_soc_component_write(component, ES8396_SYS_MIC_IBIAS_EN_REG75, 0x02); |
---|
2572 | 2572 | |
---|
2573 | 2573 | /* axMixer Gain boost */ |
---|
2574 | | - regv = snd_soc_component_read32(component, ES8396_AX_MIXER_BOOST_REG2F); |
---|
| 2574 | + regv = snd_soc_component_read(component, ES8396_AX_MIXER_BOOST_REG2F); |
---|
2575 | 2575 | regv |= 0x88; |
---|
2576 | 2576 | snd_soc_component_write(component, ES8396_AX_MIXER_BOOST_REG2F, regv); |
---|
2577 | 2577 | /* axmixer vol = +12db */ |
---|
.. | .. |
---|
2580 | 2580 | snd_soc_component_write(component, ES8396_AX_MIXER_REF_LP_REG31, 0x02); |
---|
2581 | 2581 | snd_soc_component_write(component, 0x33, 0); |
---|
2582 | 2582 | /* MNMixer Gain boost */ |
---|
2583 | | - regv = snd_soc_component_read32(component, ES8396_MN_MIXER_BOOST_REG37); |
---|
| 2583 | + regv = snd_soc_component_read(component, ES8396_MN_MIXER_BOOST_REG37); |
---|
2584 | 2584 | regv |= 0x88; |
---|
2585 | 2585 | snd_soc_component_write(component, ES8396_MN_MIXER_BOOST_REG37, regv); |
---|
2586 | 2586 | /* mnmixer vol = +12db */ |
---|
.. | .. |
---|
2697 | 2697 | snd_soc_component_write(component, ES8396_SYS_MIC_IBIAS_EN_REG75, 0x02); |
---|
2698 | 2698 | |
---|
2699 | 2699 | /* axMixer Gain boost */ |
---|
2700 | | - regv = snd_soc_component_read32(component, ES8396_AX_MIXER_BOOST_REG2F); |
---|
| 2700 | + regv = snd_soc_component_read(component, ES8396_AX_MIXER_BOOST_REG2F); |
---|
2701 | 2701 | regv |= 0x88; |
---|
2702 | 2702 | snd_soc_component_write(component, ES8396_AX_MIXER_BOOST_REG2F, regv); |
---|
2703 | 2703 | /* axmixer vol = +12db */ |
---|
.. | .. |
---|
2706 | 2706 | snd_soc_component_write(component, ES8396_AX_MIXER_REF_LP_REG31, 0x02); |
---|
2707 | 2707 | snd_soc_component_write(component, 0x33, 0); |
---|
2708 | 2708 | /* MNMixer Gain boost */ |
---|
2709 | | - regv = snd_soc_component_read32(component, ES8396_MN_MIXER_BOOST_REG37); |
---|
| 2709 | + regv = snd_soc_component_read(component, ES8396_MN_MIXER_BOOST_REG37); |
---|
2710 | 2710 | regv |= 0x88; |
---|
2711 | 2711 | snd_soc_component_write(component, ES8396_MN_MIXER_BOOST_REG37, regv); |
---|
2712 | 2712 | /* mnmixer vol = +12db */ |
---|
.. | .. |
---|
2757 | 2757 | /* |
---|
2758 | 2758 | * Only mute SDP IN(for dac) |
---|
2759 | 2759 | */ |
---|
2760 | | -static int es8396_aif1_mute(struct snd_soc_dai *codec_dai, int mute) |
---|
| 2760 | +static int es8396_aif1_mute(struct snd_soc_dai *codec_dai, int mute, int stream) |
---|
2761 | 2761 | { |
---|
2762 | 2762 | struct snd_soc_component *component = codec_dai->component; |
---|
2763 | 2763 | struct es8396_private *es8396 = snd_soc_component_get_drvdata(component); |
---|
.. | .. |
---|
2779 | 2779 | return 0; |
---|
2780 | 2780 | } |
---|
2781 | 2781 | |
---|
2782 | | -static int es8396_aif2_mute(struct snd_soc_dai *codec_dai, int mute) |
---|
| 2782 | +static int es8396_aif2_mute(struct snd_soc_dai *codec_dai, int mute, int stream) |
---|
2783 | 2783 | { |
---|
2784 | 2784 | struct snd_soc_component *component = codec_dai->component; |
---|
2785 | 2785 | struct es8396_private *es8396 = snd_soc_component_get_drvdata(component); |
---|
.. | .. |
---|
2812 | 2812 | .set_sysclk = es8396_set_dai_sysclk, |
---|
2813 | 2813 | .set_fmt = es8396_set_dai_fmt, |
---|
2814 | 2814 | .hw_params = es8396_pcm_hw_params, |
---|
2815 | | - .digital_mute = es8396_aif1_mute, |
---|
| 2815 | + .mute_stream = es8396_aif1_mute, |
---|
2816 | 2816 | .set_pll = es8396_set_pll, |
---|
2817 | 2817 | .set_tristate = es8396_set_tristate, |
---|
| 2818 | + .no_capture_mute = 1, |
---|
2818 | 2819 | }; |
---|
2819 | 2820 | |
---|
2820 | 2821 | static const struct snd_soc_dai_ops es8396_aif2_dai_ops = { |
---|
.. | .. |
---|
2823 | 2824 | .set_sysclk = es8396_set_dai_sysclk, |
---|
2824 | 2825 | .set_fmt = es8396_set_dai_fmt, |
---|
2825 | 2826 | .hw_params = es8396_pcm_hw_params, |
---|
2826 | | - .digital_mute = es8396_aif2_mute, |
---|
| 2827 | + .mute_stream = es8396_aif2_mute, |
---|
2827 | 2828 | .set_pll = es8396_set_pll, |
---|
| 2829 | + .no_capture_mute = 1, |
---|
2828 | 2830 | }; |
---|
2829 | 2831 | |
---|
2830 | 2832 | static struct snd_soc_dai_driver es8396_dai[] = { |
---|
.. | .. |
---|
2889 | 2891 | ret = clk_prepare_enable(es8396->mclk_clock); |
---|
2890 | 2892 | if (ret) |
---|
2891 | 2893 | return ret; |
---|
2892 | | - regv = snd_soc_component_read32(component, ES8396_PLL_K2_REG05); |
---|
| 2894 | + regv = snd_soc_component_read(component, ES8396_PLL_K2_REG05); |
---|
2893 | 2895 | |
---|
2894 | 2896 | if (regv == 0x00) { |
---|
2895 | 2897 | /* |
---|