> #define SUN4I_CODEC_DAC_ACTL_DACAENR (31)
> #define SUN4I_CODEC_DAC_ACTL_DACAENL (30)
> #define SUN4I_CODEC_DAC_ACTL_MIXEN (29)
> +#define SUN4I_CODEC_DAC_ACTL_LINEIN_OUTPUT_VOLUME (26) /* 1 bit */
> +#define SUN4I_CODEC_DAC_ACTL_FMIN_OUTPUT_VOLUME (23) /* 3 bit */
> +#define SUN4I_CODEC_DAC_ACTL_LINEIN_L_SWITCH (19) /* 1 bit */
> +#define SUN4I_CODEC_DAC_ACTL_LINEIN_R_SWITCH (18) /* 1 bit */
> +#define SUN4I_CODEC_DAC_ACTL_FMIN_L_SWITCH (17) /* 1 bit */
> +#define SUN4I_CODEC_DAC_ACTL_FMIN_R_SWITCH (16) /* 1 bit */
Hi Danny,
I would start by sticking to the original define formats which matches
what's in the User Manual.
> #define SUN4I_CODEC_DAC_ACTL_LDACLMIXS (15)
> #define SUN4I_CODEC_DAC_ACTL_RDACRMIXS (14)
> #define SUN4I_CODEC_DAC_ACTL_LDACRMIXS (13)
> @@ -402,11 +408,37 @@ static const struct snd_kcontrol_new
> sun4i_codec_pa_mute =
> SUN4I_CODEC_DAC_ACTL_PA_MUTE, 1, 0);
>
> static DECLARE_TLV_DB_SCALE(sun4i_codec_pa_volume_scale, -6300, 100, 1);
> +static DECLARE_TLV_DB_SCALE(sun4i_codec_linein_volume_scale, -150, 150, 0);
> +static DECLARE_TLV_DB_SCALE(sun4i_codec_fmin_volume_scale, -450, 150, 0);
>
> static const struct snd_kcontrol_new sun4i_codec_widgets[] = {
> SOC_SINGLE_TLV("PA Volume", SUN4I_CODEC_DAC_ACTL,
> SUN4I_CODEC_DAC_ACTL_PA_VOL, 0x3F, 0,
> sun4i_codec_pa_volume_scale),
> + SOC_SINGLE_TLV("Line-In Playback Volume",
> + SUN4I_CODEC_DAC_ACTL,
> + SUN4I_CODEC_DAC_ACTL_LINEIN_OUTPUT_VOLUME,
> + 1,
> + 0,
> + sun4i_codec_linein_volume_scale),
These aren't really playback controls but gains for the capture stage.
These can be mixed into the output though. Have you tested this?
CK
> + SOC_SINGLE_TLV("FM-In Playback Volume",
> + SUN4I_CODEC_DAC_ACTL,
> + SUN4I_CODEC_DAC_ACTL_FMIN_OUTPUT_VOLUME,
> + 3,
> + 0,
> + sun4i_codec_fmin_volume_scale),
> + SOC_DOUBLE("Line-In Playback Switch",
> + SUN4I_CODEC_DAC_ACTL,
> + SUN4I_CODEC_DAC_ACTL_LINEIN_L_SWITCH,
> + SUN4I_CODEC_DAC_ACTL_LINEIN_R_SWITCH,
> + 1,
> + 0),
> + SOC_DOUBLE("FM-In Playback Switch",
> + SUN4I_CODEC_DAC_ACTL,
> + SUN4I_CODEC_DAC_ACTL_FMIN_L_SWITCH,
> + SUN4I_CODEC_DAC_ACTL_FMIN_R_SWITCH,
> + 1,
> + 0),
> };
>
> static const struct snd_kcontrol_new sun4i_codec_left_mixer_controls[] = {
> --
> 2.1.4
>
> --
> You received this message because you are subscribed to the Google Groups
> "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.