18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Driver for Digigram pcxhr compatible soundcards 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * low level interface with interrupt ans message handling 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (c) 2004 by Digigram <alsa@digigram.com> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef __SOUND_PCXHR_MIX22_H 118c2ecf20Sopenharmony_ci#define __SOUND_PCXHR_MIX22_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cistruct pcxhr_mgr; 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciint hr222_sub_init(struct pcxhr_mgr *mgr); 168c2ecf20Sopenharmony_ciint hr222_sub_set_clock(struct pcxhr_mgr *mgr, unsigned int rate, 178c2ecf20Sopenharmony_ci int *changed); 188c2ecf20Sopenharmony_ciint hr222_get_external_clock(struct pcxhr_mgr *mgr, 198c2ecf20Sopenharmony_ci enum pcxhr_clock_type clock_type, 208c2ecf20Sopenharmony_ci int *sample_rate); 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ciint hr222_read_gpio(struct pcxhr_mgr *mgr, int is_gpi, int *value); 238c2ecf20Sopenharmony_ciint hr222_write_gpo(struct pcxhr_mgr *mgr, int value); 248c2ecf20Sopenharmony_ciint hr222_manage_timecode(struct pcxhr_mgr *mgr, int enable); 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define HR222_LINE_PLAYBACK_LEVEL_MIN 0 /* -25.5 dB */ 278c2ecf20Sopenharmony_ci#define HR222_LINE_PLAYBACK_ZERO_LEVEL 51 /* 0.0 dB */ 288c2ecf20Sopenharmony_ci#define HR222_LINE_PLAYBACK_LEVEL_MAX 99 /* +24.0 dB */ 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define HR222_LINE_CAPTURE_LEVEL_MIN 0 /* -111.5 dB */ 318c2ecf20Sopenharmony_ci#define HR222_LINE_CAPTURE_ZERO_LEVEL 223 /* 0.0 dB */ 328c2ecf20Sopenharmony_ci#define HR222_LINE_CAPTURE_LEVEL_MAX 255 /* +16 dB */ 338c2ecf20Sopenharmony_ci#define HR222_MICRO_CAPTURE_LEVEL_MIN 0 /* -98.5 dB */ 348c2ecf20Sopenharmony_ci#define HR222_MICRO_CAPTURE_LEVEL_MAX 210 /* +6.5 dB */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciint hr222_update_analog_audio_level(struct snd_pcxhr *chip, 378c2ecf20Sopenharmony_ci int is_capture, 388c2ecf20Sopenharmony_ci int channel); 398c2ecf20Sopenharmony_ciint hr222_set_audio_source(struct snd_pcxhr *chip); 408c2ecf20Sopenharmony_ciint hr222_iec958_capture_byte(struct snd_pcxhr *chip, int aes_idx, 418c2ecf20Sopenharmony_ci unsigned char *aes_bits); 428c2ecf20Sopenharmony_ciint hr222_iec958_update_byte(struct snd_pcxhr *chip, int aes_idx, 438c2ecf20Sopenharmony_ci unsigned char aes_bits); 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciint hr222_add_mic_controls(struct snd_pcxhr *chip); 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#endif /* __SOUND_PCXHR_MIX22_H */ 48