Skip to content
Snippets Groups Projects
Select Git revision
  • 1c9d9dfd2d254211cb37b1513b1da3e6835b8f00
  • 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 323.15 KiB
    // SPDX-License-Identifier: GPL-2.0-or-later
    /*
     * 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>
     */
    
    #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 <linux/leds.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;
    	unsigned char port_connectivity;
    	unsigned char check_sum;
    	unsigned char customization;
    	unsigned char external_amp;
    	unsigned int  enable_pcbeep:1;
    	unsigned int  platform_type:1;
    	unsigned int  swap:1;
    	unsigned int  override:1;
    	unsigned int  fixup:1; /* Means that this sku is set by driver, not read from hw */
    };
    
    struct alc_coef_led {