提交 b7f355d2 编写于 作者: M Mauro Carvalho Chehab

V4L/DVB (3293): Added digital support for cx88 (cx88-alsa)



- This module is co-authored by  Ricardo Cerqueira <v4l@cerqueira.org>.

- Added digital audio support for cx88-based boards that have function
  01 enabled. These boards can be identified by having PCI id 1471:8801
  or 1471:8811.

- Increased DMA buffer from 512 to 4096 seems to fix audio distortion.

- Existing audio DMA uses conflict with cx88-alsa. Should be disabled when
  cx88-alsa module is compiled.
Signed-off-by: NRicardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@brturbo.com.br>
上级 0de71224
......@@ -29,6 +29,21 @@ config VIDEO_CX88_DVB
You must also select one or more DVB/ATSC demodulators.
If you are unsure which you need, choose all of them.
config VIDEO_CX88_ALSA
tristate "ALSA DMA audio support"
depends on VIDEO_CX88 && SND
select SND_PCM_OSS
---help---
This is a video4linux driver for direct (DMA) audio on
Conexant 2388x based TV cards.
It only works with boards with function 01 enabled.
To check if your board supports, use lspci -n.
If supported, you should see 1471:8801 or 1471:8811
PCI device.
To compile this driver as a module, choose M here: the
module will be called cx88-alsa.
config VIDEO_CX88_DVB_ALL_FRONTENDS
bool "Build all supported frontends for cx2388x based TV cards"
default y
......
此差异已折叠。
......@@ -238,9 +238,9 @@ cx88_free_buffer(struct pci_dev *pci, struct cx88_buffer *buf)
* channel 22 (u video) - 2.0k
* channel 23 (v video) - 2.0k
* channel 24 (vbi) - 4.0k
* channels 25+26 (audio) - 0.5k
* channels 25+26 (audio) - 4.0k
* channel 28 (mpeg) - 4.0k
* TOTAL = 25.5k
* TOTAL = 29.0k
*
* Every channel has 160 bytes control data (64 bytes instruction
* queue and 6 CDT entries), which is close to 2k total.
......@@ -306,7 +306,7 @@ struct sram_channel cx88_sram_channels[] = {
.ctrl_start = 0x180680,
.cdt = 0x180680 + 64,
.fifo_start = 0x185400,
.fifo_size = 0x000200,
.fifo_size = 0x001000,
.ptr1_reg = MO_DMA25_PTR1,
.ptr2_reg = MO_DMA25_PTR2,
.cnt1_reg = MO_DMA25_CNT1,
......@@ -318,7 +318,7 @@ struct sram_channel cx88_sram_channels[] = {
.ctrl_start = 0x180720,
.cdt = 0x180680 + 64, /* same as audio IN */
.fifo_start = 0x185400, /* same as audio IN */
.fifo_size = 0x000200, /* same as audio IN */
.fifo_size = 0x001000, /* same as audio IN */
.ptr1_reg = MO_DMA26_PTR1,
.ptr2_reg = MO_DMA26_PTR2,
.cnt1_reg = MO_DMA26_CNT1,
......@@ -329,7 +329,7 @@ struct sram_channel cx88_sram_channels[] = {
.cmds_start = 0x180200,
.ctrl_start = 0x1807C0,
.cdt = 0x1807C0 + 64,
.fifo_start = 0x185600,
.fifo_start = 0x186400,
.fifo_size = 0x001000,
.ptr1_reg = MO_DMA28_PTR1,
.ptr2_reg = MO_DMA28_PTR2,
......@@ -795,7 +795,6 @@ int cx88_start_audio_dma(struct cx88_core *core)
/* start dma */
cx_write(MO_AUD_DMACNTRL, 0x0003); /* Up and Down fifo enable */
return 0;
}
......
......@@ -132,10 +132,14 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
{
u32 volume;
#ifndef USING_CX88_ALSA
/* restart dma; This avoids buzz in NICAM and is good in others */
cx88_stop_audio_dma(core);
#endif
cx_write(AUD_RATE_THRES_DMD, 0x000000C0);
#ifndef USING_CX88_ALSA
cx88_start_audio_dma(core);
#endif
if (cx88_boards[core->board].blackbird) {
/* sets sound input from external adc */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册