[PATCH 1/3] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata

Russell King - ARM Linux linux at armlinux.org.uk
Sat Aug 6 17:56:35 UTC 2016


On Tue, Aug 02, 2016 at 03:05:07PM +0300, Jyri Sarha wrote:
> @@ -41,7 +41,7 @@ struct tda998x_priv {
>  	u8 vip_cntrl_0;
>  	u8 vip_cntrl_1;
>  	u8 vip_cntrl_2;
> -	struct tda998x_encoder_params params;
> +	struct tda998x_audio_params audio_params;
...
> @@ -820,7 +819,7 @@ static void tda998x_encoder_set_config(struct tda998x_priv *priv,
>  			    VIP_CNTRL_2_SWAP_F(p->swap_f) |
>  			    (p->mirr_f ? VIP_CNTRL_2_MIRR_F : 0);
>  
> -	priv->params = *p;
> +	priv->audio_params = p->audio;
...
> @@ -15,16 +28,7 @@ struct tda998x_encoder_params {
>  	u8 swap_e:3;
>  	u8 mirr_e:1;
>  
> -	u8 audio_cfg;
> -	u8 audio_clk_cfg;
> -	u8 audio_frame[6];
> -
> -	enum {
> -		AFMT_SPDIF,
> -		AFMT_I2S
> -	} audio_format;
> -
> -	unsigned audio_sample_rate;
> +	struct tda998x_audio_params audio;

Another point - it would be nice if the name for both tda998x_audio_params
structures was the same.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.


More information about the dri-devel mailing list