Ignore:
Timestamp:
Jan 4, 2021, 10:15:17 AM (5 years ago)
Author:
Paul Smedley
Message:

Update source to linux 5.10.4 level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/alsa-kernel/pci/intel8x0m.c

    r615 r629  
    289289static unsigned int get_ich_codec_bit(struct intel8x0m *chip, unsigned int codec)
    290290{
    291         static unsigned int codec_bit[3] = {
     291        static const unsigned int codec_bit[3] = {
    292292                ICH_PCR, ICH_SCR, ICH_TCR
    293293        };
     
    554554}
    555555
    556 static int snd_intel8x0m_hw_params(struct snd_pcm_substream *substream,
    557                                   struct snd_pcm_hw_params *hw_params)
    558 {
    559         return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
    560 }
    561 
    562 static int snd_intel8x0m_hw_free(struct snd_pcm_substream *substream)
    563 {
    564         return snd_pcm_lib_free_pages(substream);
    565 }
    566 
    567556static snd_pcm_uframes_t snd_intel8x0m_pcm_pointer(struct snd_pcm_substream *substream)
    568557{
     
    674663        .open =         snd_intel8x0m_playback_open,
    675664        .close =        snd_intel8x0m_playback_close,
    676         .ioctl =        snd_pcm_lib_ioctl,
    677         .hw_params =    snd_intel8x0m_hw_params,
    678         .hw_free =      snd_intel8x0m_hw_free,
    679665        .prepare =      snd_intel8x0m_pcm_prepare,
    680666        .trigger =      snd_intel8x0m_pcm_trigger,
     
    685671        .open =         snd_intel8x0m_capture_open,
    686672        .close =        snd_intel8x0m_capture_close,
    687         .ioctl =        snd_pcm_lib_ioctl,
    688         .hw_params =    snd_intel8x0m_hw_params,
    689         .hw_free =      snd_intel8x0m_hw_free,
    690673        .prepare =      snd_intel8x0m_pcm_prepare,
    691674        .trigger =      snd_intel8x0m_pcm_trigger,
     
    704687
    705688static int snd_intel8x0m_pcm1(struct intel8x0m *chip, int device,
    706                               struct ich_pcm_table *rec)
     689                              const struct ich_pcm_table *rec)
    707690{
    708691        struct snd_pcm *pcm;
     
    734717        chip->pcm[device] = pcm;
    735718
    736         snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
    737                                               snd_dma_pci_data(chip->pci),
    738                                               rec->prealloc_size,
    739                                               rec->prealloc_max_size);
    740 
    741         return 0;
    742 }
    743 
    744 static struct ich_pcm_table intel_pcms[] = {
     719        snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
     720                                       &chip->pci->dev,
     721                                       rec->prealloc_size,
     722                                       rec->prealloc_max_size);
     723
     724        return 0;
     725}
     726
     727static const struct ich_pcm_table intel_pcms[] = {
    745728        {
    746729                .suffix = "Modem",
     
    755738{
    756739        int i, tblsize, device, err;
    757         struct ich_pcm_table *tbl, *rec;
     740        const struct ich_pcm_table *tbl, *rec;
    758741
    759742#if 1
     
    819802        int err;
    820803        unsigned int glob_sta = 0;
    821         static struct snd_ac97_bus_ops ops = {
     804        static const struct snd_ac97_bus_ops ops = {
    822805                .write = snd_intel8x0m_codec_write,
    823806                .read = snd_intel8x0m_codec_read,
     
    10171000                free_irq(chip->irq, chip);
    10181001                chip->irq = -1;
     1002                card->sync_irq = -1;
    10191003        }
    10201004        return 0;
     
    10351019        }
    10361020        chip->irq = pci->irq;
     1021        card->sync_irq = chip->irq;
    10371022        snd_intel8x0m_chip_init(chip, 0);
    10381023        snd_ac97_resume(chip->ac97);
     
    10951080        unsigned int int_sta_masks;
    10961081        struct ichdev *ichdev;
    1097         static struct snd_device_ops ops = {
     1082        static const struct snd_device_ops ops = {
    10981083                .dev_free =     snd_intel8x0m_dev_free,
    10991084        };
    1100         static struct ich_reg_info intel_regs[2] = {
     1085        static const struct ich_reg_info intel_regs[2] = {
    11011086                { ICH_MIINT, 0 },
    11021087                { ICH_MOINT, 0x10 },
    11031088        };
    1104         struct ich_reg_info *tbl;
     1089        const struct ich_reg_info *tbl;
    11051090
    11061091        *r_intel8x0m = NULL;
     
    11771162        /* allocate buffer descriptor lists */
    11781163        /* the start of each lists must be aligned to 8 bytes */
    1179         if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
     1164        if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
    11801165                                chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2,
    11811166                                &chip->bdbars) < 0) {
     
    12091194        }
    12101195        chip->irq = pci->irq;
     1196        card->sync_irq = chip->irq;
    12111197
    12121198        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
Note: See TracChangeset for help on using the changeset viewer.