Lines Matching full:grp

167 	 * grp 0 -- select ADC1 / ADC2
168 * grp 1 -- select ADC3 / ADC4
169 * grp 2 -- select ADC5 / ADC6
170 * grp 3 -- select ADC7 / ADC8
629 int grp = e->reg; in rk3308_codec_mic_mute_get() local
633 "%s: Invalid ADC grp: %d\n", __func__, e->reg); in rk3308_codec_mic_mute_get()
639 regmap_read(rk3308->regmap, RK3308_ADC_DIG_CON03(grp), &value); in rk3308_codec_mic_mute_get()
645 regmap_read(rk3308->regmap, RK3308_ADC_DIG_CON03(grp), &value); in rk3308_codec_mic_mute_get()
661 int grp = e->reg; in rk3308_codec_mic_mute_put() local
665 "%s: Invalid ADC grp: %d\n", __func__, e->reg); in rk3308_codec_mic_mute_put()
672 regmap_update_bits(rk3308->regmap, RK3308_ADC_DIG_CON03(grp), in rk3308_codec_mic_mute_put()
679 regmap_update_bits(rk3308->regmap, RK3308_ADC_DIG_CON03(grp), in rk3308_codec_mic_mute_put()
797 "%s: Invalid ADC grp: %d\n", __func__, e->reg); in rk3308_codec_hpf_get()
822 "%s: Invalid ADC grp: %d\n", __func__, e->reg); in rk3308_codec_hpf_put()
897 int type, int idx, u32 *grp) in adc_for_each_grp() argument
918 *grp = ADC_GRP_SKIP_MAGIC; in adc_for_each_grp()
921 /* To set the skip flag if the ADC GRP is enabled. */ in adc_for_each_grp()
922 *grp = ADC_GRP_SKIP_MAGIC; in adc_for_each_grp()
924 *grp = mapped_grp; in adc_for_each_grp()
928 "ADC_TYPE_NORMAL, idx: %d, mapped_grp: %d, get grp: %d,\n", in adc_for_each_grp()
929 idx, mapped_grp, *grp); in adc_for_each_grp()
934 *grp = idx; in adc_for_each_grp()
936 "ADC_TYPE_ALL, idx: %d, get grp: %d\n", in adc_for_each_grp()
937 idx, *grp); in adc_for_each_grp()
943 *grp = idx; in adc_for_each_grp()
945 *grp = ADC_GRP_SKIP_MAGIC; in adc_for_each_grp()
948 "ADC_TYPE_DBG, idx: %d, get grp: %d\n", in adc_for_each_grp()
949 idx, *grp); in adc_for_each_grp()
954 *grp = rk3308->loopback_grp; in adc_for_each_grp()
956 "ADC_TYPE_LOOPBACK, idx: %d, get grp: %d\n", in adc_for_each_grp()
957 idx, *grp); in adc_for_each_grp()
1072 int idx, grp, is_master; in rk3308_set_dai_fmt() local
1166 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_set_dai_fmt()
1167 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_set_dai_fmt()
1170 regmap_update_bits(rk3308->regmap, RK3308_ADC_DIG_CON01(grp), in rk3308_set_dai_fmt()
1174 regmap_update_bits(rk3308->regmap, RK3308_ADC_DIG_CON02(grp), in rk3308_set_dai_fmt()
1252 int idx, grp; in rk3308_codec_adc_dig_config() local
1291 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_dig_config()
1292 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_dig_config()
1295 regmap_update_bits(rk3308->regmap, RK3308_ADC_DIG_CON01(grp), in rk3308_codec_adc_dig_config()
1300 regmap_update_bits(rk3308->regmap, RK3308_ADC_DIG_CON02(grp), in rk3308_codec_adc_dig_config()
2579 int idx, grp; in rk3308_codec_adc_reinit_mics() local
2581 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_reinit_mics()
2582 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_reinit_mics()
2586 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON05(grp), in rk3308_codec_adc_reinit_mics()
2593 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_reinit_mics()
2594 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_reinit_mics()
2598 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_reinit_mics()
2605 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_reinit_mics()
2606 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_reinit_mics()
2610 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_reinit_mics()
2619 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_reinit_mics()
2620 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_reinit_mics()
2624 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON05(grp), in rk3308_codec_adc_reinit_mics()
2631 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_reinit_mics()
2632 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_reinit_mics()
2636 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_reinit_mics()
2643 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_reinit_mics()
2644 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_reinit_mics()
2648 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_reinit_mics()
2662 int idx, grp; in rk3308_codec_adc_ana_enable() local
2679 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2681 if (grp < 1 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2685 RK3308_ADC_ANA_CON07(grp), in rk3308_codec_adc_ana_enable()
2692 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2693 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2697 RK3308_ADC_ANA_CON07(grp), in rk3308_codec_adc_ana_enable()
2710 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2711 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2714 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_ana_enable()
2725 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2726 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2729 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON06(grp), in rk3308_codec_adc_ana_enable()
2743 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2744 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2747 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_ana_enable()
2755 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2756 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2759 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_ana_enable()
2767 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2768 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2771 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_ana_enable()
2779 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2780 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2783 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON05(grp), in rk3308_codec_adc_ana_enable()
2791 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2792 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2795 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON05(grp), in rk3308_codec_adc_ana_enable()
2803 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2804 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2807 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON05(grp), in rk3308_codec_adc_ana_enable()
2815 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2816 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2819 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_ana_enable()
2827 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2828 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2831 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_ana_enable()
2843 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2844 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2847 regmap_read(rk3308->regmap, RK3308_ALC_L_DIG_CON09(grp), in rk3308_codec_adc_ana_enable()
2852 RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_ana_enable()
2856 regmap_read(rk3308->regmap, RK3308_ALC_R_DIG_CON09(grp), in rk3308_codec_adc_ana_enable()
2861 RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_ana_enable()
2867 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_enable()
2868 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_enable()
2871 rk3308->adc_grps_endisable[grp] = true; in rk3308_codec_adc_ana_enable()
2880 int idx, grp; in rk3308_codec_adc_ana_disable() local
2882 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2883 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2887 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_ana_disable()
2894 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2895 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2899 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON05(grp), in rk3308_codec_adc_ana_disable()
2906 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2907 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2911 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON05(grp), in rk3308_codec_adc_ana_disable()
2918 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2919 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2923 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_ana_disable()
2930 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2931 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2935 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_ana_disable()
2942 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2943 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2947 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_ana_disable()
2954 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2955 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2959 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON06(grp), in rk3308_codec_adc_ana_disable()
2964 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2965 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2969 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON05(grp), in rk3308_codec_adc_ana_disable()
2976 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2977 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2981 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON02(grp), in rk3308_codec_adc_ana_disable()
2988 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
2989 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
2993 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON00(grp), in rk3308_codec_adc_ana_disable()
3000 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_adc_ana_disable()
3001 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_adc_ana_disable()
3004 rk3308->adc_grps_endisable[grp] = false; in rk3308_codec_adc_ana_disable()
3012 int idx, grp = 0; in rk3308_codec_open_capture() local
3026 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_open_capture()
3029 grp == ADC_GRP_SKIP_MAGIC) { in rk3308_codec_open_capture()
3037 * Then, the grp which is set from loopback_grp. in rk3308_codec_open_capture()
3048 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_open_capture()
3052 RK3308_ADC_DIG_CON03(grp), in rk3308_codec_open_capture()
3056 RK3308_ADC_DIG_CON03(grp), in rk3308_codec_open_capture()
3233 int idx, grp; in rk3308_codec_update_adcs_status() local
3240 for (grp = 0; grp < rk3308->en_always_grps_num; grp++) { in rk3308_codec_update_adcs_status()
3241 u32 en_always_grp = rk3308->en_always_grps[grp]; in rk3308_codec_update_adcs_status()
3259 int idx, grp; in rk3308_hw_params() local
3287 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_hw_params()
3288 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_hw_params()
3292 RK3308_ADC_DIG_CON03(grp), in rk3308_hw_params()
3296 RK3308_ADC_DIG_CON03(grp), in rk3308_hw_params()
3302 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_hw_params()
3303 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_hw_params()
3307 RK3308_ADC_DIG_CON03(grp), in rk3308_hw_params()
3311 RK3308_ADC_DIG_CON03(grp), in rk3308_hw_params()
3332 int idx, grp; in rk3308_pcm_trigger() local
3350 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_pcm_trigger()
3351 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_pcm_trigger()
3355 RK3308_ADC_DIG_CON03(grp), in rk3308_pcm_trigger()
3359 RK3308_ADC_DIG_CON03(grp), in rk3308_pcm_trigger()
3487 int grp; in rk3308_codec_default_gains() local
3491 for (grp = 0; grp < ADC_LR_GROUP_MAX; grp++) { in rk3308_codec_default_gains()
3492 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON01(grp), in rk3308_codec_default_gains()
3500 for (grp = 0; grp < ADC_LR_GROUP_MAX; grp++) { in rk3308_codec_default_gains()
3501 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON03(grp), in rk3308_codec_default_gains()
3504 regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON04(grp), in rk3308_codec_default_gains()
3511 for (grp = 0; grp < ADC_LR_GROUP_MAX; grp++) { in rk3308_codec_default_gains()
3513 regmap_write(rk3308->regmap, RK3308BS_ADC_DIG_CON05(grp), in rk3308_codec_default_gains()
3515 regmap_write(rk3308->regmap, RK3308BS_ADC_DIG_CON06(grp), in rk3308_codec_default_gains()
3595 /* The loopback grp should not be enabled always. */ in rk3308_codec_setup_en_always_adcs()
3696 int grp; in rk3308_codec_dapm_controls_prepare() local
3698 for (grp = 0; grp < ADC_LR_GROUP_MAX; grp++) in rk3308_codec_dapm_controls_prepare()
3699 rk3308->hpf_cutoff[grp] = 0; in rk3308_codec_dapm_controls_prepare()
3921 int idx, grp; in rk3308_codec_loopback_work() local
3930 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) { in rk3308_codec_loopback_work()
3931 if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1) in rk3308_codec_loopback_work()
3935 RK3308_ADC_DIG_CON03(grp), in rk3308_codec_loopback_work()
3939 RK3308_ADC_DIG_CON03(grp), in rk3308_codec_loopback_work()
4011 u32 grp; in adc_grps_show() local
4017 for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) in adc_grps_show()
4018 count += sprintf(buf + count, " %d", grp); in adc_grps_show()
4058 u32 grp; in adc_grps_route_show() local
4074 for (grp = 0; grp < rk3308->to_i2s_grps; grp++) { in adc_grps_route_show()
4076 grp, rk3308->i2s_sdis[grp]); in adc_grps_route_show()
4218 int grp, endisable, ret; in adc_grps_endisable_store() local
4220 ret = sscanf(buf, "%d,%d", &grp, &endisable); in adc_grps_endisable_store()
4227 rk3308->cur_dbg_grp = grp; in adc_grps_endisable_store()
4234 dev_info(dev, "ADC grp %d endisable: %d\n", grp, endisable); in adc_grps_endisable_store()
4669 ret = of_property_read_u32(np, "rockchip,loopback-grp", in rk3308_platform_probe()