• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/alsa-lib-1.0.26/src/hwdep/

Lines Matching defs:hwdep

2  * \file hwdep/hwdep.c
39 static int snd_hwdep_open_conf(snd_hwdep_t **hwdep,
135 err = open_func(hwdep, name, hwdep_root, hwdep_conf, mode);
137 (*hwdep)->dl_handle = h;
145 static int snd_hwdep_open_noupdate(snd_hwdep_t **hwdep, snd_config_t *root, const char *name, int mode)
149 err = snd_config_search_definition(root, "hwdep", name, &hwdep_conf);
154 err = snd_hwdep_open_conf(hwdep, name, root, hwdep_conf, mode);
161 * \param hwdep Returned handle (NULL if not wanted)
169 int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode)
172 assert(hwdep && name);
176 return snd_hwdep_open_noupdate(hwdep, snd_config, name, mode);
181 * \param hwdep Returned handle (NULL if not wanted)
190 int snd_hwdep_open_lconf(snd_hwdep_t **hwdep, const char *name,
193 assert(hwdep && name && lconf);
194 return snd_hwdep_open_noupdate(hwdep, lconf, name, mode);
199 * \param hwdep HwDep handle
205 int snd_hwdep_close(snd_hwdep_t *hwdep)
208 assert(hwdep);
209 err = hwdep->ops->close(hwdep);
210 if (hwdep->dl_handle)
211 snd_dlclose(hwdep->dl_handle);
212 free(hwdep->name);
213 free(hwdep);
219 * \param hwdep a Hwdep handle
225 const char *snd_hwdep_name(snd_hwdep_t *hwdep)
227 assert(hwdep);
228 return hwdep->name;
233 * \param hwdep a HwDep handle
238 snd_hwdep_type_t snd_hwdep_type(snd_hwdep_t *hwdep)
240 assert(hwdep);
241 return hwdep->type;
246 * \param hwdep HwDep handle
249 int snd_hwdep_poll_descriptors_count(snd_hwdep_t *hwdep)
251 assert(hwdep);
257 * \param hwdep HwDep handle
262 int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space)
264 assert(hwdep);
266 pfds->fd = hwdep->poll_fd;
267 switch (hwdep->mode & O_ACCMODE) {
287 * \param hwdep HwDep handle
293 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
295 assert(hwdep && pfds && revents);
305 * \param hwdep HwDep handle
309 int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock)
312 assert(hwdep);
313 if ((err = hwdep->ops->nonblock(hwdep, nonblock)) < 0)
316 hwdep->mode |= SND_HWDEP_OPEN_NONBLOCK;
318 hwdep->mode &= ~SND_HWDEP_OPEN_NONBLOCK;
373 * \brief get hwdep card number
375 * \return hwdep card number
384 * \brief get hwdep device number
386 * \return hwdep device number
395 * \brief get hwdep driver identifier
397 * \return hwdep driver identifier
406 * \brief get hwdep driver name
408 * \return hwdep driver name
417 * \brief get hwdep protocol interface
419 * \return hwdep protocol interface
428 * \brief set hwdep device number
430 * \param val hwdep device
440 * \param hwdep HwDep handle
444 int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info)
446 assert(hwdep);
448 return hwdep->ops->info(hwdep, info);
453 * \param hwdep HwDep handle
458 int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg)
460 assert(hwdep);
461 return hwdep->ops->ioctl(hwdep, request, arg);
466 * \param hwdep HwDep handle
470 ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size)
472 assert(hwdep);
473 assert(((hwdep->mode & O_ACCMODE) == O_WRONLY) || ((hwdep->mode & O_ACCMODE) == O_RDWR));
475 return hwdep->ops->write(hwdep, buffer, size);
480 * \param hwdep HwDep handle
484 ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size)
486 assert(hwdep);
487 assert(((hwdep->mode & O_ACCMODE) == O_RDONLY) || ((hwdep->mode & O_ACCMODE) == O_RDWR));
489 return (hwdep->ops->read)(hwdep, buffer, size);
494 * \param hwdep HwDep handle
498 int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *info)
500 assert(hwdep);
502 return hwdep->ops->ioctl(hwdep, SNDRV_HWDEP_IOCTL_DSP_STATUS, (void*)info);
507 * \param hwdep HwDep handle
511 int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block)
513 assert(hwdep);
515 return hwdep->ops->ioctl(hwdep, SNDRV_HWDEP_IOCTL_DSP_LOAD, (void*)block);