18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci#ifndef __SOUND_PHASE_H
38c2ecf20Sopenharmony_ci#define __SOUND_PHASE_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci/*
68c2ecf20Sopenharmony_ci *   ALSA driver for ICEnsemble ICE1712 (Envy24)
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci *   Lowlevel functions for Terratec PHASE 22
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci *	Copyright (c) 2005 Misha Zhilin <misha@epiphan.com>
118c2ecf20Sopenharmony_ci */
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#define PHASE_DEVICE_DESC	"{Terratec,Phase 22},"\
148c2ecf20Sopenharmony_ci				"{Terratec,Phase 28},"\
158c2ecf20Sopenharmony_ci				"{Terrasoniq,TS22},"
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#define VT1724_SUBDEVICE_PHASE22	0x3b155011
188c2ecf20Sopenharmony_ci#define VT1724_SUBDEVICE_PHASE28	0x3b154911
198c2ecf20Sopenharmony_ci#define VT1724_SUBDEVICE_TS22		0x3b157b11
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci/* entry point */
228c2ecf20Sopenharmony_ciextern struct snd_ice1712_card_info snd_vt1724_phase_cards[];
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci/* PHASE28 GPIO bits */
258c2ecf20Sopenharmony_ci#define PHASE28_SPI_MISO	(1 << 21)
268c2ecf20Sopenharmony_ci#define PHASE28_WM_RESET	(1 << 20)
278c2ecf20Sopenharmony_ci#define PHASE28_SPI_CLK		(1 << 19)
288c2ecf20Sopenharmony_ci#define PHASE28_SPI_MOSI	(1 << 18)
298c2ecf20Sopenharmony_ci#define PHASE28_WM_RW		(1 << 17)
308c2ecf20Sopenharmony_ci#define PHASE28_AC97_RESET	(1 << 16)
318c2ecf20Sopenharmony_ci#define PHASE28_DIGITAL_SEL1	(1 << 15)
328c2ecf20Sopenharmony_ci#define PHASE28_HP_SEL		(1 << 14)
338c2ecf20Sopenharmony_ci#define PHASE28_WM_CS		(1 << 12)
348c2ecf20Sopenharmony_ci#define PHASE28_AC97_COMMIT	(1 << 11)
358c2ecf20Sopenharmony_ci#define PHASE28_AC97_ADDR	(1 << 10)
368c2ecf20Sopenharmony_ci#define PHASE28_AC97_DATA_LOW	(1 << 9)
378c2ecf20Sopenharmony_ci#define PHASE28_AC97_DATA_HIGH	(1 << 8)
388c2ecf20Sopenharmony_ci#define PHASE28_AC97_DATA_MASK	0xFF
398c2ecf20Sopenharmony_ci#endif /* __SOUND_PHASE */
40