Changeset 626


Ignore:
Timestamp:
Jan 3, 2021, 9:32:51 AM (5 years ago)
Author:
Paul Smedley
Message:

Add cirrus backend, some patches towards ca0132 and hdmi support

Location:
GPL/branches/uniaud32-next
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/Makefile

    r620 r626  
    1414FILES = hda_intel.obj hda_codec.obj hda_controller.obj hda_auto_parser.obj hda_jack.obj &
    1515  hda_proc.obj hda_generic.obj hda_hwdep.obj hda_sysfs.obj hda_bind.obj &
    16   patch_analog.obj patch_cmedia.obj patch_conexant.obj patch_ca0110.obj &
     16  patch_analog.obj patch_cmedia.obj patch_conexant.obj patch_ca0110.obj patch_cirrus.obj &
    1717  patch_realtek.obj patch_si3054.obj patch_sigmatel.obj patch_via.obj
    1818
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_ca0132.c

    r615 r626  
    2727
    2828#include "ca0132_regs.h"
     29
     30#ifdef TARGET_OS2
     31#define KBUILD_MODNAME "patch_ca0132"
     32#endif
    2933
    3034/* Enable this to see controls for tuning purpose. */
     
    10921096        { 0x13, 0x411111f0 }, /* N/A */
    10931097        { 0x18, 0x411111f0 }, /* N/A */
    1094         {}
     1098        {0}
    10951099};
    10961100
     
    11071111        { 0x13, 0x908700f0 }, /* What U Hear In*/
    11081112        { 0x18, 0x50d000f0 }, /* N/A */
    1109         {}
     1113        {0}
    11101114};
    11111115
     
    11221126        { 0x13, 0x908700f0 }, /* What U Hear In*/
    11231127        { 0x18, 0x50d000f0 }, /* N/A */
    1124         {}
     1128        {0}
    11251129};
    11261130
     
    11371141        { 0x13, 0x908700f0 }, /* What U Hear In*/
    11381142        { 0x18, 0x50d000f0 }, /* N/A */
    1139         {}
     1143        {0}
    11401144};
    11411145
     
    11521156        { 0x13, 0x908700f0 }, /* What U Hear In*/
    11531157        { 0x18, 0x50d000f0 }, /* N/A */
    1154         {}
     1158        {0}
    11551159};
    11561160
     
    11671171        { 0x13, 0x908700f0 }, /* What U Hear In*/
    11681172        { 0x18, 0x500000f0 }, /* N/A */
    1169         {}
     1173        {0}
    11701174};
    11711175
     
    11871191        SND_PCI_QUIRK(0x1102, 0x0051, "Sound Blaster AE-5", QUIRK_AE5),
    11881192        SND_PCI_QUIRK(0x1102, 0x0081, "Sound Blaster AE-7", QUIRK_AE7),
    1189         {}
     1193        {0}
    11901194};
    11911195
     
    27022706        u32 chip_addr;
    27032707        u32 count;
    2704         u32 data[0];
     2708        u32 data[1];
    27052709};
    27062710
     
    27252729static size_t dsp_sizeof(const struct dsp_image_seg *p)
    27262730{
     2731#ifndef TARGET_OS2
    27272732        return struct_size(p, data, p->count);
     2733#else
     2734        return sizeof(*p) + sizeof(int) + p->count;
     2735#endif
    27282736}
    27292737
     
    62956303                   SNDRV_CHMAP_FC, SNDRV_CHMAP_LFE,
    62966304                   SNDRV_CHMAP_RL, SNDRV_CHMAP_RR } },
    6297         { }
     6305        {0}
    62986306};
    62996307
     
    63046312        struct hda_pcm *pcm;
    63056313
    6306         list_for_each_entry(pcm, &codec->pcm_list_head, list) {
     6314        list_for_each_entry(pcm, &codec->pcm_list_head, list, struct hda_pcm) {
    63076315                struct hda_pcm_stream *hinfo =
    63086316                        &pcm->stream[SNDRV_PCM_STREAM_PLAYBACK];
     
    63446352        CA0132_CODEC_MUTE_MONO("AMic1/DMic Auto Detect Capture Switch",
    63456353                               VNID_AMIC1_ASEL, 1, HDA_INPUT),
    6346         { } /* end */
     6354        {0} /* end */
    63476355};
    63486356
     
    63676375        CA0132_CODEC_MUTE_MONO("HP/Speaker Auto Detect Playback Switch",
    63686376                                VNID_HP_ASEL, 1, HDA_OUTPUT),
    6369         { } /* end */
     6377        {0} /* end */
    63706378};
    63716379
     
    63896397        CA0132_CODEC_MUTE_MONO("HP/Speaker Auto Detect Playback Switch",
    63906398                                VNID_HP_ASEL, 1, HDA_OUTPUT),
    6391         { } /* end */
     6399        {0} /* end */
    63926400};
    63936401
     
    76757683        /*enable ct extension*/
    76767684        {0x15, VENDOR_CHIPIO_CT_EXTENSIONS_ENABLE, 0x1},
    7677         {}
     7685        {0}
    76787686};
    76797687
     
    76847692        /*disable ct extension*/
    76857693        {0x15, VENDOR_CHIPIO_CT_EXTENSIONS_ENABLE, 0},
    7686         {}
     7694        {0}
    76877695};
    76887696
     
    77187726        {0x15, 0x53B, 0xCE},
    77197727        {0x15, 0x5E8, 0xC9},
    7720         {}
     7728        {0}
    77217729};
    77227730
     
    77397747        {0x15, 0x707, 0x14},
    77407748        {0x15, 0x6FF, 0xC4},
    7741         {}
     7749        {0}
    77427750};
    77437751
     
    89018909static struct hda_device_id snd_hda_id_ca0132[] = {
    89028910        HDA_CODEC_ENTRY(0x11020011, "CA0132", patch_ca0132),
    8903         {} /* terminator */
     8911        {0} /* terminator */
    89048912};
    89058913MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_ca0132);
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_cirrus.c

    r615 r626  
    1616#include "hda_jack.h"
    1717#include "hda_generic.h"
     18
     19#ifdef TARGET_OS2
     20#define KBUILD_MODNAME "patch_cirrus"
     21#endif
    1822
    1923/*
     
    216220        {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */
    217221
    218         {} /* terminator */
     222        {0} /* terminator */
    219223};
    220224
     
    226230        {0x24, AC_VERB_SET_COEF_INDEX, 0x0034},
    227231        {0x24, AC_VERB_SET_PROC_COEF, 0x1C01}, /* A1 Enable, A Thresh = 300mV */
    228         {} /* terminator */
     232        {0} /* terminator */
    229233};
    230234
     
    275279#endif
    276280
    277         {} /* terminator */
     281        {0} /* terminator */
    278282};
    279283
     
    384388        { .id = CS420X_MBP81, .name = "mbp81" },
    385389        { .id = CS420X_MBA42, .name = "mba42" },
    386         {}
     390        {0}
    387391};
    388392
     
    403407        SND_PCI_QUIRK(0x106b, 0x5b00, "MacBookAir 4,2", CS420X_MBA42),
    404408        SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE),
    405         {} /* terminator */
     409        {0} /* terminator */
    406410};
    407411
     
    417421        { 0x12, 0x400000f0 },
    418422        { 0x15, 0x400000f0 },
    419         {} /* terminator */
     423        {0} /* terminator */
    420424};
    421425
     
    431435        { 0x12, 0x400000f0 },
    432436        { 0x15, 0x400000f0 },
    433         {} /* terminator */
     437        {0} /* terminator */
    434438};
    435439
     
    445449        { 0x12, 0x01ab9070 },
    446450        { 0x15, 0x400000f0 },
    447         {} /* terminator */
     451        {0} /* terminator */
    448452};
    449453
     
    452456        { 0x0e, 0x90a600f0 },
    453457        { 0x12, 0x50a600f0 },
    454         {} /* terminator */
     458        {0} /* terminator */
    455459};
    456460
     
    466470        { 0x12, 0x400000f0 },
    467471        { 0x15, 0x400000f0 },
    468         {} /* terminator */
     472        {0} /* terminator */
    469473};
    470474
     
    489493        { 0x21, 0x430000f0 },
    490494        { 0x22, 0x430000f0 },
    491         {} /* terminator */
     495        {0} /* terminator */
    492496};
    493497
     
    549553                .chain_id = CS420X_GPIO_13,
    550554        },
     555#ifdef TARGET_OS2xxx
    551556        [CS420X_MBP81] = {
    552557                .type = HDA_FIXUP_VERBS,
     
    555560                        {0x11, AC_VERB_SET_COEF_INDEX, IDX_ADC_CFG},
    556561                        {0x11, AC_VERB_SET_PROC_COEF, 0x102a},
    557                         {}
     562                        {0}
    558563                },
    559564                .chained = true,
    560565                .chain_id = CS420X_GPIO_13,
    561566        },
     567#endif
    562568        [CS420X_MBA42] = {
    563569                .type = HDA_FIXUP_PINS,
     
    630636        { .id = CS4208_MBP11, .name = "mbp11" },
    631637        { .id = CS4208_MACMINI, .name = "macmini" },
    632         {}
     638        {0}
    633639};
    634640
    635641static const struct snd_pci_quirk cs4208_fixup_tbl[] = {
    636642        SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS4208_MAC_AUTO),
    637         {} /* terminator */
     643        {0} /* terminator */
    638644};
    639645
     
    645651        SND_PCI_QUIRK(0x106b, 0x7200, "MacBookAir 6,2", CS4208_MBA6),
    646652        SND_PCI_QUIRK(0x106b, 0x7b00, "MacBookPro 12,1", CS4208_MBP11),
    647         {} /* terminator */
     653        {0} /* terminator */
    648654};
    649655
     
    683689                { 0x18, 0x00ab9150 }, /* mic (audio-in) jack: disable detect */
    684690                { 0x21, 0x004be140 }, /* SPDIF: disable detect */
    685                 { }
     691                {0}
    686692        };
    687693
     
    813819        { .id = CS421X_CDB4210, .name = "cdb4210" },
    814820        { .id = CS421X_STUMPY, .name = "stumpy" },
    815         {}
     821        {0}
    816822};
    817823
     
    819825        /* Test Intel board + CDB2410  */
    820826        SND_PCI_QUIRK(0x8086, 0x5001, "DP45SG/CDB4210", CS421X_CDB4210),
    821         {} /* terminator */
     827        {0} /* terminator */
    822828};
    823829
     
    831837        { 0x09, 0xb7a6003e },
    832838        { 0x0a, 0x034510f0 },
    833         {} /* terminator */
     839        {0} /* terminator */
    834840};
    835841
     
    842848        { 0x09, 0x77a6003e },
    843849        { 0x0a, 0x434510f0 },
    844         {} /* terminator */
     850        {0} /* terminator */
    845851};
    846852
     
    890896          | 0x0008 /* Enable DAC High Pass Filter */
    891897          )},
    892         {} /* terminator */
     898        {0} /* terminator */
    893899};
    894900
     
    926932        {0x0B, AC_VERB_SET_PROC_COEF, 0X1006}, /* Remove noise */
    927933
    928         {} /* terminator */
     934        {0} /* terminator */
    929935};
    930936
     
    12301236        HDA_CODEC_ENTRY(0x10134210, "CS4210", patch_cs4210),
    12311237        HDA_CODEC_ENTRY(0x10134213, "CS4213", patch_cs4213),
    1232         {} /* terminator */
     1238        {0} /* terminator */
    12331239};
    12341240MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_cirrus);
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_hdmi.c

    r615 r626  
    2323#include <linux/module.h>
    2424#include <linux/pm_runtime.h>
     25#ifdef TARGET_OS2
     26#include <linux/mod_devicetable.h>
     27#endif
    2528#include <sound/core.h>
    2629#include <sound/jack.h>
     
    3841module_param(static_hdmi_pcm, bool, 0644);
    3942MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
     43
     44#ifdef TARGET_OS2
     45#define KBUILD_MODNAME "patch_hdmi"
     46#endif
    4047
    4148#define is_haswell(codec)  ((codec)->core.vendor_id == 0x80862807)
     
    226233        struct hdmi_audio_infoframe hdmi;
    227234        struct dp_audio_infoframe dp;
    228         u8 bytes[0];
     235        u8 bytes[1];
    229236};
    230237
     
    18211828        SND_PCI_QUIRK(0x103c, 0x870f, "HP", 1),
    18221829        SND_PCI_QUIRK(0x103c, 0x871a, "HP", 1),
    1823         {}
     1830        {0}
    18241831};
    18251832
     
    30583065        /* enable digital output on pin widget */
    30593066        { 0x5, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | 0x5 },
    3060         {0] /* terminator */
     3067        {0} /* terminator */
    30613068};
    30623069
  • GPL/branches/uniaud32-next/lib32/initcall.h

    r620 r626  
    123123extern_module_init(ca0110_driver_init)
    124124extern_module_exit(ca0110_driver_exit)
     125extern_module_init(cirrus_driver_init)
     126extern_module_exit(cirrus_driver_exit)
    125127extern_module_init(conexant_driver_init)
    126128extern_module_exit(conexant_driver_exit)
     129extern_module_init(hdmi_driver_init)
     130extern_module_exit(hdmi_driver_exit)
    127131extern_module_init(realtek_driver_init)
    128132extern_module_exit(realtek_driver_exit)
  • GPL/branches/uniaud32-next/lib32/ossidc.c

    r620 r626  
    134134        call_module_init(generic_driver_init);
    135135        call_module_init(analog_driver_init);
    136         //call_module_init(atihdmi_driver_init);
    137136        call_module_init(ca0110_driver_init);
     137        call_module_init(cirrus_driver_init);
    138138        call_module_init(cmedia_driver_init);
    139139        call_module_init(conexant_driver_init);
     140//      call_module_init(hdmi_driver_init);
    140141        call_module_init(realtek_driver_init);
    141142        call_module_init(sigmatel_driver_init);
Note: See TracChangeset for help on using the changeset viewer.