SB450 HDA Audio

From wiki.habital.lv
Revision as of 10:13, 20 August 2013 by Eugene (talk | contribs) (Created page with " $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: SB [HDA ATI SB], device 0: ALC262 Analog [ALC262 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 ca...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC262 Analog [ALC262 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC262 Digital [ALC262 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 6: Si3054 Modem [Si3054 Modem]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ cat /proc/asound/card0/codec#*|grep Codec
Codec: Realtek ALC262
Codec: Generic 11c1 Si3054
$ lspci -v
...
00:14.2 Audio device: ATI Technologies Inc IXP SB4x0 High Definition Audio Controller (rev 01)
       Subsystem: Benq Corporation Unknown device 058f
       Flags: bus master, slow devsel, latency 64, IRQ 16
       Memory at c0000000 (64-bit, non-prefetchable) [size=16K]
       Capabilities: [50] Power Management version 2
       Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
       Kernel driver in use: HDA Intel
       Kernel modules: snd-hda-intel
...
Модель и описание:
ALC262
fujitsu      - Fujitsu Laptop
hp-bpc       - HP xw4400/6400/8400/9400 laptops
hp-bpc-d7000 - HP BPC D7000
benq         - Benq ED8
benq-t31     - Benq T31
hippo        - Hippo (ATI) with jack detection, Sony UX-90s
hippo_1      - Hippo (Benq) with jack detection
sony-assamd  - Sony ASSAMD
basic        - fixed pin assignment w/o SPDIF
auto         - auto-config reading BIOS (default)
$ less /etc/modprobe.d/sound
# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-hda-intel
options snd-hda-intel index=0 model=basic

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0

# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

К сожалению в ноутбуке по-умолчании не работает встроенный микрофон. Для включения микрофона я предлагаю следующий патч (проверено на alsa-1.0.18rc3):

--- patch_realtek.c.orig        2008-12-29 10:10:38.000000000 +0200
+++ patch_realtek.c     2009-01-29 09:44:04.000000000 +0200
@@ -104,6 +104,7 @@
        ALC262_NEC,
        ALC262_TOSHIBA_S06,
        ALC262_TOSHIBA_RX1,
+       ALC262_BENQ_P52,
        ALC262_AUTO,
        ALC262_MODEL_LAST /* last tag */
 };
@@ -9311,6 +9312,21 @@
        { } /* end */
 };
 
+static struct snd_kcontrol_new alc262_benq_p52_mixer[] = {
+       HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
+       HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
+       HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
+       HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
+       HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
+       { } /* end */
+};
+
 #define alc262_capture_mixer           alc882_capture_mixer
 #define alc262_capture_alt_mixer       alc882_capture_alt_mixer
 
@@ -10433,6 +10449,7 @@
        [ALC262_ULTRA]          = "ultra",
        [ALC262_LENOVO_3000]    = "lenovo-3000",
        [ALC262_NEC]            = "nec",
+       [ALC262_BENQ_P52]       = "benq-p52",
        [ALC262_AUTO]           = "auto",
 };
 
@@ -10476,7 +10493,7 @@
        SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000 y410", ALC262_LENOVO_3000),
        SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8),
        SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_BENQ_T31),
-       SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1),
+       SND_PCI_QUIRK(0x17ff, 0x058f, "Benq P52", ALC262_BENQ_P52),
        {}
 };
 
@@ -10623,6 +10640,19 @@
                .unsol_event = alc262_hippo_unsol_event,
                .init_hook = alc262_hippo_automute,
        },
+       [ALC262_BENQ_P52] = {
+               .mixers = { alc262_benq_p52_mixer },
+               .init_verbs = { alc262_init_verbs, alc262_benq_t31_EAPD_verbs, alc262_hippo_unsol_verbs },
+               .num_dacs = ARRAY_SIZE(alc262_dac_nids),
+               .dac_nids = alc262_dac_nids,
+               .hp_nid = 0x02,
+               .dig_out_nid = ALC262_DIGOUT_NID,
+               .num_channel_mode = ARRAY_SIZE(alc262_modes),
+               .channel_mode = alc262_modes,
+               .input_mux = &alc262_capture_source,
+               .unsol_event = alc262_hippo_unsol_event,
+               .init_hook = alc262_hippo_automute,
+       },
        [ALC262_ULTRA] = {
                .mixers = { alc262_ultra_mixer, alc262_ultra_capture_mixer },
                .init_verbs = { alc262_ultra_verbs },