]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - sound/pci/hda/hda_controller.h
ALSA: hda/realtek - move HP_LINE1_MIC1_LED quirk for alc282
[mirror_ubuntu-bionic-kernel.git] / sound / pci / hda / hda_controller.h
CommitLineData
05e84878
DR
1/*
2 * Common functionality for the alsa driver code base for HD Audio.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 */
14
15#ifndef __SOUND_HDA_CONTROLLER_H
16#define __SOUND_HDA_CONTROLLER_H
17
18#include <sound/core.h>
19#include <sound/initval.h>
20#include "hda_codec.h"
21#include "hda_priv.h"
22
23/* PCM setup */
05e84878
DR
24static inline struct azx_dev *get_azx_dev(struct snd_pcm_substream *substream)
25{
26 return substream->runtime->private_data;
27}
b6050ef6
TI
28unsigned int azx_get_position(struct azx *chip, struct azx_dev *azx_dev);
29unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev);
30unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev);
05e84878
DR
31
32/* Stream control. */
05e84878 33void azx_stream_stop(struct azx *chip, struct azx_dev *azx_dev);
05e84878 34
67908994
DR
35/* Allocation functions. */
36int azx_alloc_stream_pages(struct azx *chip);
37void azx_free_stream_pages(struct azx *chip);
38
f43923ff 39/* Low level azx interface */
17c3ad03 40void azx_init_chip(struct azx *chip, bool full_reset);
f43923ff
DR
41void azx_stop_chip(struct azx *chip);
42void azx_enter_link_reset(struct azx *chip);
f0b1df88 43irqreturn_t azx_interrupt(int irq, void *dev_id);
f43923ff 44
154867cf
DR
45/* Codec interface */
46int azx_codec_create(struct azx *chip, const char *model,
47 unsigned int max_slots,
48 int *power_save_to);
49int azx_codec_configure(struct azx *chip);
50int azx_mixer_create(struct azx *chip);
51int azx_init_stream(struct azx *chip);
52
703c759f
TI
53void azx_notifier_register(struct azx *chip);
54void azx_notifier_unregister(struct azx *chip);
55
05e84878 56#endif /* __SOUND_HDA_CONTROLLER_H */