diff options
| author | Jaroslav Kysela <perex@suse.cz> | 2002-10-01 02:16:12 -0700 |
|---|---|---|
| committer | Jaroslav Kysela <perex@pnote.perex-int.cz> | 2002-10-01 02:16:12 -0700 |
| commit | 04c401f6a5c8e7f10921be5ef0f763f12e35883b (patch) | |
| tree | b168b4d21c11639f20c49429d950dfd4817a024d /include | |
| parent | c4eeeab42ef7f73f7ba01ec9579d1c762e5f2e33 (diff) | |
[PATCH] ALSA update [9/12] - 2002/09/11
- AC'97 codec
- added support/detection for MC'97 (modem codecs)
- improved/updated register bit constants
- AD1980 codec ID with patch code
- added eMicro and Philips UCB1400 codecs
- PCM Scatter-Gather support
- added a function snd_pcm_sgbuf_get_addr()
- rewritten PCI DMA allocation
- ENS1371 - fixed IEC958 control index when AC'97 codec has S/PDIF capability, too
- intel8x0
- don't break when second codec cannot be initialized
- via82xx
- improved sg buffer handling
- added "Input Source Select" control for via8233
- fixed the registers for via8233
- fixed the detection of via8233 chip
- clean up the configuration of bd arrays
- USB Audio
- added the missing initialization of curframesize field (fixes capture)
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/ac97_codec.h | 56 | ||||
| -rw-r--r-- | include/sound/pcm_sgbuf.h | 7 | ||||
| -rw-r--r-- | include/sound/version.h | 2 |
3 files changed, 58 insertions, 7 deletions
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index b26df460d21d..506fd28800b8 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h @@ -54,7 +54,7 @@ #define AC97_POWERDOWN 0x26 /* Powerdown control / status */ /* range 0x28-0x3a - AUDIO AC'97 2.0 extensions */ #define AC97_EXTENDED_ID 0x28 /* Extended Audio ID */ -#define AC97_EXTENDED_STATUS 0x2a /* Extended Audio Status */ +#define AC97_EXTENDED_STATUS 0x2a /* Extended Audio Status and Control */ #define AC97_PCM_FRONT_DAC_RATE 0x2c /* PCM Front DAC Rate */ #define AC97_PCM_SURR_DAC_RATE 0x2e /* PCM Surround DAC Rate */ #define AC97_PCM_LFE_DAC_RATE 0x30 /* PCM LFE DAC Rate */ @@ -64,10 +64,40 @@ #define AC97_SURROUND_MASTER 0x38 /* Surround (Rear) Master Volume */ #define AC97_SPDIF 0x3a /* S/PDIF control */ /* range 0x3c-0x58 - MODEM */ +#define AC97_EXTENDED_MID 0x3c /* Extended Modem ID */ +#define AC97_EXTENDED_MSTATUS 0x3e /* Extended Modem Status and Control */ +#define AC97_LINE1_RATE 0x40 /* Line1 DAC/ADC Rate */ +#define AC97_LINE2_RATE 0x42 /* Line2 DAC/ADC Rate */ +#define AC97_HANDSET_RATE 0x44 /* Handset DAC/ADC Rate */ +#define AC97_LINE1_LEVEL 0x46 /* Line1 DAC/ADC Level */ +#define AC97_LINE2_LEVEL 0x48 /* Line2 DAC/ADC Level */ +#define AC97_HANDSET_LEVEL 0x4a /* Handset DAC/ADC Level */ +#define AC97_GPIO_CFG 0x4c /* GPIO Configuration */ +#define AC97_GPIO_POLARITY 0x4e /* GPIO Pin Polarity/Type, 0=low, 1=high active */ +#define AC97_GPIO_STICKY 0x50 /* GPIO Pin Sticky, 0=not, 1=sticky */ +#define AC97_GPIO_WAKEUP 0x52 /* GPIO Pin Wakeup, 0=no int, 1=yes int */ +#define AC97_GPIO_STATUS 0x54 /* GPIO Pin Status, slot 12 */ +#define AC97_MISC_AFE 0x56 /* Miscellaneous Modem AFE Status and Control */ /* range 0x5a-0x7b - Vendor Specific */ #define AC97_VENDOR_ID1 0x7c /* Vendor ID1 */ #define AC97_VENDOR_ID2 0x7e /* Vendor ID2 / revision */ +/* basic capabilities (reset register) */ +#define AC97_BC_DEDICATED_MIC 0x0001 /* Dedicated Mic PCM In Channel */ +#define AC97_BC_RESERVED1 0x0002 /* Reserved (was Modem Line Codec support) */ +#define AC97_BC_BASS_TREBLE 0x0004 /* Bass & Treble Control */ +#define AC97_BC_SIM_STEREO 0x0008 /* Simulated stereo */ +#define AC97_BC_HEADPHONE 0x0010 /* Headphone Out Support */ +#define AC97_BC_LOUDNESS 0x0020 /* Loudness (bass boost) Supporqt */ +#define AC97_BC_16BIT_DAC 0x0000 /* 16-bit DAC resolution */ +#define AC97_BC_18BIT_DAC 0x0040 /* 18-bit DAC resolution */ +#define AC97_BC_20BIT_DAC 0x0080 /* 20-bit DAC resolution */ +#define AC97_BC_DAC_MASK 0x00c0 +#define AC97_BC_16BIT_ADC 0x0000 /* 16-bit ADC resolution */ +#define AC97_BC_18BIT_ADC 0x0100 /* 18-bit ADC resolution */ +#define AC97_BC_20BIT_ADC 0x0200 /* 20-bit ADC resolution */ +#define AC97_BC_ADC_MASK 0x0300 + /* extended audio ID bit defines */ #define AC97_EI_VRA 0x0001 /* Variable bit rate supported */ #define AC97_EI_DRA 0x0002 /* Double rate supported */ @@ -80,8 +110,8 @@ #define AC97_EI_LDAC 0x0100 /* PCM LFE DAC available */ #define AC97_EI_AMAP 0x0200 /* indicates optional slot/DAC mapping based on codec ID */ #define AC97_EI_REV_MASK 0x0c00 /* AC'97 revision mask */ -#define AC97_EI_REV_22 0x0100 /* AC'97 revision 2.2 */ -#define AC97_EI_REV_SHIFT 8 +#define AC97_EI_REV_22 0x0400 /* AC'97 revision 2.2 */ +#define AC97_EI_REV_SHIFT 10 #define AC97_EI_ADDR_MASK 0xc000 /* physical codec ID (address) */ #define AC97_EI_ADDR_SHIFT 14 @@ -112,14 +142,25 @@ #define AC97_SC_COPY 0x0004 /* Copyright status */ #define AC97_SC_PRE 0x0008 /* Preemphasis status */ #define AC97_SC_CC_MASK 0x07f0 /* Category Code mask */ +#define AC97_SC_CC_SHIFT 4 #define AC97_SC_L 0x0800 /* Generation Level status */ -#define AC97_SC_SPSR_MASK 0xcfff /* S/PDIF Sample Rate bits */ +#define AC97_SC_SPSR_MASK 0x3000 /* S/PDIF Sample Rate bits */ +#define AC97_SC_SPSR_SHIFT 12 #define AC97_SC_SPSR_44K 0x0000 /* Use 44.1kHz Sample rate */ #define AC97_SC_SPSR_48K 0x2000 /* Use 48kHz Sample rate */ #define AC97_SC_SPSR_32K 0x3000 /* Use 32kHz Sample rate */ #define AC97_SC_DRS 0x4000 /* Double Rate S/PDIF */ #define AC97_SC_V 0x8000 /* Validity status */ +/* extended modem ID bit defines */ +#define AC97_MEI_LINE1 0x0001 /* Line1 present */ +#define AC97_MEI_LINE2 0x0002 /* Line2 present */ +#define AC97_MEI_HEADSET 0x0004 /* Headset present */ +#define AC97_MEI_CID1 0x0008 /* caller ID decode for Line1 is supported */ +#define AC97_MEI_CID2 0x0010 /* caller ID decode for Line2 is supported */ +#define AC97_MEI_ADDR_MASK 0xc000 /* physical codec ID (address) */ +#define AC97_MEI_ADDR_SHIFT 14 + /* specific - SigmaTel */ #define AC97_SIGMATEL_ANALOG 0x6c /* Analog Special */ #define AC97_SIGMATEL_DAC2INVERT 0x6e @@ -154,8 +195,10 @@ #define AC97_CXR_SPDIF_AC3 0x2 /* ac97->scaps */ -#define AC97_SCAP_SURROUND_DAC (1<<0) /* surround L&R DACs are present */ -#define AC97_SCAP_CENTER_LFE_DAC (1<<1) /* center and LFE DACs are present */ +#define AC97_SCAP_AUDIO (1<<0) /* audio AC'97 codec */ +#define AC97_SCAP_MODEM (1<<1) /* modem AC'97 codec */ +#define AC97_SCAP_SURROUND_DAC (1<<2) /* surround L&R DACs are present */ +#define AC97_SCAP_CENTER_LFE_DAC (1<<3) /* center and LFE DACs are present */ /* ac97->flags */ #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ @@ -195,6 +238,7 @@ struct _snd_ac97 { unsigned int id; /* identification of codec */ unsigned short caps; /* capabilities (register 0) */ unsigned short ext_id; /* extended feature identification (register 28) */ + unsigned short ext_mid; /* extended modem ID (register 3C) */ unsigned int scaps; /* driver capabilities */ unsigned int flags; /* specific code */ unsigned int clock; /* AC'97 clock (usually 48000Hz) */ diff --git a/include/sound/pcm_sgbuf.h b/include/sound/pcm_sgbuf.h index 79ef1914f911..63eacc892da8 100644 --- a/include/sound/pcm_sgbuf.h +++ b/include/sound/pcm_sgbuf.h @@ -45,6 +45,13 @@ static inline unsigned int snd_pcm_sgbuf_pages(size_t size) return (size + PAGE_SIZE - 1) >> PAGE_SHIFT; } +/* + * return the physical address at the corresponding offset + */ +static inline dma_addr_t snd_pcm_sgbuf_get_addr(struct snd_sg_buf *sgbuf, size_t offset) +{ + return sgbuf->table[offset >> PAGE_SHIFT].addr + offset % PAGE_SIZE; +} int snd_pcm_sgbuf_init(snd_pcm_substream_t *substream, struct pci_dev *pci, int tblsize); int snd_pcm_sgbuf_delete(snd_pcm_substream_t *substream); diff --git a/include/sound/version.h b/include/sound/version.h index 99faca4263dc..66b7deb9d81d 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h. Generated automatically by configure. */ #define CONFIG_SND_VERSION "0.9.0rc3" -#define CONFIG_SND_DATE " (Fri Sep 06 15:06:56 2002 UTC)" +#define CONFIG_SND_DATE " (Wed Sep 11 18:36:14 2002 UTC)" |
