hdaa.h (88addcbe26ac074ef66ff226251b0658acf40ce3) hdaa.h (6fa8e691a35940743c73d00fd498b970e92c552c)
1/*-7
2 * Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
3 * Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org>
4 * Copyright (c) 2008-2012 Alexander Motin <mav@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 102 unchanged lines hidden (view full) ---

111 union {
112 struct {
113 uint32_t config;
114 uint32_t original;
115 uint32_t newconf;
116 uint32_t cap;
117 uint32_t ctrl;
118 } pin;
1/*-7
2 * Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
3 * Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org>
4 * Copyright (c) 2008-2012 Alexander Motin <mav@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 102 unchanged lines hidden (view full) ---

111 union {
112 struct {
113 uint32_t config;
114 uint32_t original;
115 uint32_t newconf;
116 uint32_t cap;
117 uint32_t ctrl;
118 } pin;
119 struct {
120 uint8_t stripecap;
121 } conv;
119 } wclass;
120};
121
122struct hdaa_audio_ctl {
123 struct hdaa_widget *widget, *childwidget;
124 int enable;
125 int index, dir, ndir;
126 int mute, step, size, offset;

--- 69 unchanged lines hidden (view full) ---

196struct hdaa_chan {
197 struct snd_dbuf *b;
198 struct pcm_channel *c;
199 struct pcmchan_caps caps;
200 struct hdaa_devinfo *devinfo;
201 struct hdaa_pcm_devinfo *pdevinfo;
202 uint32_t spd, fmt, fmtlist[32], pcmrates[16];
203 uint32_t supp_stream_formats, supp_pcm_size_rate;
122 } wclass;
123};
124
125struct hdaa_audio_ctl {
126 struct hdaa_widget *widget, *childwidget;
127 int enable;
128 int index, dir, ndir;
129 int mute, step, size, offset;

--- 69 unchanged lines hidden (view full) ---

199struct hdaa_chan {
200 struct snd_dbuf *b;
201 struct pcm_channel *c;
202 struct pcmchan_caps caps;
203 struct hdaa_devinfo *devinfo;
204 struct hdaa_pcm_devinfo *pdevinfo;
205 uint32_t spd, fmt, fmtlist[32], pcmrates[16];
206 uint32_t supp_stream_formats, supp_pcm_size_rate;
204 uint32_t ptr, prevptr, blkcnt, blksz;
207 uint32_t blkcnt, blksz;
205 uint32_t *dmapos;
206 uint32_t flags;
207 int dir;
208 int off;
209 int sid;
210 int bit16, bit32;
211 int channels; /* Number of audio channels. */
212 int as; /* Number of association. */
213 int asindex; /* Index within association. */
214 nid_t io[16];
208 uint32_t *dmapos;
209 uint32_t flags;
210 int dir;
211 int off;
212 int sid;
213 int bit16, bit32;
214 int channels; /* Number of audio channels. */
215 int as; /* Number of association. */
216 int asindex; /* Index within association. */
217 nid_t io[16];
218 uint8_t stripecap; /* AND of stripecap of all ios. */
219 uint8_t stripectl; /* stripe to use to all ios. */
215};
216
217#define hdaa_codec_id(devinfo) \
218 (((uint32_t)hda_get_vendor_id(devinfo->dev) << 16) + \
219 hda_get_device_id(devinfo->dev))
220
221#define hdaa_subvendor_id(devinfo) \
222 (((uint32_t)hda_get_subvendor_id(devinfo->dev) << 16) + \
223 hda_get_subdevice_id(devinfo->dev))
224
225struct hdaa_widget *hdaa_widget_get(struct hdaa_devinfo *, nid_t);
226uint32_t hdaa_widget_pin_patch(uint32_t config, const char *str);
227uint32_t hdaa_gpio_patch(uint32_t gpio, const char *str);
228
229void hdaa_patch(struct hdaa_devinfo *devinfo);
230void hdaa_patch_direct(struct hdaa_devinfo *devinfo);
231
232#endif
220};
221
222#define hdaa_codec_id(devinfo) \
223 (((uint32_t)hda_get_vendor_id(devinfo->dev) << 16) + \
224 hda_get_device_id(devinfo->dev))
225
226#define hdaa_subvendor_id(devinfo) \
227 (((uint32_t)hda_get_subvendor_id(devinfo->dev) << 16) + \
228 hda_get_subdevice_id(devinfo->dev))
229
230struct hdaa_widget *hdaa_widget_get(struct hdaa_devinfo *, nid_t);
231uint32_t hdaa_widget_pin_patch(uint32_t config, const char *str);
232uint32_t hdaa_gpio_patch(uint32_t gpio, const char *str);
233
234void hdaa_patch(struct hdaa_devinfo *devinfo);
235void hdaa_patch_direct(struct hdaa_devinfo *devinfo);
236
237#endif