Skip to content
Snippets Groups Projects
Select Git revision
  • 35a39f98567d8d3f1cea48f0f30de1a7e736b644
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

patch_realtek.c

Blame
  • patch_realtek.c 262.69 KiB
    /*
     * Universal Interface for Intel High Definition Audio Codec
     *
     * HD audio interface patch for Realtek ALC codecs
     *
     * Copyright (c) 2004 Kailang Yang <kailang@realtek.com.tw>
     *                    PeiSen Hou <pshou@realtek.com.tw>
     *                    Takashi Iwai <tiwai@suse.de>
     *                    Jonathan Woithe <jwoithe@just42.net>
     *
     *  This driver is free software; you can redistribute it and/or modify
     *  it under the terms of the GNU General Public License as published by
     *  the Free Software Foundation; either version 2 of the License, or
     *  (at your option) any later version.
     *
     *  This driver is distributed in the hope that it will be useful,
     *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *  GNU General Public License for more details.
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
     *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
     */
    
    #include <linux/init.h>
    #include <linux/delay.h>
    #include <linux/slab.h>
    #include <linux/pci.h>
    #include <linux/dmi.h>
    #include <linux/module.h>
    #include <linux/input.h>
    #include <sound/core.h>
    #include <sound/jack.h>
    #include <sound/hda_codec.h>
    #include "hda_local.h"
    #include "hda_auto_parser.h"
    #include "hda_jack.h"
    #include "hda_generic.h"
    
    /* keep halting ALC5505 DSP, for power saving */
    #define HALT_REALTEK_ALC5505
    
    /* extra amp-initialization sequence types */
    enum {
    	ALC_INIT_UNDEFINED,
    	ALC_INIT_NONE,
    	ALC_INIT_DEFAULT,
    };
    
    enum {
    	ALC_HEADSET_MODE_UNKNOWN,
    	ALC_HEADSET_MODE_UNPLUGGED,
    	ALC_HEADSET_MODE_HEADSET,
    	ALC_HEADSET_MODE_MIC,
    	ALC_HEADSET_MODE_HEADPHONE,
    };
    
    enum {
    	ALC_HEADSET_TYPE_UNKNOWN,
    	ALC_HEADSET_TYPE_CTIA,
    	ALC_HEADSET_TYPE_OMTP,
    };
    
    enum {
    	ALC_KEY_MICMUTE_INDEX,
    };
    
    struct alc_customize_define {
    	unsigned int  sku_cfg;