[alsa-devel] [PATCH 1/5] [RFC]intel_hdmi_audio:include header

Takashi Iwai tiwai at suse.de
Wed Nov 24 10:20:41 CET 2010


In addition to Mark's comments...

At Mon, 22 Nov 2010 19:09:42 +0530,
ramesh.babu at intel.com wrote:
> 
> +#include <linux/types.h>
> +#include <sound/initval.h>

Usually this header isn't needed in the global header file.

> +#include "../../../drivers/staging/mrst/drv/mdfld_hdmi_audio_if.h"
> +#include "../../../drivers/staging/mrst/drv/psb_intel_hdmi.h"

This is bad...  If these files are really used over several
subsystems, they should be put somewhere in a better public place.


> +/**
> + * union aud_cfg - Audio configuration offset - 69000
> + *
> + * @cfg_regx: individual register bits
> + * @cfg_regval: full register value
> + *
> + * */
> +union aud_cfg {
> +	struct {
> +		u32 aud_en:1;
> +		u32 layout:1;
> +		u32 fmt:2;
> +		u32 num_ch:2;
> +		u32 rsvd0:1;
> +		u32 set:1;
> +		u32 flat:1;
> +		u32 val_bit:1;
> +		u32 user_bit:1;
> +		u32 underrun:1;
> +		u32 rsvd1:20;
> +	} cfg_regx;
> +	u32 cfg_regval;
> +};

In general, better to avoid bit fields if it's used for the data
transfer.  The bit-fields are never portable.


thanks,

Takashi


More information about the Alsa-devel mailing list