From: Wei.Ni@uli.com.tw
To: tiwai@suse.de, pshou@realtek.com.tw
Cc: linux-kernel@vger.kernel.org, Emily.Jiang@uli.com.tw,
Peer.Chen@uli.com.tw
Subject: [patch] alsa-driver-1.0.9b/alsa-kernel/pci/hda/: HDA driver for ULI M5461
Date: Wed, 24 Aug 2005 15:47:35 +0800 [thread overview]
Message-ID: <OFFD189321.7C1C9711-ON48257067.0027DDAB@uli.com.tw> (raw)
[-- Attachment #1: Type: text/plain, Size: 710 bytes --]
Hi,Takashi Iwai & PeiSen Hou:
We add some codes in hda_intel.c which is in
alsa-driver-1.0.9b/alsa-kernel/pci/hda/ folder to support our HDA
controller ULi M5461.
Because that our controller has little different with Intel:
1.The M5461 have 11 streams(5 input streams and 6 output streams), and the
Intel's controller is only support 8 streams.
2.The M5461 CORB/RIRB size's default value is 2 entries, and it need to set
to 256 entries.
Could you please update the hda driver to support our controller M5461?
Thanks.
The following file is the patch of the hda_intel.c file. we have made a
full test for it.
Signed-off-by: Wei ni <wei.ni@uli.com.tw>
(See attached file: hda_intel.patch)
Have a good day!
wei
[-- Attachment #2: hda_intel.patch --]
[-- Type: application/octet-stream, Size: 2858 bytes --]
--- alsa-driver-1.0.9b/alsa-kernel/pci/hda/hda_intel.c.orig 2005-05-30 15:33:44.000000000 -0400
+++ alsa-driver-1.0.9b/alsa-kernel/pci/hda/hda_intel.c 2005-08-24 11:11:31.970792648 -0400
@@ -70,6 +70,7 @@
"{Intel, ICH7},"
"{Intel, ESB2},"
"{ATI, SB450},"
+ "{ULi, M5461},"
"{VIA, VT8251},"
"{VIA, VT8237A}}");
MODULE_DESCRIPTION("Intel HDA driver");
@@ -357,6 +358,8 @@
azx_writel(chip, CORBLBASE, (u32)chip->corb.addr);
azx_writel(chip, CORBUBASE, upper_32bit(chip->corb.addr));
+ /* set the corb size to 256 entries */
+ azx_writeb(chip, CORBSIZE, 0x02);
/* set the corb write pointer to 0 */
azx_writew(chip, CORBWP, 0);
/* reset the corb hw read pointer */
@@ -370,6 +373,8 @@
azx_writel(chip, RIRBLBASE, (u32)chip->rirb.addr);
azx_writel(chip, RIRBUBASE, upper_32bit(chip->rirb.addr));
+ /* set the rirb size to 256 entries */
+ azx_writeb(chip, RIRBSIZE, 0x02);
/* reset the rirb hw write pointer */
azx_writew(chip, RIRBWP, ICH6_RBRWP_CLR);
/* set N=1, get RIRB response interrupt for new entry */
@@ -1177,6 +1182,31 @@
{
int i;
+ if (chip->pci->vendor == 0x10b9 && chip->pci->device == 0x5461)
+ {
+ int j;
+ for (j = 0; j < MAX_ICH6_DEV; j++) {
+ unsigned int off = sizeof(u32) * (j * AZX_MAX_FRAG * 4);
+ azx_dev_t *azx_dev = &chip->azx_dev[j];
+ azx_dev->bdl = (u32 *)(chip->bdl.area + off);
+ azx_dev->bdl_addr = chip->bdl.addr + off;
+ if (chip->position_fix == POS_FIX_POSBUF)
+ azx_dev->posbuf = (volatile u32 *)(chip->posbuf.area + j * 8);
+ if (j >= 4)
+ i = j+1;
+ else
+ i = j;
+ /* offset: SDI0=0x80, SDI1=0xa0, ... SDO3=0x160 */
+ azx_dev->sd_addr = chip->remap_addr + (0x20 * i + 0x80);
+ /* int mask: SDI0=0x01, SDI1=0x02, ... SDO3=0x80 */
+ azx_dev->sd_int_sta_mask = 1 << i;
+ /* stream tag: must be non-zero and unique */
+ azx_dev->index = i;
+ azx_dev->stream_tag = i + 1;
+ }
+ }
+ else
+ {
/* initialize each stream (aka device)
* assign the starting bdl address to each stream (device) and initialize
*/
@@ -1195,6 +1225,7 @@
azx_dev->index = i;
azx_dev->stream_tag = i + 1;
}
+ }
return 0;
}
@@ -1297,6 +1328,15 @@
if ((err = pci_enable_device(pci)) < 0)
return err;
+{
+#if BITS_PER_LONG == 64
+#else
+u16 tmp3;
+pci_read_config_word(pci, 0x40, &tmp3);
+pci_write_config_word(pci, 0x40, tmp3 | 0x10);
+pci_write_config_dword(pci, PCI_BASE_ADDRESS_1, 0);
+#endif
+}
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
if (NULL == chip) {
@@ -1458,6 +1498,7 @@
{ 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ESB2 */
{ 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ATI SB450 */
{ 0x1106, 0x3288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* VIA VT8251/VT8237A */
+ { 0x10B9, 0x5461, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ULi M5461 */
{ 0, }
};
MODULE_DEVICE_TABLE(pci, azx_ids);
next reply other threads:[~2005-08-24 7:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-24 7:47 Wei.Ni [this message]
2005-08-24 11:02 ` Takashi Iwai
2005-08-24 13:12 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OFFD189321.7C1C9711-ON48257067.0027DDAB@uli.com.tw \
--to=wei.ni@uli.com.tw \
--cc=Emily.Jiang@uli.com.tw \
--cc=Peer.Chen@uli.com.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=pshou@realtek.com.tw \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®