Problems with hdaudio

OSS specific Solaris discussion (x86/SPARC)

Moderators: hannu, dev, cesium, kodachi

Problems with hdaudio

Postby Florianx » Sat Mar 01, 2008 5:27 pm

Hi,
I've installed oss4.0 on Ubuntu 7.10 and have problems with sound output.
I have a Acer Aspire 5920.

When I run osstest I hear nothing on most of the 11 devices.
On some, I hear sound from the onboard speaker when playing on the left, and ugly noise when testing the right.
On another two devices I hear music from my headphones when testing the left, and noise from the onboard speaker, when testing the right.

lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)


ossinfo
Version info: OSS 4.0 (b1014/200802280817) (0x00040003)
Platform: Linux/x86_64 2.6.22-14-generic #1 SMP Tue Feb 12 02:46:46 UTC 2008 (florian-laptop)

Number of audio devices: 11
Number of audio engines: 19
Number of mixer devices: 1


Device objects
0: osscore0 OSS core services
1: hdaudio0 Intel HD Audio interrupts=93102 (93103)
HD Audio controller Intel HD Audio
Vendor ID 0x8086284b
Subvendor ID 0x10250121
Codec 0: ALC888 (0x10ec0888/0x10250121)
Codec 1: Conexant2c06 (0x14f12c06)
2: ossusb0 USB audio core services
3: vmix0 OSS transparent virtual support


Mixer devices
0: High Definition Audio ALC888 (Mixer 0 of device object 1)

Audio devices
HD Audio front /dev/oss/hdaudio0/pcm0 (device index 0)
HD Audio rear /dev/oss/hdaudio0/pcm1 (device index 1)
HD Audio center/LFE /dev/oss/hdaudio0/pcm2 (device index 2)
HD Audio side /dev/oss/hdaudio0/pcm3 (device index 3)
HD Audio pcm4 /dev/oss/hdaudio0/pcm4 (device index 4)
HD Audio modem-out /dev/oss/hdaudio0/pcm5 (device index 5)
HD Audio spdif-out /dev/oss/hdaudio0/spdout0 (device index 6)
HD Audio spdifout /dev/oss/hdaudio0/spdout1 (device index 7)
High Definition Audio rec1 /dev/oss/hdaudio0/pcmin0 (device index 8)
High Definition Audio rec2 /dev/oss/hdaudio0/pcmin1 (device index 9)
High Definition Audio modem-in /dev/oss/hdaudio0/pcmin2 (device index 10)


ossxmix looks really strage:
http://img108.imageshack.us/img108/6685/ossxmixgs9.png
Florianx
 
Posts: 1
Joined: Sat Mar 01, 2008 5:05 pm

Postby Aha » Fri Apr 11, 2008 9:32 pm

The same problem on Acer Aspire 5920 (intel hdaudio) and OpenSolaris build 83. Meanwhile Solaris' built-in driver for hdaudio work fine (but does not provide optical digital output :-( )
Aha
 
Posts: 6
Joined: Fri Apr 11, 2008 9:29 pm
Location: Peterpurg, Russia

Postby cesium » Fri Apr 11, 2008 10:31 pm

The hdaudio standard doesn't determine what function each jack is used for. OSS/ALSA have to have "subdrivers" describing the specific functions of the jacks for each model. Also, some notebooks require special inits for the onboard audio to work.

Two ideas:
1) If I read the OSS source correctly, The ALC888 tries to use the same mapping as ALC883, which (according to your reports) may well be wrong. This seems to be the most likely reason.

You can get the latest source from the hg server ( mercurial.opensound.com ), and add an "alc888remap" hack (like the "alc883remap") in kernel/drv/hdaudio/hdaudio_codecids.h, which will accurately describe the device. (You could get the correct values from the Solaris audiohd driver source or by using trial and error).

Then change line 828 to use the newly created alc888remap:
{0x10ec0888, "ALC888", VF_ALC88X_HACK, (char **) &alc888remap}.

Recompile and reinstall, and it may work.

[edit: Then again, the suggested table in the remap doesn't entirely match the ossinfo devices. Maybe it isn't entirely activated? Or is there another check which can prune out devices? More likely, I read the source wrong].

2) Alternately, some notebooks require a special init (I doubt it since sound is being played), so maybe add a line at 1034:

{0x10250000, "Acer_aspire5920/ALC888", VF_ALC88X_HACK, (char **) &alc888remap, 0, hdaudio_ferrari5k_mixer_init, 0x10ec0888, 0x1025010f},

(or maybe some other init function. The source of the audiohd driver would help to see which option, if any, is correct).
Recompile, etc.

Note that the mercurial server sometimes has DNS problem. If it doesn't load add this line to /etc/hosts:
Code: Select all
82.118.207.57   mercurial.opensound.com
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Postby Aha » Sat Apr 12, 2008 12:30 am

Thanks to quick reply

I doubt that remapping may resolve the problem. I've not tried to recompile yet but .... I dont understand what is pcm4 in my config:

Audio devices
HD Audio front /dev/oss/hdaudio0/pcm0 (device index 0)
HD Audio rear /dev/oss/hdaudio0/pcm1 (device index 1)
HD Audio center/LFE /dev/oss/hdaudio0/pcm2 (device index 2)
HD Audio side /dev/oss/hdaudio0/pcm3 (device index 3)
HD Audio pcm4 /dev/oss/hdaudio0/pcm4 (device index 4)
HD Audio modem-out /dev/oss/hdaudio0/pcm5 (device index 5)
HD Audio spdif-out /dev/oss/hdaudio0/spdout0 (device index 6)
HD Audio spdifout /dev/oss/hdaudio0/spdout1 (device index 7)
High Definition Audio rec1 /dev/oss/hdaudio0/pcmin0 (device index 8)
High Definition Audio rec2 /dev/oss/hdaudio0/pcmin1 (device index 9)
High Definition Audio modem-in /dev/oss/hdaudio0/pcmin2 (device index 10)


My experiments:
ossmix jack.int-speaker.mode front
osstest 0
<left>
ossmix jack.int-speaker.mode rear
osstest 1
<ALL>
ossmix jack.int-speaker.mode center/LFE
osstest 2
<ALL>
ossmix jack.int-speaker.mode side
osstest 3
<ALL>
ossmix jack.int-speaker.mode pcm4
osstest 4
<ALL>


Looks like remapping pcm-<front might resolve the problem, what do you think?
Aha
 
Posts: 6
Joined: Fri Apr 11, 2008 9:29 pm
Location: Peterpurg, Russia

Postby cesium » Sat Apr 12, 2008 1:15 am

pcm4 is menioned in the remapping table I talked about:
124 ES, /* 24 */
125 "pcm4", /* 25 */
126 "pcm4", /* 26 */
127 NULL


I don't know if that remapping would help, since I don't have the hardware to test. If pcm4 outputs to front, then maybe it should be mapped there...

I found a source tarball of audiohd here (via James C. Liu's Weblog). This should provide a clue to what's missing from the OSS driver (it doesn't seem to treat ALC888 differently from other ALC88x types, but maybe I missed that).

Also, you might be able to send a bug to the OpenSolaris people, since this is a regression from the SADA driver (especially since the recent apporval of including OSS driver for hdaudio, and this is an hdaudio issue...).
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Postby Aha » Sat Apr 12, 2008 2:29 pm

I found out what's actually going on: rigth channel is overloaded. If I set right channel's volume to 50% I get good sound! Could you advise me where and what should I correct I sources to set up the level of right front to 50% of actual ?
Aha
 
Posts: 6
Joined: Fri Apr 11, 2008 9:29 pm
Location: Peterpurg, Russia

Postby dev » Sat Apr 12, 2008 5:54 pm

Aha wrote:I found out what's actually going on: rigth channel is overloaded. If I set right channel's volume to 50% I get good sound! Could you advise me where and what should I correct I sources to set up the level of right front to 50% of actual ?

It's likely that the volume register is incorrectly set.
dev
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Postby Aha » Sat Apr 12, 2008 5:58 pm

dev wrote:It's likely that the volume register is incorrectly set.


Where in code it is set?
Aha
 
Posts: 6
Joined: Fri Apr 11, 2008 9:29 pm
Location: Peterpurg, Russia

Postby dev » Sun Apr 13, 2008 5:14 am

Aha wrote:
dev wrote:It's likely that the volume register is incorrectly set.


Where in code it is set?


it's in the hdaudio_codec.c check the

See: http://mercurial.opensound.com/?file/95 ... io_codec.c

Line 303 hdaudio_set_control (int dev, int ctrl, unsigned int cmd, int value)

you will need to check the scaling function to see if it goes out of bounds.
dev
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Postby Aha » Sun Apr 13, 2008 11:41 am

dev wrote:
it's in the hdaudio_codec.c check the

See: http://mercurial.opensound.com/?file/95 ... io_codec.c

Line 303 hdaudio_set_control (int dev, int ctrl, unsigned int cmd, int value)

you will need to check the scaling function to see if it goes out of bounds.


I've already seen there. The problen is not in scaling function: it works with both channels identically, but in my case I have different volume in left and right channels
Aha
 
Posts: 6
Joined: Fri Apr 11, 2008 9:29 pm
Location: Peterpurg, Russia

Postby dev » Sun Apr 13, 2008 6:20 pm

Aha wrote:
dev wrote:
it's in the hdaudio_codec.c check the

See: http://mercurial.opensound.com/?file/95 ... io_codec.c

Line 303 hdaudio_set_control (int dev, int ctrl, unsigned int cmd, int value)

you will need to check the scaling function to see if it goes out of bounds.


I've already seen there. The problen is not in scaling function: it works with both channels identically, but in my case I have different volume in left and right channels


Wonder if the number of bits for the volume are right....I'll have to check ALC888 for that.
dev
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Postby Aha » Sun Apr 13, 2008 8:20 pm

dev! As far as I understand you are developer of OSS-comunity, am I right? Unfortunately I do not have a time to join to development process but as Aspire5920 owner I would like help you with testing or with any other activity connected with my instance of ALC888
Aha
 
Posts: 6
Joined: Fri Apr 11, 2008 9:29 pm
Location: Peterpurg, Russia

Postby Cimmerian » Sat Oct 04, 2008 10:13 pm

I have an ALC888 (nVidia) and am experiencing the same problem with the right channel volume...

Running a quite recent hg oss v4 (gentoo).

I'd like to try and get it fixed =) Although it does work fine after adjusting the right channel volume in ossxmix..
Cimmerian
 
Posts: 1
Joined: Sat Oct 04, 2008 10:07 pm


Return to Solaris

Who is online

Users browsing this forum: No registered users and 2 guests