[alsa-devel] Throughts on getting ALC892 working better (was Re: Help With Getting Line-in monitoring working)

Raymond Yau superquad.vortex2 at gmail.com
Tue Sep 6 10:34:00 CEST 2011


2011/9/6 Kevin Atkinson <kevin at atkinson.dhs.org>:


How did you get "snd: bad kfree" in the system log ?



[    6.272032] snd: bad kfree (called from f87381e3)
--
[    6.272043]  [<f85612b1>] ? snd_hidden_kfree+0x91/0xa0 [snd]
[    6.272048]  [<f87381e3>] ? snd_array_free+0x13/0x30 [snd_hda_codec]
[    6.272052]  [<f87381e3>] ? snd_array_free+0x13/0x30 [snd_hda_codec]
[    6.272057]  [<f87abfaf>] ? alc_free_kctls+0x4f/0x60 [snd_hda_codec_realtek]
[    6.272061]  [<f87affed>] ? alc_build_controls+0x44d/0x4b0
[snd_hda_codec_realtek]


>
> I spent several hours going over the data sheet (ver 1.3, you can find it at
> http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=24&PFid=28&Level=5&Conn=4&ProdID=284&DownTypeID=1&GetDown=false&Downloads=true

>
> Apparently there is no hardware master control and the master and PCM slider
> must be implemented in software.


>
> So, after the change you suggest below the mixer are mapped better in the
> newer drivers.  But things can be still be improved.  More below.
>

> Also to get line-in pass-through working via headphone out please unmute the
> second set of Amp-in vals of pin 0x26.
>
>> Node 0x26 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
>>  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>>  Amp-In vals:  [0x00 0x00] [0x80 0x80]
>
>                             ^^^^^^^^^^^ set these to 0x00
>>
>>  Connection: 2
>>    0x25 0x0b
>


The ALC892 provides ten DAC channels that simultaneously support 7.1
channel sound playback, plus 2 channels of independent stereo sound
output (multiple streaming) through the front panel stereo outputs.


you can create playback device 2 for the front panel headphone by adding

spec->alt_dac_nid = 0x25;


> Apparently all analog inputs are mixed together using 0x0B and then the
> output is sent to a bunch of other audio mixers, but these mixers don't
> really control the volume, they just have a separate mute for the PCM and
> analog input.  That being said, it probably also makes sense to mute analog
> audio (coming from 0x0B) on all but pins 0x26 (headphone) and 0x0C (front)
> by default.
>


The hardest thing is how to add the controls for this alc892

http://thread.gmane.org/gmane.linux.alsa.devel/88324

The laptop has built-in 5.1, and 5.1 or 7.1 output via jacks.

DAC NIDs:
0x02 front
0x03 rear
0x04 clfe
0x05 side

internal mixers:
0x0c front
0x0d rear
0x0e clfe
0x0f side

internal speaker pins:
0x14 front
0x15 "rear" (front of laptop)
0x16 clfe

external ports:
fixed route:
0x17 side

can select any output:
0x18 mic / output
0x1a line-in / output
0x1b headphone


>
> On an even lesser note, it would be really nice if ALSA could expose the
> full capacity of the hardware without having an unwieldy number of mixer
> controls.  For example each of the 5 output mixers have a separate PCM and
> analog pass-though mute control, it would be nice to expose this.  Also,
> each of the 8 analog pins can be repurposed as either input or output, some
> of them have a headphone amp, some of them have a mic boost, it would be
> nice if all this could all be exposed.  However, I can see how exposing all
> this will lead to a lot of confusing mixer settings.
>

does any user really want to pass the stereo signal from line in to
"center/lfe" ?


More information about the Alsa-devel mailing list