diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-06-26 14:50:16 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-06-26 16:00:01 (GMT) |
commit | b6050ef664219a0bc97d0626759ef070ed77fcba (patch) | |
tree | 2a69c2b96d819a324ea132f2b938b4dd01a3e88d /sound/pci/hda/hda_priv.h | |
parent | 085ec0d945cd52caba3765e4cbcfe24cc136e905 (diff) | |
download | linux-b6050ef664219a0bc97d0626759ef070ed77fcba.tar.xz |
ALSA: hda - Make position_fix as generic callback
... and move most parts into hda_intel.c from the generic controller
code. This is a clean up, and there should be no functional change by
this patch.
Now, struct azx obtains the generic callbacks for getting the position
and the delay. As default NULL, posbuf is read. These replace the
old position_fix[], and each is implemented as a callback.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_priv.h')
-rw-r--r-- | sound/pci/hda/hda_priv.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h index da12d10..43dd8a1 100644 --- a/sound/pci/hda/hda_priv.h +++ b/sound/pci/hda/hda_priv.h @@ -188,15 +188,6 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */ -/* position fix mode */ -enum { - POS_FIX_AUTO, - POS_FIX_LPIB, - POS_FIX_POSBUF, - POS_FIX_VIACOMBO, - POS_FIX_COMBO, -}; - /* Defines for ATI HD Audio support in SB450 south bridge */ #define ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR 0x42 #define ATI_SB450_HDAUDIO_ENABLE_SNOOP 0x02 @@ -321,6 +312,9 @@ struct azx_pcm { struct list_head list; }; +typedef unsigned int (*azx_get_pos_callback_t)(struct azx *, struct azx_dev *); +typedef int (*azx_get_delay_callback_t)(struct azx *, struct azx_dev *, unsigned int pos); + struct azx { struct snd_card *card; struct pci_dev *pci; @@ -339,6 +333,10 @@ struct azx { /* Register interaction. */ const struct hda_controller_ops *ops; + /* position adjustment callbacks */ + azx_get_pos_callback_t get_position[2]; + azx_get_delay_callback_t get_delay[2]; + /* pci resources */ unsigned long addr; void __iomem *remap_addr; @@ -374,7 +372,6 @@ struct azx { #endif /* flags */ - int position_fix[2]; /* for both playback/capture streams */ const int *bdl_pos_adj; int poll_count; unsigned int running:1; |