Ignore:
Timestamp:
Mar 18, 2021, 8:57:36 PM (4 years ago)
Author:
David Azarewicz
Message:

Merge changes from Paul's uniaud32next branch.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/pci/ak4531_codec.c

    r426 r679  
     1// SPDX-License-Identifier: GPL-2.0-or-later
    12/*
    23 *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
    34 *  Universal routines for AK4531 codec
    4  *
    5  *
    6  *   This program is free software; you can redistribute it and/or modify
    7  *   it under the terms of the GNU General Public License as published by
    8  *   the Free Software Foundation; either version 2 of the License, or
    9  *   (at your option) any later version.
    10  *
    11  *   This program is distributed in the hope that it will be useful,
    12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  *   GNU General Public License for more details.
    15  *
    16  *   You should have received a copy of the GNU General Public License
    17  *   along with this program; if not, write to the Free Software
    18  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    19  *
    205 */
    216
     
    249#include <linux/slab.h>
    2510#include <linux/mutex.h>
     11#include <linux/module.h>
    2612
    2713#include <sound/core.h>
     
    3521*/
    3622
    37 #ifdef CONFIG_PROC_FS
    3823static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531);
    39 #else
    40 #define snd_ak4531_proc_init(card,ak)
    41 #endif
    4224
    4325/*
     
    274256static const DECLARE_TLV_DB_SCALE(db_scale_input, -5000, 200, 0);
    275257
    276 static struct snd_kcontrol_new snd_ak4531_controls[] __devinitdata = {
     258static const struct snd_kcontrol_new snd_ak4531_controls[] = {
    277259
    278260AK4531_DOUBLE_TLV("Master Playback Switch", 0,
     
    354336}
    355337
    356 static u8 snd_ak4531_initial_map[0x19 + 1] = {
     338static const u8 snd_ak4531_initial_map[0x19 + 1] = {
    357339        0x9f,           /* 00: Master Volume Lch */
    358340        0x9f,           /* 01: Master Volume Rch */
     
    383365};
    384366
    385 int __devinit snd_ak4531_mixer(struct snd_card *card,
    386                                struct snd_ak4531 *_ak4531,
    387                                struct snd_ak4531 **rak4531)
     367int snd_ak4531_mixer(struct snd_card *card,
     368                     struct snd_ak4531 *_ak4531,
     369                     struct snd_ak4531 **rak4531)
    388370{
    389371        unsigned int idx;
    390372        int err;
    391373        struct snd_ak4531 *ak4531;
    392         static struct snd_device_ops ops = {
     374        static const struct snd_device_ops ops = {
    393375                .dev_free =     snd_ak4531_dev_free,
    394376        };
     
    466448#endif
    467449
    468 #ifdef CONFIG_PROC_FS
    469450/*
    470451 * /proc interface
     
    483464}
    484465
    485 static void __devinit
     466static void
    486467snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531)
    487468{
    488         struct snd_info_entry *entry;
    489 
    490         if (! snd_card_proc_new(card, "ak4531", &entry))
    491                 snd_info_set_text_ops(entry, ak4531, snd_ak4531_proc_read);
    492 }
    493 #endif
     469        snd_card_ro_proc_new(card, "ak4531", ak4531, snd_ak4531_proc_read);
     470}
Note: See TracChangeset for help on using the changeset viewer.