xref: /netbsd-src/sys/dev/hdaudio/hdafg_dd.h (revision 8a9ff04ba8402032638682bf30b93a2c8bd672e1)
1*8a9ff04bSjmcneill /* $NetBSD: hdafg_dd.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
2*8a9ff04bSjmcneill 
3*8a9ff04bSjmcneill /*
4*8a9ff04bSjmcneill  * Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
5*8a9ff04bSjmcneill  * All rights reserved.
6*8a9ff04bSjmcneill  *
7*8a9ff04bSjmcneill  * Redistribution and use in source and binary forms, with or without
8*8a9ff04bSjmcneill  * modification, are permitted provided that the following conditions
9*8a9ff04bSjmcneill  * are met:
10*8a9ff04bSjmcneill  * 1. Redistributions of source code must retain the above copyright
11*8a9ff04bSjmcneill  *    notice, this list of conditions and the following disclaimer.
12*8a9ff04bSjmcneill  * 2. The name of the author may not be used to endorse or promote products
13*8a9ff04bSjmcneill  *    derived from this software without specific prior written permission.
14*8a9ff04bSjmcneill  *
15*8a9ff04bSjmcneill  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16*8a9ff04bSjmcneill  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17*8a9ff04bSjmcneill  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18*8a9ff04bSjmcneill  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19*8a9ff04bSjmcneill  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20*8a9ff04bSjmcneill  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21*8a9ff04bSjmcneill  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22*8a9ff04bSjmcneill  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23*8a9ff04bSjmcneill  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*8a9ff04bSjmcneill  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*8a9ff04bSjmcneill  * SUCH DAMAGE.
26*8a9ff04bSjmcneill  */
27*8a9ff04bSjmcneill 
28*8a9ff04bSjmcneill #ifndef _HDAFG_DD_H
29*8a9ff04bSjmcneill #define _HDAFG_DD_H
30*8a9ff04bSjmcneill 
31*8a9ff04bSjmcneill #include "hdmireg.h"
32*8a9ff04bSjmcneill #include "eldreg.h"
33*8a9ff04bSjmcneill #include "ceareg.h"
34*8a9ff04bSjmcneill 
35*8a9ff04bSjmcneill #define	HDAFG_DD_MONITOR_NAME_LEN	32
36*8a9ff04bSjmcneill #define	HDAFG_DD_MAX_SAD		15
37*8a9ff04bSjmcneill 
38*8a9ff04bSjmcneill struct hdafg_dd_info {
39*8a9ff04bSjmcneill 	struct eld_baseline_block eld;
40*8a9ff04bSjmcneill 	char		monitor[HDAFG_DD_MONITOR_NAME_LEN];
41*8a9ff04bSjmcneill 	size_t		nsad;
42*8a9ff04bSjmcneill 	struct cea_sad	sad[HDAFG_DD_MAX_SAD];
43*8a9ff04bSjmcneill };
44*8a9ff04bSjmcneill 
45*8a9ff04bSjmcneill int	hdafg_dd_parse_info(uint8_t *, size_t, struct hdafg_dd_info *);
46*8a9ff04bSjmcneill void	hdafg_dd_hdmi_ai_cksum(struct hdmi_audio_infoframe *);
47*8a9ff04bSjmcneill 
48*8a9ff04bSjmcneill 
49*8a9ff04bSjmcneill #endif /* !_HDAFG_DD_H */
50