blog counter

View My Blog Hit Stats

Tuesday Jul 29, 2008


Download the binary here.


audiohd.tar.gz


What is new in this audioHD driver?


1) Parser was added to replace the hard coding for building output path,
   input path and monitor path.
2) You can monitor the recording process and get "what you hear is what you get".
3) SPDIF output was enabled.


Tested platforms:


1) Ultra 40 M2,  Codec10ec, 0885
2) Ultra 24, Codec10ec, 0888
3) Ultra 20, Code10ec, 0883
4) Toshiba M8  Codec10ec,0268


Platforms not working:



1) Toshiba M9 



The steps to try the driver:


  1. backup old audiohd driver
cp /kernel/drv/audiohd /kernel/drv/audiohd.bak
cp /kernel/drv/amd64/audiohd /kernel/drv/amd64/audiohd.bak
2. untar the file,
audiohd.tar.gz
3. cp debug32/audiohd
cp debug64/auduiohd /kernel/drv/amd64/
4. If you don't want to reboot your system, do the
following steps in CDE or console mode (not in gnome):
4.1 uncomment this line: reset-configuration=1; in
/kernel/drv/audiohd.conf
4.2 rem_drv audiohd
4.3 add_drv -i '"pciclass,0403"' audiohd
5. Or, you reboot system after overriding audiohd binary
in step 3.

Wednesday Jul 09, 2008

Years ago, 8259 was extensively adopted by single CPU PC and the IRQ and vector number was clear to OS.  Now, we have APICs in Intel multiple processor systems.  It is quite confusing how the IRQ numbers are assigned to OS.  Here is the output of "::interrupts" output in mdb.


 ::interrupts

IRQ  Vect IPL Bus    Trg Type   CPU Share APIC/INT# ISR(s)

4    0xb0 12  ISA    Edg Fixed  3   1     0x0/0x4   asyintr

9    0x81 9   PCI    Lvl Fixed  1   1     0x0/0x9   acpi_wrapper_isr

14   0x41 5   ISA    Edg Fixed  7   1     0x0/0xe   ata_intr

20   0x20 1   PCI    Lvl Fixed  4   1     0x0/0x14  ehci_intr

21   0x21 1   PCI    Lvl Fixed  5   1     0x0/0x15  ohci_intr

48   0x60 6   PCI    Lvl Fixed  6   1     0x1/0x0   e1000g_intr  <--- first pin of second IOAPIC

49   0x61 6   PCI    Lvl Fixed  6   1     0x1/0x1   e1000g_intr

50   0x62 6   PCI    Lvl Fixed  6   1     0x1/0x2   e1000g_intr

51   0x63 6   PCI    Lvl Fixed  6   1     0x1/0x3   e1000g_intr

63   0x40 5   PCI    Edg MSI    2   1     -         mpt_intr


....


We have IRQ numbers from 4 to 63 here.  But how they are assigned?  Before we understand it, we should firstly look into IOAPIC.  Usually, Intel IOAPIC have 24 interrupt pins.  The interrupt pins of PCI devices will be routed to these pins hierarchically.  And the routing paths are almost harden into the motherboard, though PCI devices may have two selectable pins for some flexibility.  The first interrupt input pin of first IOAPIC will be assigned IRQ 0, while  the forth pin will be assigned IRQ4 in this example, and so on.  If the system have two more IOAPICs, the first IRQ number will start from the multiples of 24, 48 in the example above.  Now, we know the IRQ numbers are from the input pins of IOAPICs.  IRQ numbers are not necessary bundled with the vector numbers in APICs, because the vector numbers can be re-programmable. To some degrees, IRQ numbers are the hardware level layout of interrupt lines and vector numbers are in software level and more meaningful to OS.
  As to the MSI interrupt, IOAPIC is no longer required to deliver the interrupt.  For, MSI message can target the host bridge address as other IO transactions. So such format will be printed for MSI devices:


24   0x61 6   PCIe   Edg MSI    0   1     -    e1000g`e1000g_intr_pciexpress
^
|-------- no ioapic listed



Tuesday Jul 08, 2008

经常经过八达岭沿线, 每次看到一些路牌上面写着Badaling Expwy(expressway), 总觉得有点不妥.  按照美国<<manual on uniform traffic control devices>>标准, Expressway和Freeway解释如下.


Expressway—a divided highway with partial control of access.  部分控制分道公路
Freeway—a divided highway with full control of access.  全控制分道公路


我就在美国亲眼见到一条Expressway(加州Menlo Park的Bayfront Expressway)是有十字路口的. 而freeway才是全封闭的, 最高等级公路.  所以我觉得八达岭高速, 翻译成Badaling Freeway比较确切一些. 

Sunday Jun 15, 2008

中国国家足球队又一次窝囊的倒下了,输得连最后一件底库都给脱光啦. 这次我并不想评论球员,因为全国球迷都很无奈的预测到这个结果啦,可谓是众望所归。输一次也许是球员的责任, 可是连续两次预选赛小组都没出线,那就不能怪他们拉。我们的队员到底是怎么选拔上来拉,为什么球员选择面越来越窄,球员的战术素养越来越差。为什么联赛越踢越难看,球迷越来越少。所有的足球强队都有一个强大而健康的联赛做支撑。我们的中超呢,赛程没有保证,裁判缺乏公正,球迷缺乏尊重。组织者只关心自己的政绩,为了备战随便中断联赛。球员的水平不是圈养出来的,而是在长期的比赛中提高的。这种国家队组织方式,只能是固步自封,闭门造车。还有基层球员的选拔,那些足球最高统治者关心过吗?我们在一些偏项,小项当中通过重点扶持,国家投入,取得了不错的成绩。但是事实证明足球是一个需要广大群众基础的体育项目,不是能突击几个月或几年就可以的。我们需要一个有效健康的多级联赛,提高球员的比赛水平面,战术素养。中国足协这么多年没有做到,或者是他们根本就没有能力做到。那么就请你们尊重联赛,让更有能力的人来领导。足球不是赌博,现在国家队输啦,联赛支离破碎,我们还剩下什么?

Wednesday Jun 04, 2008

After I added some code to reinitialize the GTT(Graphics Translation Table) table in agptarget driver resume interface,  Solaris could resume properly from the suspend state.   Finally,  there are four components affecting Intel graphics S3 process, ie, i915 driver, vgatext driver, agptarget driver and DDX driver.  
Tips in suspend debugging. 


1)Now days, most of the laptops do not get serial ports in them.  We can only wake up kmdb in console which depends on framebuffer driver.  How can we debug the suspend process with KMDB after the framebuffer suspend?  Let me explain a bit,  each device like framebuffer in Solaris will be set to poweoff by post suspend call which can not be controlled by device driver.  So the graphics device will power off after it say "suspend success" to upper layer, then console and kmdb prompt will go away for the poweroff.   We should hack the power off code in post supsend if we need further kmdb support.


2) I should have more, let me think a while.

Monday May 12, 2008

  Indiana release was hit by a P1 bug recently. Further details are recorded in: http://defect.opensolaris.org/bz/show_bug.cgi?id=1069.
  It was reported on laptops with Intel graphics card.  Colleagues in US had reproduced it on their laptops, however we could not reproduce it on our latop with the same model.  Finally, we figured out that all the laptops in China are equipped with less than 4G physical memory, while the laptop in US are equipped with 4G.
  Before further detail, I will give some background about Intel graphics card.  Intel graphics card is a integrated device in Intel's chipset and it target at the low end market.  Actually, it does not have any video memory connected to the graphics chip, but a reserved aperture to remap system memory.  The system can dynamically pin and remap the system memory to fulfill the aperture.  Usually, it can consume tens or hundreds of megabytes of system memory.  And that is what agpgart driver is for.  When the agpgart driver was developed, Intel only was shipping 32-bit hardware.  Consequently, solaris can only have 4G virtual memory on such systems.  Even more, user applications will consume part of the 4G space, that make the kernel virtual space more precious.  The standard DDI DMA interfaces must allocate the kernel virtual space first and then get the physical pages.  So a set of pmem interfaces were developed to allocate the physical memory directly without occupying any kernel virtual space. agpgart driver depend on pmem interfaces to allocate and free the memory.  One defect of pmem interfaces was that a certain physical range could not be guaranteed when requesting the physical pages. As a result, agpgart driver may get a physical page above 4G under 64-bit kernel mode. That cause agpgart driver have wrong GART/GTT table entries pointing to pages owned by ZFS.  ZFS pages will easily be corrupted.
  The quick solution is to use the standard DDI DMA interfaces to allocate physical pages under 64-bit kernel mode, for the kernel virtual memory is not so expensive for 64-bit kernel.  The physical pages can be qualified to a certain range by a parameter named DDI DMA attribute.

Sunday Mar 23, 2008

  Someone's wish is customers can assemble their own vehicles like computers.  Tough it is crazy,  you can find the similarities between vehicles and computers.



   1) cpu vs engine Both of them are the key component to drive the whole systems.
   2) motherboard vs vehicle chassis Both of them are the host for other devices. 
   3) northbridge vs transmission Both of them are the nexus between the key component and the other devices.
   4) Computer chassis vs vehicle iron shell. Both of them are the outside parts.
   5) cpu fan vs engine fan Both of them cool the key component.



  I think the biggest gap for the end users to DIY their vehicle is, the devices in vehicle are analogous and the system will not be guaranteed to function well after all the necessities are plugged. It depends on the experience of the end user to make the vehicle as better as it can be. That is, you can DIY a vehicle with all the necessities and it can run in the road, but the gasoline consumption may make you mad.

Tuesday Mar 18, 2008

1. The worst thing is not you haven't done anything,  but it is your boss doesn't know you.


2. Try to make your boss look better to her/his boss will make you look better to your boss.


3. If you plan to earn more, try to be unique in your group.


4. Too much meeting are bad to your company, however it is much beneficial to you if you miss none.

Wednesday Mar 05, 2008

今天天去美国大使馆签证处按指纹,刚刚要进签证大厅,出来一摩登女郎,看着非常眼熟。由于前两天老妈天天看<<女人花>>,一下子就认出来是刘涛了,可不是吗? 旁边那个男的不就是她新婚的老公嘛,前几天媒体恶炒的豪华婚礼的男主角。两口子有说有笑的,旁若无人,可甜蜜了。感觉现实中的刘涛比较矮小,不超过162,上身一白风衣,腿上绑着丝袜。刚走出了几步,刘涛就把她的深黑大墨镜给带上了。可惜我的手机已经在过门卫之前已经寄存了,否则还能拍几张背影照。下次得仔细看看带大墨镜的人,没准就是哪个大明星呢。

Wednesday Feb 27, 2008

最近工行给我发通知说, 由于去年表现优异,  给我把人民币的透支额度提高2500元. 于是这几天想蹭热打铁, 把我可怜的美圆透支上限给调一调.   好不容易拨通了服务电话, 被告知我最近的消费不够, 不给办.  为什么?  提高美圆透支额度,  无非是想在国外多消费点, 这应该是银行所求之不得的。难道银行连这笔帐也算不清楚吗? 我的信用难道就值1500美圆?  联想到国内银行的种种不方便,  银行总是以高傲的姿态俯视着我们这些小市民, 这种举动也不足为奇了.  可是别忘了大客户给他们带来的利润, 未必会超过人数众多的小市民.  现在和银行打交道真是头疼, 常常为了办理2分钟的事情排上两小时.   我们的银行难道真的就没有一点点服务意识吗?  造成这种局面的根源又是什么呢?  银行就是个被国家宠坏的孩子.

Saturday Feb 02, 2008

   From the birth of computer hardware, OS software had experienced three big steps. Firstly, OS was a supplement to computer for customers to drive the hardware.  They were copied from person to person  without any limitations. Then, many proprietary OSs were developed by special companys. These software are released under certain copyrights and are closed source usually. Now, more and more software were open sourced to customers. The software owner release their source to end user.  GNU has Linux, while SUN has open Solaris.  Does the end user really need these code which are composed by millions of lines? The answer is obvious not. They will not care what is the code under the OS if they are only interested in using them. Then who the most possible embracer of the OSs with source code.  Let's look at the current situation of the industry. As we have known, M$ acquire more and more IT market by their closed source windows. Their OSs are so dominate that the hardware vendors must pay M$ to verify their hardware because no one will by the hardware not compatable with windows. As a result, hardware vendors are losing their power and profit silently because they must obey the same monarch. It is a complete subversion to the time when customer paid much money for the hardware and got their OSs freely, at least it was what they thought. In order to change this unbalance, hardware vendors need an OS which conforms to an open standard.  Also, they would like to give their voices on how the OS will evolve in the future. There is no difficulty to guess the hardware vendors are applauding hard behind the open OSs.
   Then, does "open" mean everything that the hardware vendors want?  However,  the fact is far from what we expect.  The top hardware vendors like IBM seems show more interests on Linux than Open Solaris.  From their perspectives,  Open Solaris was controlled by an potential hardware opponents.  To them,  it is like a party, very attractive but they don't know when the host will ask them to pay for attending the party. 

Tuesday Jan 29, 2008

   Most area of South China were hit a heavy blizzard these days.  Public
transportations are encountering a unprecedented challenge.  Hundreds of
Thousand people were stalled in Airports,  Railway Stations.
Vegetable trucks were blocked in the freeway.  Power transmission were
interrupted in some districts.  Imagine that, no power, no vegetable means
what to people in winter.
   What happens to where we are living?  This is not the first time the nature
teach us.  Last year, some provinces in South China got a unbearable draught.
As you may know, South China was known as humid land. It is ridiculous!
   No mater what the nature are complaining, we are burning the gasoline,
blocking the river by dam, pulling down the green forrest and disposing trash
everywhere. Then, we got punishment because its voice was ignored.  It is
the right time we listen carefully from the nature and pay more respect to it.
It is never too late.
 


1) High voltage tower collapsed in Dabie mountain, Anhui province


High volatge tower collapsed in Dabie Mountain, Anhui province


2) Traffic jam in Jingzhu freeway


Tuesday Jan 15, 2008

  I have one file to be formatted for special use, here are my original file and target file.
Original file:


__glXDisp_CreateContext             0x7a        ../../../GL/glx/.libs/libglx.a(glxcmdsswap.o)
__glXDisp_CreateNewContext          0x116       ../../../GL/glx/.libs/libglx.a(glxcmdsswap.o)


Target file:
        __glXDisp_CreateContext
        __glXDisp_CreateNewContext


Following pattern was used to get my work done. 


 


%s/^\(\S\+\).*$/^I^I^I\1/g


 Notes: \S stands for white space character. ^I stands for tab character. \(, \) stands for the first matched pair that was referenced by "\1".


     



Tuesday Jan 01, 2008

To Chinese people, speaking in English is not a easy life for most one. However, you must speak it if you work in a US' company.  It was very frustrating if the native speaker looks lost after you finished a sentence to him, tough each word was sure to be pronounced correctly.  And It is funny that my Chinese colleague can understand me, while ehe native speaker didn't understand my sentence as a whole.  Some time ago, I worked with an Indian engineers who
spoke English with a heavy accent.  Although I can not even hear any English word from him, he can communicate with US' people very well.  The pronunciation doesn't make a big point here.  Why does this happen?   Possible reason is here:
1) wrong language context. US' people have a different logic consecution from Chinese. Sometime, it is natural for  Chinese to put two specific sentences one by one, however it may be confusing to US' people. 
2) wrong stress and rhythm. Every sentence has its point on one or two word, these word must be paid  more respect. The stress and rhythm in Chinese way make native speaker confused. 

Monday Dec 24, 2007

  A developer from ISV asked me when the probe(9E) must be implemented.  Let's look at the fragment from Solaris's manpage below first.




probe – determine if a non-self-identifying device is present




For a self-identifying device, this entry point is not necessary.  However, if a device exists in both self-identifying and  non-self-identifying forms,   a probe() routine can be provided to simplify the driver




  Then A question was raised?  What is self-identified device? And what is non self-identified device? Let's explain the self-identified device by pci device.  All the PCI devices can be enumerated by the standard probe process.  ie., kernel enumerate all the PCI devices by two well known IO address, CONFIG_ADDRESS and CONFIG_DATA.  By this way, a PCI device was indentified by a unique 3-tuple composed of bus, device, function number. The process is finished by OS automatically without any additional information.

  However, as to a non self-identified device like ISA device, a configuration file must be created to tell where the device possibly is located.  Probe entry will be called to test if the device is actually there. I t is the responsibility of the developer to know which IO ports are probed for ISA devices.  In morden society, there is no need for 99 percent of the devices to implement probe entry.  Because, non self-identified device is gone.
 

This blog copyright 2009 by Ming Shu