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/include/sound/ak4114.h

    r598 r679  
     1/* SPDX-License-Identifier: GPL-2.0-or-later */
    12#ifndef __SOUND_AK4114_H
    23#define __SOUND_AK4114_H
     
    56 *  Routines for Asahi Kasei AK4114
    67 *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
    7  *
    8  *
    9  *   This program is free software; you can redistribute it and/or modify
    10  *   it under the terms of the GNU General Public License as published by
    11  *   the Free Software Foundation; either version 2 of the License, or
    12  *   (at your option) any later version.
    13  *
    14  *   This program is distributed in the hope that it will be useful,
    15  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    16  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    17  *   GNU General Public License for more details.
    18  *
    19  *   You should have received a copy of the GNU General Public License
    20  *   along with this program; if not, write to the Free Software
    21  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    22  *
    238 */
    249
     
    164149typedef unsigned char (ak4114_read_t)(void *private_data, unsigned char addr);
    165150
     151enum {
     152        AK4114_PARITY_ERRORS,
     153        AK4114_V_BIT_ERRORS,
     154        AK4114_QCRC_ERRORS,
     155        AK4114_CCRC_ERRORS,
     156        AK4114_NUM_ERRORS
     157};
     158
    166159struct ak4114 {
    167160        struct snd_card *card;
     
    169162        ak4114_read_t * read;
    170163        void * private_data;
    171         unsigned int init: 1;
     164        atomic_t wq_processing;
     165        struct mutex reinit_mutex;
    172166        spinlock_t lock;
    173         unsigned char regmap[7];
     167        unsigned char regmap[6];
    174168        unsigned char txcsb[5];
    175169        struct snd_kcontrol *kctls[AK4114_CONTROLS];
    176170        struct snd_pcm_substream *playback_substream;
    177171        struct snd_pcm_substream *capture_substream;
    178         unsigned long parity_errors;
    179         unsigned long v_bit_errors;
    180         unsigned long qcrc_errors;
    181         unsigned long ccrc_errors;
     172        unsigned long errors[AK4114_NUM_ERRORS];
    182173        unsigned char rcs0;
    183174        unsigned char rcs1;
     
    190181int snd_ak4114_create(struct snd_card *card,
    191182                      ak4114_read_t *read, ak4114_write_t *write,
    192                       const unsigned char pgm[7], const unsigned char txcsb[5],
     183                      const unsigned char pgm[6], const unsigned char txcsb[5],
    193184                      void *private_data, struct ak4114 **r_ak4114);
    194185void snd_ak4114_reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char mask, unsigned char val);
     
    200191int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags);
    201192
     193#ifdef CONFIG_PM
     194void snd_ak4114_suspend(struct ak4114 *chip);
     195void snd_ak4114_resume(struct ak4114 *chip);
     196#else
     197static inline void snd_ak4114_suspend(struct ak4114 *chip) {}
     198static inline void snd_ak4114_resume(struct ak4114 *chip) {}
     199#endif
     200
    202201#endif /* __SOUND_AK4114_H */
    203202
Note: See TracChangeset for help on using the changeset viewer.