* RE: Announcing Linux driver for High-definition (aka Azalia) audio
@ 2004-07-08 17:57 Kogan, Dan D
2004-07-08 18:35 ` James Courtier-Dutton
2004-07-28 15:22 ` Takashi Iwai
0 siblings, 2 replies; 4+ messages in thread
From: Kogan, Dan D @ 2004-07-08 17:57 UTC (permalink / raw)
To: alsa-devel
Greetings all,
I would like to announce the initial posting of a driver for Intel's
High-Definition audio (formerly known as Azalia) to the ALSA community.
The driver implements a limited set of features and is intended to be a
starting point into which additional functionality can be incorporated.
Specifically, the following are implemented:
* Stereo playback
* Line in stereo capture
* Mixer control for stereo output: master left, master right and
mute
* Mixer control for line in: setting stereo record level and mute
* 2 channel, 16 bit, 44/48 kHz native frequency,
other frequencies through SW rate conversion
from ALSA middle layer
* 1 stream
The design is intended to support all codecs compliant with the
High-Definition Audio architecture. At initialization, the driver
enumerates the codecs in a board and then discovers the codecs' internal
topology when playing or capturing an audio stream. This work is still
in progress and we plan to add more features as we progress.
The following software configurations have been tested:
* Distributions: Red Hat 9.0, Suse 9.1
* Kernels: 2.6.3, 2.6.4, 2.6.6, & 2.6.7
* ALSA: 1.0.3, 1.0.5rc1
The driver has been tested with the following codecs:
* Realtek ALC860-414S
* Realtek ALC880-414E
* Realtek ALC260-403
* Realtek ALC880
Known issues relating to this drop include:
* Sound artifacts experienced whenever OSS emulation
based applications are used.
* Artifacts are also present when volume level approaches maximum.
* The driver does not currently restrict playback or capture to
a specific jack. As a result, input or output may be
passing through an untraditional jack color,
i.e. capture entering through green jack and capture exiting
through pink jack.
Instructions for building and installing the driver are included in the
tar ball, in the BUILD-CONFIG text file. The readme.txt file (also in
the tarball) provides a brief overview of the code structure.
Please find the tarball at
ftp://ftp.alsa-project.org/pub/tests/azx-alsa-idbo-driver-1.1.2a.tgz
http://www.alsa-project.org/alsa/ftp/tests/azx-alsa-idbo-driver-1.1.2a.t
gz
I should point out that none of the team members are ALSA experts, so
it's quite possible that the design and implementation of the driver do
not take best advantage of the ALSA architecture and infrastructure. In
that respect, we look to the community to help us identify such
shortcomings.
Best regards,
Dan Kogan
Intel Corp.
Desktop Products Group
Hillsboro, OR
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RE: Announcing Linux driver for High-definition (aka Azalia) audio
2004-07-08 17:57 Announcing Linux driver for High-definition (aka Azalia) audio Kogan, Dan D
@ 2004-07-08 18:35 ` James Courtier-Dutton
2004-07-28 15:22 ` Takashi Iwai
1 sibling, 0 replies; 4+ messages in thread
From: James Courtier-Dutton @ 2004-07-08 18:35 UTC (permalink / raw)
To: Kogan, Dan D; +Cc: alsa-devel
Kogan, Dan D wrote:
> Greetings all,
>
> I would like to announce the initial posting of a driver for Intel's
> High-Definition audio (formerly known as Azalia) to the ALSA community.
>
<snip>
> Best regards,
>
> Dan Kogan
> Intel Corp.
> Desktop Products Group
> Hillsboro, OR
>
>
I just read the Intel HD audio spec.
Only supporting 8 output channels is a bit short sighted.
What about the following requirement: -
During a game:
7.1 audio output to speakers. <- Environmental audio effects.
stereo headset with mic for teamspeak. <- Simulate radio comms between
members of the same online team.
That needs 10 output channels!
James
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: RE: Announcing Linux driver for High-definition (aka Azalia) audio
@ 2004-07-09 2:02 C.L. Tien - 田承禮
0 siblings, 0 replies; 4+ messages in thread
From: C.L. Tien - 田承禮 @ 2004-07-09 2:02 UTC (permalink / raw)
To: Kogan, Dan D, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 4062 bytes --]
Kogan,
I found that I cannot compile your driver with RedHat 7.3, which use gcc 2.96. I made change in compiler.patch to solve the compile errors.
Futher I found that the initial part cause infinite loop with our C-Media 9880 codec, it is caused by our vender defined widgets, which doesn't support get_connection_list and get_connect_list_length at all, so I use widget capability before check connect list. This is done in conn_list.patch.
Up to now, I didn't hear PCM output. I want to use aumix or alsamixer, when I tried to tune master volume louder, I got kernel NULL pointer, is it possible that a codec without neither master volume widget nor pcm volume (no HW amp) widget?
Sincerely,
ChenLi Tien
C-Media Electronics Inc.
-----Original Message-----
From: Kogan, Dan D [mailto:dan.d.kogan@intel.com]
Sent: 2004/7/8 [星期四] 下午 01:57
To: alsa-devel@lists.sourceforge.net
Cc:
Subject: [Alsa-devel] RE: Announcing Linux driver for High-definition (aka Azalia) audio
Greetings all,
I would like to announce the initial posting of a driver for Intel's
High-Definition audio (formerly known as Azalia) to the ALSA community.
The driver implements a limited set of features and is intended to be a
starting point into which additional functionality can be incorporated.
Specifically, the following are implemented:
* Stereo playback
* Line in stereo capture
* Mixer control for stereo output: master left, master right and
mute
* Mixer control for line in: setting stereo record level and mute
* 2 channel, 16 bit, 44/48 kHz native frequency,
other frequencies through SW rate conversion
from ALSA middle layer
* 1 stream
The design is intended to support all codecs compliant with the
High-Definition Audio architecture. At initialization, the driver
enumerates the codecs in a board and then discovers the codecs' internal
topology when playing or capturing an audio stream. This work is still
in progress and we plan to add more features as we progress.
The following software configurations have been tested:
* Distributions: Red Hat 9.0, Suse 9.1
* Kernels: 2.6.3, 2.6.4, 2.6.6, & 2.6.7
* ALSA: 1.0.3, 1.0.5rc1
The driver has been tested with the following codecs:
* Realtek ALC860-414S
* Realtek ALC880-414E
* Realtek ALC260-403
* Realtek ALC880
Known issues relating to this drop include:
* Sound artifacts experienced whenever OSS emulation
based applications are used.
* Artifacts are also present when volume level approaches maximum.
* The driver does not currently restrict playback or capture to
a specific jack. As a result, input or output may be
passing through an untraditional jack color,
i.e. capture entering through green jack and capture exiting
through pink jack.
Instructions for building and installing the driver are included in the
tar ball, in the BUILD-CONFIG text file. The readme.txt file (also in
the tarball) provides a brief overview of the code structure.
Please find the tarball at
ftp://ftp.alsa-project.org/pub/tests/azx-alsa-idbo-driver-1.1.2a.tgz
http://www.alsa-project.org/alsa/ftp/tests/azx-alsa-idbo-driver-1.1.2a.t
gz
I should point out that none of the team members are ALSA experts, so
it's quite possible that the design and implementation of the driver do
not take best advantage of the ALSA architecture and infrastructure. In
that respect, we look to the community to help us identify such
shortcomings.
Best regards,
Dan Kogan
Intel Corp.
Desktop Products Group
Hillsboro, OR
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel
[-- Attachment #2: compiler.patch --]
[-- Type: application/octet-stream, Size: 20462 bytes --]
diff -au azx-alsa-drop-driver-1.1.2a/azx.c azx-alsa-drop-driver-1.1.2a-patched/azx.c
--- azx-alsa-drop-driver-1.1.2a/azx.c Fri Jul 2 03:48:27 2004
+++ azx-alsa-drop-driver-1.1.2a-patched/azx.c Thu Jul 8 19:13:26 2004
@@ -365,9 +365,9 @@
u32 intstatus;
u8 testval;
+ u32 count;
intstatus = readl(azx_base + AZX_REG_L_INTSTS);
- u32 count;
for (count = 0; count < MAX_ICH6_DEV; count++) {
azx_dev = &chip->azx_dev[count];
if (intstatus & azx_dev->sd_int_sta_mask) {
@@ -382,8 +382,8 @@
// clear rirb int
testval = readb(azx_base + AZX_REG_B_RIRBSTS) && 0x5;
if (testval) {
- printk("clearing rirbsts\n");
u8 rirbval = 0x5;
+ printk("clearing rirbsts\n");
writeb(rirbval, azx_base + AZX_REG_B_RIRBSTS);
}
@@ -405,10 +405,10 @@
static int snd_azx_free(azx_t* chip)
{
- printk("*-*-* Entered Free *-*-*\n");
-
u16 size = 0;
+ printk("*-*-* Entered Free *-*-*\n");
+
if (chip->remap_addr) {
// stop playback stream
azx_dev_t* azx_dev = &chip->azx_dev[SDO0];
@@ -480,11 +480,11 @@
static int snd_azx_dev_free(snd_device_t* device)
{
- printk("*-*-* Entered Dev_free *-*-*\n");
int err = 0;
azx_t* chip = snd_magic_cast(azx_t, device->device_data, return -ENXIO);
+ printk("*-*-* Entered Dev_free *-*-*\n");
err = snd_azx_free(chip);
return err;
@@ -492,13 +492,13 @@
static int __devinit snd_azx_create(snd_card_t* card, struct pci_dev* pci, azx_t** rchip)
{
- printk("*-*-* Entered Create *-*-*\n");
azx_t *chip;
int err = 0;
static snd_device_ops_t ops = {
.dev_free = snd_azx_dev_free,
};
+ printk("*-*-* Entered Create *-*-*\n");
*rchip = NULL;
// PCI stuff here
@@ -568,10 +568,10 @@
static int snd_azx_create_mixer(azx_t* chip)
{
+ int err = 0;
- printk("*-*-* Entered create_mixer *-*-*\n");
- int err = 0;
+ printk("*-*-* Entered create_mixer *-*-*\n");
// mixer control - outputs
// stereo volume
@@ -599,12 +599,12 @@
static int __devinit snd_azx_probe(struct pci_dev* pci, const struct pci_device_id* pci_id)
{
- printk("*-*-* Entered Probe *-*-*\n");
static int dev;
snd_card_t *card;
azx_t *chip;
int err;
+ printk("*-*-* Entered Probe *-*-*\n");
if (dev >= SNDRV_CARDS) {
printk("dev [%i] >= SNDRV_CARDS [%i]\n", dev, SNDRV_CARDS);
return -ENOENT;
@@ -654,13 +654,13 @@
static void __devexit snd_azx_remove(struct pci_dev* pci)
{
+ azx_t *chip = snd_magic_cast(azx_t, pci_get_drvdata(pci), return);
+
printk("*-*-* Entered Remove *-*-*\n");
cleanup_codec_info_list();
- azx_t *chip = snd_magic_cast(azx_t, pci_get_drvdata(pci), return);
-
if (chip) {
printk("Calling snd_card_free()\n");
snd_card_free(chip->card);
@@ -673,6 +673,7 @@
int results;
+ int err;
results = -1;
do{
@@ -687,7 +688,6 @@
}while (0);
- int err;
printk("******** DRIVER START HERE ********\n");
if ((err = pci_module_init(&driver)) < 0) {
printk("Azalia chip not found!!!\n");
@@ -720,8 +720,6 @@
int snd_azx_init_chip(azx_t* chip)
{
- printk("*-*-* Entered Init_chip *-*-*\n");
-
u8 index;
u32 size;
azx_dev_t* azx_dev;
@@ -739,6 +737,15 @@
{ 0x160, 0x80},
};
+ u16 out_tag = 0x0001;
+ u16 in_tag = 0x000A;
+ u16 playback_channels = 0x0000;
+ u16 capture_channels = 0x0000;
+ u32 playback_format = 0x4011;
+ u32 capture_format = 0x4011;
+
+ printk("*-*-* Entered Init_chip *-*-*\n");
+
// reset controller
snd_azx_util_reset_controller(chip);
@@ -817,13 +824,6 @@
// *****************************************
- u16 out_tag = 0x0001;
- u16 in_tag = 0x000A;
- u16 playback_channels = 0x0000;
- u16 capture_channels = 0x0000;
- u32 playback_format = 0x4011;
- u32 capture_format = 0x4011;
-
// enable codec
set_audio_codec_address(chip);
@@ -848,9 +848,9 @@
azx_rb_t* snd_azx_rb_create(azx_t* chip, int size)
{
+ azx_rb_t* rb;
printk("*-*-* Entered rb_create w/ size [%i] *-*-*\n", size);
- azx_rb_t* rb;
rb = (azx_rb_t*)kmalloc(sizeof(azx_rb_t), GFP_KERNEL);
if (NULL == rb) {
printk("Error: cannot allocate memory for ring buffer structure [0x%lx]", (unsigned long)sizeof(azx_rb_t));
@@ -864,11 +864,11 @@
int snd_azx_rb_init(azx_t* chip, int size, azx_rb_t* rb)
{
- printk("*-*-* Entered rb_init w/ size [%i] *-*-*\n", size);
-
u32 lower_addr;
u32 azx_base = (u32)chip->remap_addr;
+ printk("*-*-* Entered rb_init w/ size [%i] *-*-*\n", size);
+
rb->rb_v_addr = NULL;
rb->rb_p_addr = 0;
@@ -942,8 +942,8 @@
void snd_azx_rb_delete(azx_t* chip, int size)
{
- printk("*-*-* Entered rb_delete w/ size [%i] *-*-*\n", size);
azx_rb_t* rb;
+ printk("*-*-* Entered rb_delete w/ size [%i] *-*-*\n", size);
if (size == AZX_CORB_SIZE) {
rb = chip->corb;
@@ -1039,8 +1039,6 @@
int snd_azx_util_reset_controller(azx_t* chip)
{
- printk("*-*-* Entered util_reset_controller *-*-*\n");
-
u32 resetval = 0;
int count = 0;
u16 statests = 0;
@@ -1048,6 +1046,8 @@
u32 azx_base = (u32)chip->remap_addr;
u32 addr = 0;
+ printk("*-*-* Entered util_reset_controller *-*-*\n");
+
// ** Reset controller
addr = azx_base + AZX_REG_L_GCTL;
printk("u32 + %x = %x\n", AZX_REG_L_GCTL, addr);
@@ -1128,15 +1128,17 @@
// ********************** controller programming here **********************
int snd_azx_controller_setup(azx_t* chip, azx_dev_t* azx_dev)
{
- printk("************************************************\n");
- printk("*-*-* Entered controller_setup azx_dev[%i] *-*-*\n", azx_dev->device);
- printk("************************************************\n");
-
u32 val;
u32 azx_base = chip->remap_addr;
//u32* bdl_base;
u32 sd_base = azx_dev->sd_off;
+ int test = 0;
+
+
+ printk("************************************************\n");
+ printk("*-*-* Entered controller_setup azx_dev[%i] *-*-*\n", azx_dev->device);
+ printk("************************************************\n");
// **** The next thing is to setup the controller for streaming
// make sure the run bit is zero for SDO 0
@@ -1145,8 +1147,6 @@
// printk(" Just set SDO 0 to stop...\n");
// reset output stream 0
- int test = 0;
-
val = readb(azx_base + sd_base + AZX_REG_3B_SD_CTL) | 0x01;
writeb(val, azx_base + sd_base + AZX_REG_3B_SD_CTL);
@@ -1245,10 +1245,10 @@
void snd_azx_int_display(azx_t* chip)
{
- printk("*-*-* Entered int_display *-*-*\n");
-
u32 azx_base = chip->remap_addr;
u32 val;
+ printk("*-*-* Entered int_display *-*-*\n");
+
val = readl(azx_base + AZX_REG_L_INTSTS);
printk("INT status = %lx\n", (unsigned long)val);
@@ -1265,12 +1265,12 @@
void snd_azx_int_disable(azx_t* chip)
{
- printk("*-*-* Entered int_disable *-*-*\n");
-
u32 azx_base = chip->remap_addr;
u8 val8;
u32 val32;
+ printk("*-*-* Entered int_disable *-*-*\n");
+
// disable SDO 0 in stream descriptor
// bit 4 = DEIE - Descriptor Error Interrupt
// bit 3 = FIFO - First in First out interrupt
@@ -1294,12 +1294,12 @@
}
void snd_azx_int_enable(azx_t* chip)
{
- printk("*-*-* Entered int_enable *-*-*\n");
-
u32 azx_base = chip->remap_addr;
u8 val8;
u32 val32;
+ printk("*-*-* Entered int_enable *-*-*\n");
+
// enable SDO 0 in stream descriptor
// bit 4 = DEIE - Descriptor Error Interrupt
// bit 3 = FIFO - First in First out interrupt
@@ -1329,12 +1329,12 @@
void snd_azx_int_clear(azx_t* chip)
{
- printk("*-*-* Entered int_clear *-*-*\n");
-
u32 azx_base = chip->remap_addr;
u8 val8;
u32 val32;
+ printk("*-*-* Entered int_clear *-*-*\n");
+
// clear stream SDO status
val8 = 0x1c;
writeb(val8, azx_base + AZX_REG_B_SDO0STS);
@@ -1360,10 +1360,10 @@
void snd_azx_stream_start(u32 azx_base, u32 sd_base)
{
- printk(" STARTING STREAM !!!!\n");
u32 val = 0;
u32 addr = 0;
+ printk(" STARTING STREAM !!!!\n");
// try to stop the stream
addr = azx_base + sd_base + AZX_REG_3B_SD_CTL;
//printk("Writing 0x2 to addr[0x%lx]\n", (unsigned long)addr);
@@ -1380,9 +1380,9 @@
void snd_azx_stream_stop(u32 azx_base, u32 sd_base)
{
- printk(" STOPPING STREAM !!!!\n");
u32 val = 0;
+ printk(" STOPPING STREAM !!!!\n");
// try to stop the stream
val = readb(azx_base + sd_base + AZX_REG_3B_SD_CTL) & 0xFD;
writeb(val, azx_base + sd_base + AZX_REG_3B_SD_CTL);
@@ -1434,8 +1434,6 @@
static int snd_azx_pcm_open(snd_pcm_substream_t* substream, azx_dev_t* azx_dev)
{
- printk("*-*-* Entered pcm_open *-*-*\n");
-
snd_pcm_runtime_t *runtime = substream->runtime;
azx_t* chip = snd_pcm_substream_chip(substream);
@@ -1443,6 +1441,10 @@
u32 azx_base = chip->remap_addr;
//u32* bdl_base;
u32 sd_base = azx_dev->sd_off;
+ int err;
+
+
+ printk("*-*-* Entered pcm_open *-*-*\n");
azx_dev->substream = substream;
if (azx_dev->sd_off == 0x100) {
@@ -1462,8 +1464,6 @@
snd_pcm_limit_hw_rates(runtime);
- int err;
-
if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) {
printk("Error: snd_pcm_hw_constraint_integer()\n");
return err;
@@ -1475,11 +1475,11 @@
static int snd_azx_playback_open(snd_pcm_substream_t* substream)
{
- printk("*-*-* Entered playback_open *-*-*\n");
-
azx_t* chip = snd_pcm_substream_chip(substream);
int err;
+ printk("*-*-* Entered playback_open *-*-*\n");
+
// here we want to setup the runtime fields according to our hardware support
err = snd_azx_pcm_open(substream, &chip->azx_dev[SDO0]);
if (err < 0) {
@@ -1492,10 +1492,10 @@
static int snd_azx_playback_close(snd_pcm_substream_t* substream)
{
- printk("*-*-* Entered playback_close *-*-*\n");
-
azx_t *chip = snd_pcm_substream_chip(substream);
+ printk("*-*-* Entered playback_close *-*-*\n");
+
chip->azx_dev[SDO0].substream = NULL;
return 0;
@@ -1503,12 +1503,12 @@
static int snd_azx_pcm_hw_params(snd_pcm_substream_t* substream, snd_pcm_hw_params_t* hw_params)
{
- printk("*-*-* Entered pcm_hw_params *-*-*\n");
-
snd_pcm_runtime_t* runtime = substream->runtime;
size_t size = params_buffer_bytes(hw_params);
int err = 0;
+ printk("*-*-* Entered pcm_hw_params *-*-*\n");
+
// here we are allocating the play buffer of size specified by the Middle layer
// and assigning the addrss to runtime fields (dma_area, dma_addr, dma_size) via this helper function
printk("size of play buffer = %i\n", size);
@@ -1536,8 +1536,6 @@
static void snd_azx_setup_periods(azx_t *chip, azx_dev_t *azx_dev)
{
- printk("*-*-* setup_periods *-*-*\n");
-
int idx;
u32* bdl_v_addr = (u32*)azx_dev->bdl_v_addr;
u32 bdl_p_addr = azx_dev->bdl_p_addr;
@@ -1545,6 +1543,8 @@
u32 azx_base = chip->remap_addr;
u32 playback_buff_p_addr_l; // the lower 32bit of the playback buffer physical address
+ printk("*-*-* setup_periods *-*-*\n");
+
// program the BDL address into the stream register
writel(bdl_p_addr, azx_base + sd_base + AZX_REG_L_SD_BDLPL);
writel(0x0, azx_base + sd_base + AZX_REG_L_SD_BDLPU);
@@ -1582,8 +1582,6 @@
void snd_azx_pcm_setup_controller(azx_t* chip, azx_dev_t* azx_dev)
{
- printk("*-*-* setup_controller *-*-*\n");
-
u32 azx_base = chip->remap_addr;
u32 sd_base = azx_dev->sd_off;
snd_pcm_runtime_t *runtime = azx_dev->substream->runtime;
@@ -1594,6 +1592,8 @@
u32 val = 0;
+ printk("*-*-* setup_controller *-*-*\n");
+
// printk("stream info:\n");
// printk("rate = %i\n", rate);
// printk("num_channels = %i\n", num_channels);
@@ -1662,8 +1662,6 @@
void snd_azx_pcm_setup_codec(azx_t* chip, azx_dev_t* azx_dev)
{
- printk("*-*-* Entered setup_codec *-*-*\n");
-
u8 cad = get_audio_codec_address();
u8 nid = 0;
u8 direct = 0;
@@ -1678,6 +1676,8 @@
u8 aow_nid = get_dac_nid();
u8 aiw_nid = get_adc_nid();
+ printk("*-*-* Entered setup_codec *-*-*\n");
+
if (azx_dev->sd_off == 0x100) {
nid = aow_nid;
printk("Programming DAC to the correct format...\n");
@@ -1722,8 +1722,6 @@
static int snd_azx_pcm_prepare(snd_pcm_substream_t *substream)
{
- printk("*-*-* Entered pcm_prepare *-*-*\n");
-
azx_t* chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime;
azx_dev_t* azx_dev = get_azx_dev(substream);
@@ -1732,6 +1730,8 @@
azx_dev->size = snd_pcm_lib_buffer_bytes(substream);
azx_dev->fragsize = snd_pcm_lib_period_bytes(substream);
+ printk("*-*-* Entered pcm_prepare *-*-*\n");
+
// verify the information passed in...dma_addr, size and fragsize
printk("azx_dev->physbuf (play back physical address) = 0x%lx\n", (unsigned long)azx_dev->playbuff_p_addr);
printk("azx_dev->size (play back buffer size in bytes) = %i\n", azx_dev->size);
@@ -1765,14 +1765,14 @@
static int snd_azx_pcm_trigger(snd_pcm_substream_t* substream, int cmd)
{
- printk("*-*-* Entered pcm_trigger *-*-*\n");
-
azx_t* chip = snd_pcm_substream_chip(substream);
azx_dev_t* azx_dev = get_azx_dev(substream);
u32 sd_base = azx_dev->sd_off;
u32 azx_base = chip->remap_addr;
u8 val = readb(azx_base + sd_base + AZX_REG_3B_SD_CTL);
+ printk("*-*-* Entered pcm_trigger *-*-*\n");
+
printk("val = 0x%lx\n", (unsigned long)val);
switch (cmd) {
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -1814,8 +1814,6 @@
static snd_pcm_uframes_t snd_azx_pcm_pointer(snd_pcm_substream_t* substream)
{
- printk("*-*-* Entered pcm_pointer *-*-*\n");
-
//unsigned int current_ptr;
azx_t* chip = snd_pcm_substream_chip(substream);
azx_dev_t* azx_dev = get_azx_dev(substream);
@@ -1825,6 +1823,8 @@
size_t ptr1, ptr;
+ printk("*-*-* Entered pcm_pointer *-*-*\n");
+
ptr1 = readl(azx_base + sd_base + AZX_REG_L_SD_LPIB);
// printk("position = %d\n", azx_dev->position);
@@ -1843,14 +1843,16 @@
static snd_pcm_uframes_t snd_azx_pcm_cap_pointer(snd_pcm_substream_t* substream)
{
-// printk("*-*-* Entered pcm_cap_pointer *-*-*\n");
-
//unsigned int current_ptr;
azx_t* chip = snd_pcm_substream_chip(substream);
azx_dev_t* azx_dev = get_azx_dev(substream);
u32 val;
u32 azx_base = chip->remap_addr;
u32 sd_base = azx_dev->sd_off;
+ size_t ptr1, ptr;
+
+
+// printk("*-*-* Entered pcm_cap_pointer *-*-*\n");
// TODO: put in the code to read the position register associated with this stream
// need to also add support for the position register setup in snd_azx_init_chip()
@@ -1858,8 +1860,6 @@
// FIXME: for now just return the last updated position
val = readl(azx_base + sd_base + AZX_REG_L_SD_LPIB);
- size_t ptr1, ptr;
-
ptr1 = val;
if (ptr1 != 0) {
@@ -1891,11 +1891,11 @@
// ***************************** CAPTURE code **************************************
static int snd_azx_capture_open(snd_pcm_substream_t* substream)
{
- printk("*-*-* Entered capture_open *-*-*\n");
-
azx_t* chip = snd_pcm_substream_chip(substream);
int err;
+ printk("*-*-* Entered capture_open *-*-*\n");
+
// here we want to setup the runtime fields according to our hardware support
err = snd_azx_pcm_open(substream, &chip->azx_dev[SDI0]);
if (err < 0) {
@@ -1908,10 +1908,10 @@
static int snd_azx_capture_close(snd_pcm_substream_t* substream)
{
- printk("*-*-* Entered capture_close *-*-*\n");
-
azx_t *chip = snd_pcm_substream_chip(substream);
+ printk("*-*-* Entered capture_close *-*-*\n");
+
chip->azx_dev[SDI0].substream = NULL;
return 0;
@@ -1931,11 +1931,11 @@
//static int __devinit snd_azx_new_playback_pcm(azx_t* chip)
static int __devinit snd_azx_new_pcm(azx_t* chip)
{
- printk("*-*-* Entered new_pcm *-*-*\n");
-
snd_pcm_t* pcm;
int err;
+ printk("*-*-* Entered new_pcm *-*-*\n");
+
if ((err = snd_pcm_new(chip->card, "ICH6 HDA", 0, 1, 1, &pcm)) < 0) {
printk("Error: snd_pcm_new() failed!!!\n");
return err;
@@ -2087,8 +2087,6 @@
int snd_azx_amp_put(azx_t* chip, u8 nid, u8 left_val, u8 right_val, u8 direction, u32 index)
{
-// printk("*-*-* Entered amp_put *-*-*\n");
-
u32 cad = get_audio_codec_address();
u32 direct = 0;
u32 l_parameter = 0;
@@ -2099,6 +2097,8 @@
u32 upper_response = 0;
+// printk("*-*-* Entered amp_put *-*-*\n");
+
if (direction) {
// output direction = 1
l_parameter = 0xA000;
@@ -2129,8 +2129,6 @@
int snd_azx_amp_get(azx_t* chip, u8 nid, u8* left_val, u8* right_val, u8 direction, u32 index)
{
-// printk("*-*-* Entered amp_get *-*-*\n");
-
u32 cad = get_audio_codec_address();
u32 direct = 0;
u32 l_parameter = 0;
@@ -2139,6 +2137,8 @@
u32 lower_response = 0;
u32 upper_response = 0;
+// printk("*-*-* Entered amp_get *-*-*\n");
+
// need to call a function to get the val from the codec
if (direction) {
// output direction = 1
@@ -2251,9 +2251,6 @@
// this function updates the hardware
static int snd_azx_mast_vol_out_callback_put(snd_kcontrol_t* kcontrol, snd_ctl_elem_value_t* ucontrol)
{
-
- printk(" ################### ENTERING snd_azx_mast_vol_out_callback_put() *****\n");
-
struct mix_ctl_table_entry* me = get_mix_entry(PCM_VOLUME);
azx_t* chip = snd_kcontrol_chip(kcontrol);
@@ -2270,6 +2267,9 @@
u8 mute = 1;
+
+ printk(" ################### ENTERING snd_azx_mast_vol_out_callback_put() *****\n");
+
snd_azx_get_stored_mixer_vals(chip, path, &mute, &left_val, &right_val);
left_val = (u8)ucontrol->value.integer.value[0];
@@ -2295,9 +2295,6 @@
static int snd_azx_mast_vol_in_callback_put(snd_kcontrol_t* kcontrol, snd_ctl_elem_value_t* ucontrol)
{
-
- printk(" ################### ENTERING snd_azx_mast_vol_in_callback_put() *****\n");
-
struct mix_ctl_table_entry* me = get_mix_entry(PCM_CAPTURE);
azx_t* chip = snd_kcontrol_chip(kcontrol);
@@ -2314,6 +2311,9 @@
u8 mute = 1;
+
+ printk(" ################### ENTERING snd_azx_mast_vol_in_callback_put() *****\n");
+
snd_azx_get_stored_mixer_vals(chip, path, &mute, &left_val, &right_val);
left_val = (u8)ucontrol->value.integer.value[0];
@@ -2339,8 +2339,6 @@
static int snd_azx_mast_vol_mute_callback_put(snd_kcontrol_t* kcontrol, snd_ctl_elem_value_t* ucontrol)
{
- printk(" ################### ENTERING snd_azx_mast_vol_mute_callback_put() *****\n");
-
struct mix_ctl_table_entry* me = get_mix_entry(PCM_MUTE);
azx_t* chip = snd_kcontrol_chip(kcontrol);
@@ -2352,12 +2350,14 @@
u32 index = me->index;
u32 direction = me->amp_direction;
-
//u8 path = (kcontrol->private_value & 0x1F000) >> 12;
u8 path = kcontrol->private_value;
u8 mute = (u8)ucontrol->value.integer.value[0];
+
+ printk(" ################### ENTERING snd_azx_mast_vol_mute_callback_put() *****\n");
+
//printk("*-*-* Entered single_put w/ nid[%i] *-*-*\n", nid);
snd_azx_get_stored_mixer_vals(chip, path, &mute, &left_val, &right_val);
@@ -2386,8 +2386,6 @@
static int snd_azx_mast_vol_in_callback_get(snd_kcontrol_t* kcontrol, snd_ctl_elem_value_t* ucontrol)
{
- printk(" ################### ENTERING snd_azx_mast_vol_in_callback_get() *****\n");
-
azx_t* chip = snd_kcontrol_chip(kcontrol);
// u32 nid = kcontrol->private_value & 0xFF;
@@ -2398,6 +2396,8 @@
u8 right_val;
u8 mute;
+ printk(" ################### ENTERING snd_azx_mast_vol_in_callback_get() *****\n");
+
snd_azx_get_stored_mixer_vals(chip, path, &mute, &left_val, &right_val);
ucontrol->value.integer.value[0] = left_val; // get left channel gain
@@ -2411,8 +2411,6 @@
static int snd_azx_mast_vol_out_callback_get(snd_kcontrol_t* kcontrol, snd_ctl_elem_value_t* ucontrol)
{
- printk(" ################### ENTERING snd_azx_mast_vol_out_callback_get() *****\n");
-
azx_t* chip = snd_kcontrol_chip(kcontrol);
//u32 nid = kcontrol->private_value & 0xFF;
@@ -2423,6 +2421,8 @@
u8 right_val;
u8 mute;
+ printk(" ################### ENTERING snd_azx_mast_vol_out_callback_get() *****\n");
+
snd_azx_get_stored_mixer_vals(chip, path, &mute, &left_val, &right_val);
ucontrol->value.integer.value[0] = left_val; // get left channel gain
@@ -2437,8 +2437,6 @@
static int snd_azx_mast_vol_mute_callback_get(snd_kcontrol_t* kcontrol, snd_ctl_elem_value_t* ucontrol)
{
- printk(" ################### ENTERING snd_azx_mast_vol_mute_callback_get() *****\n");
-
azx_t* chip = snd_kcontrol_chip(kcontrol);
//u32 nid = kcontrol->private_value & 0xFF;
@@ -2449,6 +2447,8 @@
u8 right_val;
u8 mute;
+ printk(" ################### ENTERING snd_azx_mast_vol_mute_callback_get() *****\n");
+
snd_azx_get_stored_mixer_vals(chip, path, &mute, &left_val, &right_val);
ucontrol->value.integer.value[0] = mute; // get left channel gain
Common subdirectories: azx-alsa-drop-driver-1.1.2a/codec and azx-alsa-drop-driver-1.1.2a-patched/codec
[-- Attachment #3: conn_list.patch --]
[-- Type: application/octet-stream, Size: 517 bytes --]
--- azx-alsa-drop-driver-1.1.2a-patched/codec.org/codec_enum.c Thu Jul 8 21:18:55 2004
+++ azx-alsa-drop-driver-1.1.2a-patched/codec/codec_enum.c Thu Jul 8 21:25:58 2004
@@ -1376,7 +1376,10 @@
store_codec_info_entry(proc_str_entry);
// get conn list len
- conn_len = get_conn_list_len(chip, nid, &is_long_form);
+ if (wid_caps.conn_list)
+ conn_len = get_conn_list_len(chip, nid, &is_long_form);
+ else
+ conn_len = 0;
if(is_long_form)
idx = 2;
else
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RE: Announcing Linux driver for High-definition (aka Azalia) audio
2004-07-08 17:57 Announcing Linux driver for High-definition (aka Azalia) audio Kogan, Dan D
2004-07-08 18:35 ` James Courtier-Dutton
@ 2004-07-28 15:22 ` Takashi Iwai
1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2004-07-28 15:22 UTC (permalink / raw)
To: Kogan, Dan D; +Cc: C.L. Tien, alsa-devel
At Thu, 8 Jul 2004 10:57:40 -0700,
Kogan, Dan D wrote:
>
> Greetings all,
>
> I would like to announce the initial posting of a driver for Intel's
> High-Definition audio (formerly known as Azalia) to the ALSA community.
I merged the code to alsa-driver CVS tree now. It will be included in
the next ALSA release tarball. I did some clean up for the recent
code base, and replaced bunch of debug printk()s with snd_printdd().
The compilation error on the older gcc should have been fixed, but
not tested. Please give a shot.
The correction by C.L.Tien is also included now.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-28 15:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-08 17:57 Announcing Linux driver for High-definition (aka Azalia) audio Kogan, Dan D
2004-07-08 18:35 ` James Courtier-Dutton
2004-07-28 15:22 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2004-07-09 2:02 C.L. Tien - 田承禮
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.