Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Driver for Digigram pcxhr compatible soundcards
0004  *
0005  * low level interface with interrupt ans message handling
0006  *
0007  * Copyright (c) 2004 by Digigram <alsa@digigram.com>
0008  */
0009 
0010 #ifndef __SOUND_PCXHR_MIX22_H
0011 #define __SOUND_PCXHR_MIX22_H
0012 
0013 struct pcxhr_mgr;
0014 
0015 int hr222_sub_init(struct pcxhr_mgr *mgr);
0016 int hr222_sub_set_clock(struct pcxhr_mgr *mgr, unsigned int rate,
0017             int *changed);
0018 int hr222_get_external_clock(struct pcxhr_mgr *mgr,
0019                  enum pcxhr_clock_type clock_type,
0020                  int *sample_rate);
0021 
0022 int hr222_read_gpio(struct pcxhr_mgr *mgr, int is_gpi, int *value);
0023 int hr222_write_gpo(struct pcxhr_mgr *mgr, int value);
0024 int hr222_manage_timecode(struct pcxhr_mgr *mgr, int enable);
0025 
0026 #define HR222_LINE_PLAYBACK_LEVEL_MIN       0   /* -25.5 dB */
0027 #define HR222_LINE_PLAYBACK_ZERO_LEVEL      51  /* 0.0 dB */
0028 #define HR222_LINE_PLAYBACK_LEVEL_MAX       99  /* +24.0 dB */
0029 
0030 #define HR222_LINE_CAPTURE_LEVEL_MIN        0   /* -111.5 dB */
0031 #define HR222_LINE_CAPTURE_ZERO_LEVEL       223 /* 0.0 dB */
0032 #define HR222_LINE_CAPTURE_LEVEL_MAX        255 /* +16 dB */
0033 #define HR222_MICRO_CAPTURE_LEVEL_MIN       0   /* -98.5 dB */
0034 #define HR222_MICRO_CAPTURE_LEVEL_MAX       210 /* +6.5 dB */
0035 
0036 int hr222_update_analog_audio_level(struct snd_pcxhr *chip,
0037                     int is_capture,
0038                     int channel);
0039 int hr222_set_audio_source(struct snd_pcxhr *chip);
0040 int hr222_iec958_capture_byte(struct snd_pcxhr *chip, int aes_idx,
0041                   unsigned char *aes_bits);
0042 int hr222_iec958_update_byte(struct snd_pcxhr *chip, int aes_idx,
0043                  unsigned char aes_bits);
0044 
0045 int hr222_add_mic_controls(struct snd_pcxhr *chip);
0046 
0047 #endif /* __SOUND_PCXHR_MIX22_H */