Symbol: emu
drivers/crypto/cavium/nitrox/nitrox_csr.h
854
u64 emu : 4;
drivers/crypto/cavium/nitrox/nitrox_csr.h
884
u64 emu : 4;
drivers/input/gameport/emu10k1-gp.c
42
struct emu *emu;
drivers/input/gameport/emu10k1-gp.c
46
emu = kzalloc_obj(*emu);
drivers/input/gameport/emu10k1-gp.c
48
if (!emu || !port) {
drivers/input/gameport/emu10k1-gp.c
58
emu->io = pci_resource_start(pdev, 0);
drivers/input/gameport/emu10k1-gp.c
59
emu->size = pci_resource_len(pdev, 0);
drivers/input/gameport/emu10k1-gp.c
61
emu->dev = pdev;
drivers/input/gameport/emu10k1-gp.c
62
emu->gameport = port;
drivers/input/gameport/emu10k1-gp.c
67
port->io = emu->io;
drivers/input/gameport/emu10k1-gp.c
69
if (!request_region(emu->io, emu->size, "emu10k1-gp")) {
drivers/input/gameport/emu10k1-gp.c
71
emu->io, emu->io + emu->size - 1);
drivers/input/gameport/emu10k1-gp.c
76
pci_set_drvdata(pdev, emu);
drivers/input/gameport/emu10k1-gp.c
86
kfree(emu);
drivers/input/gameport/emu10k1-gp.c
92
struct emu *emu = pci_get_drvdata(pdev);
drivers/input/gameport/emu10k1-gp.c
94
gameport_unregister_port(emu->gameport);
drivers/input/gameport/emu10k1-gp.c
95
release_region(emu->io, emu->size);
drivers/input/gameport/emu10k1-gp.c
96
kfree(emu);
drivers/input/serio/hil_mlc.c
831
goto emu;
drivers/input/serio/hil_mlc.c
834
goto emu;
drivers/input/serio/hil_mlc.c
837
goto emu;
drivers/input/serio/hil_mlc.c
840
goto emu;
drivers/input/serio/hil_mlc.c
850
emu:
include/sound/emu10k1.h
1489
void (*interrupt)(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice);
include/sound/emu10k1.h
1503
struct snd_emu10k1 *emu;
include/sound/emu10k1.h
1573
typedef void (snd_fx8010_irq_handler_t)(struct snd_emu10k1 *emu, void *private_data);
include/sound/emu10k1.h
1619
struct snd_emu10k1 *emu;
include/sound/emu10k1.h
1630
void (*interrupt)(struct snd_emu10k1 *emu, unsigned int status);
include/sound/emu10k1.h
1750
int (*get_synth_voice)(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1773
void (*hwvol_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
include/sound/emu10k1.h
1774
void (*capture_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
include/sound/emu10k1.h
1775
void (*capture_mic_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
include/sound/emu10k1.h
1776
void (*capture_efx_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
include/sound/emu10k1.h
1777
void (*spdif_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
include/sound/emu10k1.h
1778
void (*dsp_interrupt)(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1779
void (*gpio_interrupt)(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1780
void (*p16v_interrupt)(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1818
int snd_emu10k1_pcm(struct snd_emu10k1 *emu, int device);
include/sound/emu10k1.h
1819
int snd_emu10k1_pcm_mic(struct snd_emu10k1 *emu, int device);
include/sound/emu10k1.h
1820
int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device);
include/sound/emu10k1.h
1821
int snd_p16v_pcm(struct snd_emu10k1 *emu, int device);
include/sound/emu10k1.h
1822
int snd_p16v_mixer(struct snd_emu10k1 * emu);
include/sound/emu10k1.h
1823
int snd_emu10k1_pcm_multi(struct snd_emu10k1 *emu, int device);
include/sound/emu10k1.h
1824
int snd_emu10k1_fx8010_pcm(struct snd_emu10k1 *emu, int device);
include/sound/emu10k1.h
1825
int snd_emu10k1_mixer(struct snd_emu10k1 * emu, int pcm_device, int multi_device);
include/sound/emu10k1.h
1826
int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device);
include/sound/emu10k1.h
1827
int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device);
include/sound/emu10k1.h
1831
void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice);
include/sound/emu10k1.h
1832
int snd_emu10k1_init_efx(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1833
void snd_emu10k1_free_efx(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1834
int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size);
include/sound/emu10k1.h
1835
int snd_emu10k1_done(struct snd_emu10k1 * emu);
include/sound/emu10k1.h
1838
unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
include/sound/emu10k1.h
1839
void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
include/sound/emu10k1.h
1840
void snd_emu10k1_ptr_write_multiple(struct snd_emu10k1 *emu, unsigned int chn, ...);
include/sound/emu10k1.h
1841
unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
include/sound/emu10k1.h
1842
void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
include/sound/emu10k1.h
1843
int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
include/sound/emu10k1.h
1844
int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
include/sound/emu10k1.h
1846
void snd_emu1010_fpga_write_lock(struct snd_emu10k1 *emu, u32 reg, u32 value);
include/sound/emu10k1.h
1847
void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
include/sound/emu10k1.h
1848
void snd_emu1010_fpga_read(struct snd_emu10k1 *emu, u32 reg, u32 *value);
include/sound/emu10k1.h
1849
void snd_emu1010_fpga_link_dst_src_write(struct snd_emu10k1 *emu, u32 dst, u32 src);
include/sound/emu10k1.h
1850
u32 snd_emu1010_fpga_link_dst_src_read(struct snd_emu10k1 *emu, u32 dst);
include/sound/emu10k1.h
1851
int snd_emu1010_get_raw_rate(struct snd_emu10k1 *emu, u8 src);
include/sound/emu10k1.h
1852
void snd_emu1010_update_clock(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1853
void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu, int dock, const struct firmware *fw_entry);
include/sound/emu10k1.h
1854
unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc);
include/sound/emu10k1.h
1855
void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb);
include/sound/emu10k1.h
1856
void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb);
include/sound/emu10k1.h
1857
void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum);
include/sound/emu10k1.h
1858
void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum);
include/sound/emu10k1.h
1859
void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum);
include/sound/emu10k1.h
1860
void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum);
include/sound/emu10k1.h
1861
void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum);
include/sound/emu10k1.h
1862
void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum);
include/sound/emu10k1.h
1864
void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum);
include/sound/emu10k1.h
1865
void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum);
include/sound/emu10k1.h
1867
void snd_emu10k1_voice_set_loop_stop_multiple(struct snd_emu10k1 *emu, u64 voices);
include/sound/emu10k1.h
1868
void snd_emu10k1_voice_clear_loop_stop_multiple(struct snd_emu10k1 *emu, u64 voices);
include/sound/emu10k1.h
1869
int snd_emu10k1_voice_clear_loop_stop_multiple_atomic(struct snd_emu10k1 *emu, u64 voices);
include/sound/emu10k1.h
1870
void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait);
include/sound/emu10k1.h
1871
static inline unsigned int snd_emu10k1_wc(struct snd_emu10k1 *emu) { return (inl(emu->port + WC) >> 6) & 0xfffff; }
include/sound/emu10k1.h
1876
void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1877
void snd_emu10k1_resume_init(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1878
void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1879
int snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1880
void snd_emu10k1_efx_free_pm_buffer(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1881
void snd_emu10k1_efx_suspend(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1882
void snd_emu10k1_efx_resume(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1883
int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1884
void snd_p16v_free_pm_buffer(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1885
void snd_p16v_suspend(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1886
void snd_p16v_resume(struct snd_emu10k1 *emu);
include/sound/emu10k1.h
1890
struct snd_util_memblk *snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream);
include/sound/emu10k1.h
1891
int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);
include/sound/emu10k1.h
1892
int snd_emu10k1_alloc_pages_maybe_wider(struct snd_emu10k1 *emu, size_t size,
include/sound/emu10k1.h
1894
struct snd_util_memblk *snd_emu10k1_synth_alloc(struct snd_emu10k1 *emu, unsigned int size);
include/sound/emu10k1.h
1895
int snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);
include/sound/emu10k1.h
1896
int snd_emu10k1_synth_memset(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, int size, u8 value);
include/sound/emu10k1.h
1897
int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, const char __user *data, int size, u32 xor);
include/sound/emu10k1.h
1898
int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk);
include/sound/emu10k1.h
1901
int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int count, int channels,
include/sound/emu10k1.h
1903
int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice);
include/sound/emu10k1.h
1906
int snd_emu10k1_midi(struct snd_emu10k1 * emu);
include/sound/emu10k1.h
1907
int snd_emu10k1_audigy_midi(struct snd_emu10k1 * emu);
include/sound/emu10k1.h
1910
int snd_emu10k1_proc_init(struct snd_emu10k1 * emu);
include/sound/emu10k1.h
1913
int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu,
include/sound/emu10k1.h
1918
int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu,
include/sound/emu8000.h
100
void snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu);
include/sound/emu8000.h
101
void snd_emu8000_update_equalizer(struct snd_emu8000 *emu);
include/sound/emu8000.h
102
int snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
include/sound/emu8000.h
103
int snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
include/sound/emu8000.h
48
struct snd_emux *emu;
include/sound/emu8000.h
87
void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
include/sound/emu8000.h
89
unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port,
include/sound/emu8000.h
91
void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
include/sound/emu8000.h
93
unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port,
include/sound/emu8000.h
95
void snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode);
include/sound/emu8000.h
97
void snd_emu8000_init_fm(struct snd_emu8000 *emu);
include/sound/emu8000.h
99
void snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu);
include/sound/emu8000_reg.h
100
#define EMU8000_FMMOD_READ(emu, chan) \
include/sound/emu8000_reg.h
101
snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(3, (chan)))
include/sound/emu8000_reg.h
102
#define EMU8000_TREMFRQ_READ(emu, chan) \
include/sound/emu8000_reg.h
103
snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(4, (chan)))
include/sound/emu8000_reg.h
104
#define EMU8000_FM2FRQ2_READ(emu, chan) \
include/sound/emu8000_reg.h
105
snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(5, (chan)))
include/sound/emu8000_reg.h
108
#define EMU8000_CPF_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
109
snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(0, (chan)), (val))
include/sound/emu8000_reg.h
110
#define EMU8000_PTRX_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
111
snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(1, (chan)), (val))
include/sound/emu8000_reg.h
112
#define EMU8000_CVCF_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
113
snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(2, (chan)), (val))
include/sound/emu8000_reg.h
114
#define EMU8000_VTFT_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
115
snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(3, (chan)), (val))
include/sound/emu8000_reg.h
116
#define EMU8000_PSST_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
117
snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(6, (chan)), (val))
include/sound/emu8000_reg.h
118
#define EMU8000_CSL_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
119
snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(7, (chan)), (val))
include/sound/emu8000_reg.h
120
#define EMU8000_CCCA_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
121
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(0, (chan)), (val))
include/sound/emu8000_reg.h
122
#define EMU8000_HWCF4_WRITE(emu, val) \
include/sound/emu8000_reg.h
123
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 9), (val))
include/sound/emu8000_reg.h
124
#define EMU8000_HWCF5_WRITE(emu, val) \
include/sound/emu8000_reg.h
125
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 10), (val))
include/sound/emu8000_reg.h
126
#define EMU8000_HWCF6_WRITE(emu, val) \
include/sound/emu8000_reg.h
127
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 13), (val))
include/sound/emu8000_reg.h
129
#define EMU8000_HWCF7_WRITE(emu, val) \
include/sound/emu8000_reg.h
130
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 14), (val))
include/sound/emu8000_reg.h
131
#define EMU8000_SMALR_WRITE(emu, val) \
include/sound/emu8000_reg.h
132
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 20), (val))
include/sound/emu8000_reg.h
133
#define EMU8000_SMARR_WRITE(emu, val) \
include/sound/emu8000_reg.h
134
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 21), (val))
include/sound/emu8000_reg.h
135
#define EMU8000_SMALW_WRITE(emu, val) \
include/sound/emu8000_reg.h
136
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 22), (val))
include/sound/emu8000_reg.h
137
#define EMU8000_SMARW_WRITE(emu, val) \
include/sound/emu8000_reg.h
138
snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 23), (val))
include/sound/emu8000_reg.h
139
#define EMU8000_SMLD_WRITE(emu, val) \
include/sound/emu8000_reg.h
140
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 26), (val))
include/sound/emu8000_reg.h
141
#define EMU8000_SMRD_WRITE(emu, val) \
include/sound/emu8000_reg.h
142
snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(1, 26), (val))
include/sound/emu8000_reg.h
143
#define EMU8000_WC_WRITE(emu, val) \
include/sound/emu8000_reg.h
144
snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(1, 27), (val))
include/sound/emu8000_reg.h
145
#define EMU8000_HWCF1_WRITE(emu, val) \
include/sound/emu8000_reg.h
146
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 29), (val))
include/sound/emu8000_reg.h
147
#define EMU8000_HWCF2_WRITE(emu, val) \
include/sound/emu8000_reg.h
148
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 30), (val))
include/sound/emu8000_reg.h
149
#define EMU8000_HWCF3_WRITE(emu, val) \
include/sound/emu8000_reg.h
150
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 31), (val))
include/sound/emu8000_reg.h
151
#define EMU8000_INIT1_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
152
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(2, (chan)), (val))
include/sound/emu8000_reg.h
153
#define EMU8000_INIT2_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
154
snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(2, (chan)), (val))
include/sound/emu8000_reg.h
155
#define EMU8000_INIT3_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
156
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(3, (chan)), (val))
include/sound/emu8000_reg.h
157
#define EMU8000_INIT4_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
158
snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(3, (chan)), (val))
include/sound/emu8000_reg.h
159
#define EMU8000_ENVVOL_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
160
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(4, (chan)), (val))
include/sound/emu8000_reg.h
161
#define EMU8000_DCYSUSV_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
162
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(5, (chan)), (val))
include/sound/emu8000_reg.h
163
#define EMU8000_ENVVAL_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
164
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(6, (chan)), (val))
include/sound/emu8000_reg.h
165
#define EMU8000_DCYSUS_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
166
snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(7, (chan)), (val))
include/sound/emu8000_reg.h
167
#define EMU8000_ATKHLDV_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
168
snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(4, (chan)), (val))
include/sound/emu8000_reg.h
169
#define EMU8000_LFO1VAL_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
170
snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(5, (chan)), (val))
include/sound/emu8000_reg.h
171
#define EMU8000_ATKHLD_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
172
snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(6, (chan)), (val))
include/sound/emu8000_reg.h
173
#define EMU8000_LFO2VAL_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
174
snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(7, (chan)), (val))
include/sound/emu8000_reg.h
175
#define EMU8000_IP_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
176
snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(0, (chan)), (val))
include/sound/emu8000_reg.h
177
#define EMU8000_IFATN_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
178
snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(1, (chan)), (val))
include/sound/emu8000_reg.h
179
#define EMU8000_PEFE_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
180
snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(2, (chan)), (val))
include/sound/emu8000_reg.h
181
#define EMU8000_FMMOD_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
182
snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(3, (chan)), (val))
include/sound/emu8000_reg.h
183
#define EMU8000_TREMFRQ_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
184
snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(4, (chan)), (val))
include/sound/emu8000_reg.h
185
#define EMU8000_FM2FRQ2_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
186
snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(5, (chan)), (val))
include/sound/emu8000_reg.h
188
#define EMU8000_0080_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
189
snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(4, (chan)), (val))
include/sound/emu8000_reg.h
190
#define EMU8000_00A0_WRITE(emu, chan, val) \
include/sound/emu8000_reg.h
191
snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(5, (chan)), (val))
include/sound/emu8000_reg.h
30
#define EMU8000_CPF_READ(emu, chan) \
include/sound/emu8000_reg.h
31
snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(0, (chan)))
include/sound/emu8000_reg.h
32
#define EMU8000_PTRX_READ(emu, chan) \
include/sound/emu8000_reg.h
33
snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(1, (chan)))
include/sound/emu8000_reg.h
34
#define EMU8000_CVCF_READ(emu, chan) \
include/sound/emu8000_reg.h
35
snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(2, (chan)))
include/sound/emu8000_reg.h
36
#define EMU8000_VTFT_READ(emu, chan) \
include/sound/emu8000_reg.h
37
snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(3, (chan)))
include/sound/emu8000_reg.h
38
#define EMU8000_PSST_READ(emu, chan) \
include/sound/emu8000_reg.h
39
snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(6, (chan)))
include/sound/emu8000_reg.h
40
#define EMU8000_CSL_READ(emu, chan) \
include/sound/emu8000_reg.h
41
snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(7, (chan)))
include/sound/emu8000_reg.h
42
#define EMU8000_CCCA_READ(emu, chan) \
include/sound/emu8000_reg.h
43
snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(0, (chan)))
include/sound/emu8000_reg.h
44
#define EMU8000_HWCF4_READ(emu) \
include/sound/emu8000_reg.h
45
snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 9))
include/sound/emu8000_reg.h
46
#define EMU8000_HWCF5_READ(emu) \
include/sound/emu8000_reg.h
47
snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 10))
include/sound/emu8000_reg.h
48
#define EMU8000_HWCF6_READ(emu) \
include/sound/emu8000_reg.h
49
snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 13))
include/sound/emu8000_reg.h
50
#define EMU8000_SMALR_READ(emu) \
include/sound/emu8000_reg.h
51
snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 20))
include/sound/emu8000_reg.h
52
#define EMU8000_SMARR_READ(emu) \
include/sound/emu8000_reg.h
53
snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 21))
include/sound/emu8000_reg.h
54
#define EMU8000_SMALW_READ(emu) \
include/sound/emu8000_reg.h
55
snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 22))
include/sound/emu8000_reg.h
56
#define EMU8000_SMARW_READ(emu) \
include/sound/emu8000_reg.h
57
snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 23))
include/sound/emu8000_reg.h
58
#define EMU8000_SMLD_READ(emu) \
include/sound/emu8000_reg.h
59
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 26))
include/sound/emu8000_reg.h
60
#define EMU8000_SMRD_READ(emu) \
include/sound/emu8000_reg.h
61
snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(1, 26))
include/sound/emu8000_reg.h
62
#define EMU8000_WC_READ(emu) \
include/sound/emu8000_reg.h
63
snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(1, 27))
include/sound/emu8000_reg.h
64
#define EMU8000_HWCF1_READ(emu) \
include/sound/emu8000_reg.h
65
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 29))
include/sound/emu8000_reg.h
66
#define EMU8000_HWCF2_READ(emu) \
include/sound/emu8000_reg.h
67
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 30))
include/sound/emu8000_reg.h
68
#define EMU8000_HWCF3_READ(emu) \
include/sound/emu8000_reg.h
69
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(1, 31))
include/sound/emu8000_reg.h
70
#define EMU8000_INIT1_READ(emu, chan) \
include/sound/emu8000_reg.h
71
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(2, (chan)))
include/sound/emu8000_reg.h
72
#define EMU8000_INIT2_READ(emu, chan) \
include/sound/emu8000_reg.h
73
snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(2, (chan)))
include/sound/emu8000_reg.h
74
#define EMU8000_INIT3_READ(emu, chan) \
include/sound/emu8000_reg.h
75
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(3, (chan)))
include/sound/emu8000_reg.h
76
#define EMU8000_INIT4_READ(emu, chan) \
include/sound/emu8000_reg.h
77
snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(3, (chan)))
include/sound/emu8000_reg.h
78
#define EMU8000_ENVVOL_READ(emu, chan) \
include/sound/emu8000_reg.h
79
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(4, (chan)))
include/sound/emu8000_reg.h
80
#define EMU8000_DCYSUSV_READ(emu, chan) \
include/sound/emu8000_reg.h
81
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(5, (chan)))
include/sound/emu8000_reg.h
82
#define EMU8000_ENVVAL_READ(emu, chan) \
include/sound/emu8000_reg.h
83
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(6, (chan)))
include/sound/emu8000_reg.h
84
#define EMU8000_DCYSUS_READ(emu, chan) \
include/sound/emu8000_reg.h
85
snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(7, (chan)))
include/sound/emu8000_reg.h
86
#define EMU8000_ATKHLDV_READ(emu, chan) \
include/sound/emu8000_reg.h
87
snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(4, (chan)))
include/sound/emu8000_reg.h
88
#define EMU8000_LFO1VAL_READ(emu, chan) \
include/sound/emu8000_reg.h
89
snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(5, (chan)))
include/sound/emu8000_reg.h
90
#define EMU8000_ATKHLD_READ(emu, chan) \
include/sound/emu8000_reg.h
91
snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(6, (chan)))
include/sound/emu8000_reg.h
92
#define EMU8000_LFO2VAL_READ(emu, chan) \
include/sound/emu8000_reg.h
93
snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(7, (chan)))
include/sound/emu8000_reg.h
94
#define EMU8000_IP_READ(emu, chan) \
include/sound/emu8000_reg.h
95
snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(0, (chan)))
include/sound/emu8000_reg.h
96
#define EMU8000_IFATN_READ(emu, chan) \
include/sound/emu8000_reg.h
97
snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(1, (chan)))
include/sound/emu8000_reg.h
98
#define EMU8000_PEFE_READ(emu, chan) \
include/sound/emu8000_reg.h
99
snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(2, (chan)))
include/sound/emux_synth.h
129
struct snd_emux *emu;
include/sound/emux_synth.h
172
struct snd_emux *emu; /* assigned root info */
include/sound/emux_synth.h
219
int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, char *name);
include/sound/emux_synth.h
220
int snd_emux_free(struct snd_emux *emu);
include/sound/emux_synth.h
225
void snd_emux_terminate_all(struct snd_emux *emu);
include/sound/emux_synth.h
226
void snd_emux_lock_voice(struct snd_emux *emu, int voice);
include/sound/emux_synth.h
227
void snd_emux_unlock_voice(struct snd_emux *emu, int voice);
include/sound/emux_synth.h
34
struct snd_emux_voice *(*get_voice)(struct snd_emux *emu,
include/sound/emux_synth.h
42
void (*reset)(struct snd_emux *emu, int ch);
include/sound/emux_synth.h
44
int (*sample_new)(struct snd_emux *emu, struct snd_sf_sample *sp,
include/sound/emux_synth.h
47
int (*sample_free)(struct snd_emux *emu, struct snd_sf_sample *sp,
include/sound/emux_synth.h
49
void (*sample_reset)(struct snd_emux *emu);
include/sound/emux_synth.h
50
int (*load_fx)(struct snd_emux *emu, int type, int arg,
include/sound/emux_synth.h
52
void (*sysex)(struct snd_emux *emu, char *buf, int len, int parsed,
include/sound/emux_synth.h
55
int (*oss_ioctl)(struct snd_emux *emu, int cmd, int p1, int p2);
include/sound/emux_synth.h
57
int (*get_pitch_shift)(struct snd_emux *emu);
sound/isa/sb/emu8000.c
100
EMU8000_CPF_WRITE(emu, ch, 0x40000000);
sound/isa/sb/emu8000.c
1006
snd_emu8000_create_mixer(struct snd_card *card, struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
101
EMU8000_PSST_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
1011
if (snd_BUG_ON(!emu || !card))
sound/isa/sb/emu8000.c
1014
spin_lock_init(&emu->control_lock);
sound/isa/sb/emu8000.c
1016
memset(emu->controls, 0, sizeof(emu->controls));
sound/isa/sb/emu8000.c
1018
kctl = snd_ctl_new1(mixer_defs[i], emu);
sound/isa/sb/emu8000.c
102
EMU8000_CSL_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
1022
emu->controls[i] = kctl;
sound/isa/sb/emu8000.c
1028
snd_ctl_remove(card, emu->controls[i]);
sound/isa/sb/emu8000.c
104
EMU8000_CCCA_WRITE(emu, ch, 0x06000000 | right_bit);
sound/isa/sb/emu8000.c
106
EMU8000_CCCA_WRITE(emu, ch, 0x04000000 | right_bit);
sound/isa/sb/emu8000.c
112
snd_emu8000_read_wait(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
114
while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) {
sound/isa/sb/emu8000.c
124
snd_emu8000_write_wait(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
126
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
sound/isa/sb/emu8000.c
137
snd_emu8000_detect(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
140
EMU8000_HWCF1_WRITE(emu, 0x0059);
sound/isa/sb/emu8000.c
141
EMU8000_HWCF2_WRITE(emu, 0x0020);
sound/isa/sb/emu8000.c
142
EMU8000_HWCF3_WRITE(emu, 0x0000);
sound/isa/sb/emu8000.c
148
if ((EMU8000_HWCF1_READ(emu) & 0x007e) != 0x0058)
sound/isa/sb/emu8000.c
150
if ((EMU8000_HWCF2_READ(emu) & 0x0003) != 0x0003)
sound/isa/sb/emu8000.c
153
dev_dbg(emu->card->dev, "EMU8000 [0x%lx]: Synth chip found\n",
sound/isa/sb/emu8000.c
154
emu->port1);
sound/isa/sb/emu8000.c
163
init_audio(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
169
EMU8000_DCYSUSV_WRITE(emu, ch, 0x80);
sound/isa/sb/emu8000.c
173
EMU8000_ENVVOL_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
174
EMU8000_ENVVAL_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
175
EMU8000_DCYSUS_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
176
EMU8000_ATKHLDV_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
177
EMU8000_LFO1VAL_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
178
EMU8000_ATKHLD_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
179
EMU8000_LFO2VAL_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
180
EMU8000_IP_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
181
EMU8000_IFATN_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
182
EMU8000_PEFE_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
183
EMU8000_FMMOD_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
184
EMU8000_TREMFRQ_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
185
EMU8000_FM2FRQ2_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
186
EMU8000_PTRX_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
187
EMU8000_VTFT_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
188
EMU8000_PSST_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
189
EMU8000_CSL_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
190
EMU8000_CCCA_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
194
EMU8000_CPF_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
195
EMU8000_CVCF_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
204
init_dma(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
206
EMU8000_SMALR_WRITE(emu, 0);
sound/isa/sb/emu8000.c
207
EMU8000_SMARR_WRITE(emu, 0);
sound/isa/sb/emu8000.c
208
EMU8000_SMALW_WRITE(emu, 0);
sound/isa/sb/emu8000.c
209
EMU8000_SMARW_WRITE(emu, 0);
sound/isa/sb/emu8000.c
308
send_array(struct snd_emu8000 *emu, const unsigned short *data, int size)
sound/isa/sb/emu8000.c
315
EMU8000_INIT1_WRITE(emu, i, *p);
sound/isa/sb/emu8000.c
317
EMU8000_INIT2_WRITE(emu, i, *p);
sound/isa/sb/emu8000.c
319
EMU8000_INIT3_WRITE(emu, i, *p);
sound/isa/sb/emu8000.c
321
EMU8000_INIT4_WRITE(emu, i, *p);
sound/isa/sb/emu8000.c
330
init_arrays(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
332
send_array(emu, init1, ARRAY_SIZE(init1)/4);
sound/isa/sb/emu8000.c
335
send_array(emu, init2, ARRAY_SIZE(init2)/4);
sound/isa/sb/emu8000.c
336
send_array(emu, init3, ARRAY_SIZE(init3)/4);
sound/isa/sb/emu8000.c
338
EMU8000_HWCF4_WRITE(emu, 0);
sound/isa/sb/emu8000.c
339
EMU8000_HWCF5_WRITE(emu, 0x83);
sound/isa/sb/emu8000.c
340
EMU8000_HWCF6_WRITE(emu, 0x8000);
sound/isa/sb/emu8000.c
342
send_array(emu, init4, ARRAY_SIZE(init4)/4);
sound/isa/sb/emu8000.c
356
size_dram(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
36
void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val)
sound/isa/sb/emu8000.c
360
if (emu->dram_checked)
sound/isa/sb/emu8000.c
366
snd_emu8000_dma_chan(emu, 0, EMU8000_RAM_WRITE);
sound/isa/sb/emu8000.c
367
snd_emu8000_dma_chan(emu, 1, EMU8000_RAM_READ);
sound/isa/sb/emu8000.c
368
EMU8000_SMALW_WRITE(emu, EMU8000_DRAM_OFFSET);
sound/isa/sb/emu8000.c
369
EMU8000_SMLD_WRITE(emu, UNIQUE_ID1);
sound/isa/sb/emu8000.c
370
snd_emu8000_init_fm(emu); /* This must really be here and not 2 lines back even */
sound/isa/sb/emu8000.c
371
snd_emu8000_write_wait(emu);
sound/isa/sb/emu8000.c
377
EMU8000_SMALR_WRITE(emu, EMU8000_DRAM_OFFSET);
sound/isa/sb/emu8000.c
378
EMU8000_SMLD_READ(emu); /* discard stale data */
sound/isa/sb/emu8000.c
379
if (EMU8000_SMLD_READ(emu) != UNIQUE_ID1)
sound/isa/sb/emu8000.c
38
guard(spinlock_irqsave)(&emu->reg_lock);
sound/isa/sb/emu8000.c
381
snd_emu8000_read_wait(emu);
sound/isa/sb/emu8000.c
39
if (reg != emu->last_reg) {
sound/isa/sb/emu8000.c
391
EMU8000_SMALW_WRITE(emu, EMU8000_DRAM_OFFSET + (size>>1));
sound/isa/sb/emu8000.c
392
EMU8000_SMLD_WRITE(emu, UNIQUE_ID2);
sound/isa/sb/emu8000.c
393
snd_emu8000_write_wait(emu);
sound/isa/sb/emu8000.c
40
outw((unsigned short)reg, EMU8000_PTR(emu)); /* Set register */
sound/isa/sb/emu8000.c
400
EMU8000_SMALR_WRITE(emu, EMU8000_DRAM_OFFSET + (size>>1));
sound/isa/sb/emu8000.c
402
EMU8000_SMLD_READ(emu); /* discard stale data */
sound/isa/sb/emu8000.c
403
if (EMU8000_SMLD_READ(emu) != UNIQUE_ID2)
sound/isa/sb/emu8000.c
405
snd_emu8000_read_wait(emu);
sound/isa/sb/emu8000.c
41
emu->last_reg = reg;
sound/isa/sb/emu8000.c
412
EMU8000_SMALR_WRITE(emu, EMU8000_DRAM_OFFSET);
sound/isa/sb/emu8000.c
413
EMU8000_SMLD_READ(emu); /* discard stale data */
sound/isa/sb/emu8000.c
414
if (EMU8000_SMLD_READ(emu) != UNIQUE_ID1)
sound/isa/sb/emu8000.c
416
snd_emu8000_read_wait(emu);
sound/isa/sb/emu8000.c
424
if ((EMU8000_SMALW_READ(emu) & 0x80000000) == 0)
sound/isa/sb/emu8000.c
430
snd_emu8000_dma_chan(emu, 0, EMU8000_RAM_CLOSE);
sound/isa/sb/emu8000.c
431
snd_emu8000_dma_chan(emu, 1, EMU8000_RAM_CLOSE);
sound/isa/sb/emu8000.c
434
emu->port1, size/1024);
sound/isa/sb/emu8000.c
436
emu->mem_size = size;
sound/isa/sb/emu8000.c
437
emu->dram_checked = 1;
sound/isa/sb/emu8000.c
446
snd_emu8000_init_fm(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
452
EMU8000_DCYSUSV_WRITE(emu, 30, 0x80);
sound/isa/sb/emu8000.c
453
EMU8000_PSST_WRITE(emu, 30, 0xFFFFFFE0); /* full left */
sound/isa/sb/emu8000.c
454
EMU8000_CSL_WRITE(emu, 30, 0x00FFFFE8 | (emu->fm_chorus_depth << 24));
sound/isa/sb/emu8000.c
455
EMU8000_PTRX_WRITE(emu, 30, (emu->fm_reverb_depth << 8));
sound/isa/sb/emu8000.c
456
EMU8000_CPF_WRITE(emu, 30, 0);
sound/isa/sb/emu8000.c
457
EMU8000_CCCA_WRITE(emu, 30, 0x00FFFFE3);
sound/isa/sb/emu8000.c
460
EMU8000_DCYSUSV_WRITE(emu, 31, 0x80);
sound/isa/sb/emu8000.c
461
EMU8000_PSST_WRITE(emu, 31, 0x00FFFFF0); /* full right */
sound/isa/sb/emu8000.c
462
EMU8000_CSL_WRITE(emu, 31, 0x00FFFFF8 | (emu->fm_chorus_depth << 24));
sound/isa/sb/emu8000.c
463
EMU8000_PTRX_WRITE(emu, 31, (emu->fm_reverb_depth << 8));
sound/isa/sb/emu8000.c
464
EMU8000_CPF_WRITE(emu, 31, 0x8000);
sound/isa/sb/emu8000.c
465
EMU8000_CCCA_WRITE(emu, 31, 0x00FFFFF3);
sound/isa/sb/emu8000.c
467
snd_emu8000_poke((emu), EMU8000_DATA0(emu), EMU8000_CMD(1, (30)), 0);
sound/isa/sb/emu8000.c
469
scoped_guard(spinlock_irqsave, &emu->reg_lock) {
sound/isa/sb/emu8000.c
47
unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port, unsigned int reg)
sound/isa/sb/emu8000.c
470
while (!(inw(EMU8000_PTR(emu)) & 0x1000))
sound/isa/sb/emu8000.c
472
while ((inw(EMU8000_PTR(emu)) & 0x1000))
sound/isa/sb/emu8000.c
475
snd_emu8000_poke((emu), EMU8000_DATA0(emu), EMU8000_CMD(1, (30)), 0x4828);
sound/isa/sb/emu8000.c
477
outb(0x3C, EMU8000_PTR(emu));
sound/isa/sb/emu8000.c
478
outb(0, EMU8000_DATA1(emu));
sound/isa/sb/emu8000.c
481
EMU8000_VTFT_WRITE(emu, 30, 0x8000FFFF);
sound/isa/sb/emu8000.c
482
EMU8000_VTFT_WRITE(emu, 31, 0x8000FFFF);
sound/isa/sb/emu8000.c
49
guard(spinlock_irqsave)(&emu->reg_lock);
sound/isa/sb/emu8000.c
490
snd_emu8000_init_hw(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
494
emu->last_reg = 0xffff; /* reset the last register index */
sound/isa/sb/emu8000.c
497
EMU8000_HWCF1_WRITE(emu, 0x0059);
sound/isa/sb/emu8000.c
498
EMU8000_HWCF2_WRITE(emu, 0x0020);
sound/isa/sb/emu8000.c
50
if (reg != emu->last_reg) {
sound/isa/sb/emu8000.c
501
EMU8000_HWCF3_WRITE(emu, 0);
sound/isa/sb/emu8000.c
504
init_audio(emu);
sound/isa/sb/emu8000.c
507
init_dma(emu);
sound/isa/sb/emu8000.c
51
outw((unsigned short)reg, EMU8000_PTR(emu)); /* Set register */
sound/isa/sb/emu8000.c
510
init_arrays(emu);
sound/isa/sb/emu8000.c
516
snd_emu8000_init_fm(emu);
sound/isa/sb/emu8000.c
52
emu->last_reg = reg;
sound/isa/sb/emu8000.c
520
EMU8000_DCYSUSV_WRITE(emu, 0, 0x807F);
sound/isa/sb/emu8000.c
523
size_dram(emu);
sound/isa/sb/emu8000.c
526
EMU8000_HWCF3_WRITE(emu, 0x4);
sound/isa/sb/emu8000.c
529
snd_emu8000_update_equalizer(emu);
sound/isa/sb/emu8000.c
530
snd_emu8000_update_chorus_mode(emu);
sound/isa/sb/emu8000.c
531
snd_emu8000_update_reverb_mode(emu);
sound/isa/sb/emu8000.c
574
snd_emu8000_update_equalizer(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
577
int bass = emu->bass_level;
sound/isa/sb/emu8000.c
578
int treble = emu->treble_level;
sound/isa/sb/emu8000.c
58
void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val)
sound/isa/sb/emu8000.c
582
EMU8000_INIT4_WRITE(emu, 0x01, bass_parm[bass][0]);
sound/isa/sb/emu8000.c
583
EMU8000_INIT4_WRITE(emu, 0x11, bass_parm[bass][1]);
sound/isa/sb/emu8000.c
584
EMU8000_INIT3_WRITE(emu, 0x11, treble_parm[treble][0]);
sound/isa/sb/emu8000.c
585
EMU8000_INIT3_WRITE(emu, 0x13, treble_parm[treble][1]);
sound/isa/sb/emu8000.c
586
EMU8000_INIT3_WRITE(emu, 0x1b, treble_parm[treble][2]);
sound/isa/sb/emu8000.c
587
EMU8000_INIT4_WRITE(emu, 0x07, treble_parm[treble][3]);
sound/isa/sb/emu8000.c
588
EMU8000_INIT4_WRITE(emu, 0x0b, treble_parm[treble][4]);
sound/isa/sb/emu8000.c
589
EMU8000_INIT4_WRITE(emu, 0x0d, treble_parm[treble][5]);
sound/isa/sb/emu8000.c
590
EMU8000_INIT4_WRITE(emu, 0x17, treble_parm[treble][6]);
sound/isa/sb/emu8000.c
591
EMU8000_INIT4_WRITE(emu, 0x19, treble_parm[treble][7]);
sound/isa/sb/emu8000.c
593
EMU8000_INIT4_WRITE(emu, 0x15, (unsigned short)(w + 0x0262));
sound/isa/sb/emu8000.c
594
EMU8000_INIT4_WRITE(emu, 0x1d, (unsigned short)(w + 0x8362));
sound/isa/sb/emu8000.c
60
guard(spinlock_irqsave)(&emu->reg_lock);
sound/isa/sb/emu8000.c
61
if (reg != emu->last_reg) {
sound/isa/sb/emu8000.c
62
outw((unsigned short)reg, EMU8000_PTR(emu)); /* Set register */
sound/isa/sb/emu8000.c
63
emu->last_reg = reg;
sound/isa/sb/emu8000.c
639
snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len)
sound/isa/sb/emu8000.c
643
dev_warn(emu->card->dev, "invalid chorus mode %d for uploading\n", mode);
sound/isa/sb/emu8000.c
654
snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
656
int effect = emu->chorus_mode;
sound/isa/sb/emu8000.c
660
EMU8000_INIT3_WRITE(emu, 0x09, chorus_parm[effect].feedback);
sound/isa/sb/emu8000.c
661
EMU8000_INIT3_WRITE(emu, 0x0c, chorus_parm[effect].delay_offset);
sound/isa/sb/emu8000.c
662
EMU8000_INIT4_WRITE(emu, 0x03, chorus_parm[effect].lfo_depth);
sound/isa/sb/emu8000.c
663
EMU8000_HWCF4_WRITE(emu, chorus_parm[effect].delay);
sound/isa/sb/emu8000.c
664
EMU8000_HWCF5_WRITE(emu, chorus_parm[effect].lfo_freq);
sound/isa/sb/emu8000.c
665
EMU8000_HWCF6_WRITE(emu, 0x8000);
sound/isa/sb/emu8000.c
666
EMU8000_HWCF7_WRITE(emu, 0x0000);
sound/isa/sb/emu8000.c
70
unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg)
sound/isa/sb/emu8000.c
74
guard(spinlock_irqsave)(&emu->reg_lock);
sound/isa/sb/emu8000.c
75
if (reg != emu->last_reg) {
sound/isa/sb/emu8000.c
76
outw((unsigned short)reg, EMU8000_PTR(emu)); /* Set register */
sound/isa/sb/emu8000.c
766
snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len)
sound/isa/sb/emu8000.c
77
emu->last_reg = reg;
sound/isa/sb/emu8000.c
771
dev_warn(emu->card->dev, "invalid reverb mode %d for uploading\n", mode);
sound/isa/sb/emu8000.c
782
snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu)
sound/isa/sb/emu8000.c
784
int effect = emu->reverb_mode;
sound/isa/sb/emu8000.c
793
port = EMU8000_DATA1(emu);
sound/isa/sb/emu8000.c
795
port = EMU8000_DATA2(emu);
sound/isa/sb/emu8000.c
796
snd_emu8000_poke(emu, port, reverb_cmds[i].cmd, reverb_parm[effect].parms[i]);
sound/isa/sb/emu8000.c
819
struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
sound/isa/sb/emu8000.c
821
ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->treble_level : emu->bass_level;
sound/isa/sb/emu8000.c
827
struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
sound/isa/sb/emu8000.c
832
scoped_guard(spinlock_irqsave, &emu->control_lock) {
sound/isa/sb/emu8000.c
834
change = val1 != emu->treble_level;
sound/isa/sb/emu8000.c
835
emu->treble_level = val1;
sound/isa/sb/emu8000.c
837
change = val1 != emu->bass_level;
sound/isa/sb/emu8000.c
838
emu->bass_level = val1;
sound/isa/sb/emu8000.c
841
snd_emu8000_update_equalizer(emu);
sound/isa/sb/emu8000.c
87
snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode)
sound/isa/sb/emu8000.c
879
struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
sound/isa/sb/emu8000.c
881
ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->chorus_mode : emu->reverb_mode;
sound/isa/sb/emu8000.c
887
struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
sound/isa/sb/emu8000.c
891
scoped_guard(spinlock_irqsave, &emu->control_lock) {
sound/isa/sb/emu8000.c
894
change = val1 != emu->chorus_mode;
sound/isa/sb/emu8000.c
895
emu->chorus_mode = val1;
sound/isa/sb/emu8000.c
898
change = val1 != emu->reverb_mode;
sound/isa/sb/emu8000.c
899
emu->reverb_mode = val1;
sound/isa/sb/emu8000.c
904
snd_emu8000_update_chorus_mode(emu);
sound/isa/sb/emu8000.c
906
snd_emu8000_update_reverb_mode(emu);
sound/isa/sb/emu8000.c
92
EMU8000_CCCA_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
93
EMU8000_DCYSUSV_WRITE(emu, ch, 0x807F);
sound/isa/sb/emu8000.c
945
struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
sound/isa/sb/emu8000.c
947
ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->fm_chorus_depth : emu->fm_reverb_depth;
sound/isa/sb/emu8000.c
953
struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
sound/isa/sb/emu8000.c
958
scoped_guard(spinlock_irqsave, &emu->control_lock) {
sound/isa/sb/emu8000.c
96
EMU8000_DCYSUSV_WRITE(emu, ch, 0x80);
sound/isa/sb/emu8000.c
960
change = val1 != emu->fm_chorus_depth;
sound/isa/sb/emu8000.c
961
emu->fm_chorus_depth = val1;
sound/isa/sb/emu8000.c
963
change = val1 != emu->fm_reverb_depth;
sound/isa/sb/emu8000.c
964
emu->fm_reverb_depth = val1;
sound/isa/sb/emu8000.c
968
snd_emu8000_init_fm(emu);
sound/isa/sb/emu8000.c
97
EMU8000_VTFT_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
98
EMU8000_CVCF_WRITE(emu, ch, 0);
sound/isa/sb/emu8000.c
99
EMU8000_PTRX_WRITE(emu, ch, 0x40000000);
sound/isa/sb/emu8000_callback.c
144
get_voice(struct snd_emux *emu, struct snd_emux_port *port)
sound/isa/sb/emu8000_callback.c
16
static struct snd_emux_voice *get_voice(struct snd_emux *emu,
sound/isa/sb/emu8000_callback.c
162
hw = emu->hw;
sound/isa/sb/emu8000_callback.c
172
for (i = 0; i < emu->max_voices; i++) {
sound/isa/sb/emu8000_callback.c
175
vp = &emu->voices[i];
sound/isa/sb/emu8000_callback.c
208
vp = &emu->voices[best[i].voice];
sound/isa/sb/emu8000_callback.c
22
static void reset_voice(struct snd_emux *emu, int ch);
sound/isa/sb/emu8000_callback.c
24
static void sysex(struct snd_emux *emu, char *buf, int len, int parsed,
sound/isa/sb/emu8000_callback.c
27
static int oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2);
sound/isa/sb/emu8000_callback.c
29
static int load_fx(struct snd_emux *emu, int type, int mode,
sound/isa/sb/emu8000_callback.c
323
reset_voice(struct snd_emux *emu, int ch)
sound/isa/sb/emu8000_callback.c
327
hw = emu->hw;
sound/isa/sb/emu8000_callback.c
39
static void snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int ch);
sound/isa/sb/emu8000_callback.c
425
snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int i)
sound/isa/sb/emu8000_callback.c
428
EMU8000_ENVVOL_WRITE(emu, i, 0x8000);
sound/isa/sb/emu8000_callback.c
429
EMU8000_ENVVAL_WRITE(emu, i, 0x8000);
sound/isa/sb/emu8000_callback.c
430
EMU8000_DCYSUS_WRITE(emu, i, 0x7F7F);
sound/isa/sb/emu8000_callback.c
431
EMU8000_ATKHLDV_WRITE(emu, i, 0x7F7F);
sound/isa/sb/emu8000_callback.c
432
EMU8000_ATKHLD_WRITE(emu, i, 0x7F7F);
sound/isa/sb/emu8000_callback.c
433
EMU8000_PEFE_WRITE(emu, i, 0); /* mod envelope height to zero */
sound/isa/sb/emu8000_callback.c
434
EMU8000_LFO1VAL_WRITE(emu, i, 0x8000); /* no delay for LFO1 */
sound/isa/sb/emu8000_callback.c
435
EMU8000_LFO2VAL_WRITE(emu, i, 0x8000);
sound/isa/sb/emu8000_callback.c
436
EMU8000_IP_WRITE(emu, i, 0xE000); /* no pitch shift */
sound/isa/sb/emu8000_callback.c
437
EMU8000_IFATN_WRITE(emu, i, 0xFF00); /* volume to minimum */
sound/isa/sb/emu8000_callback.c
438
EMU8000_FMMOD_WRITE(emu, i, 0);
sound/isa/sb/emu8000_callback.c
439
EMU8000_TREMFRQ_WRITE(emu, i, 0);
sound/isa/sb/emu8000_callback.c
440
EMU8000_FM2FRQ2_WRITE(emu, i, 0);
sound/isa/sb/emu8000_callback.c
447
sysex(struct snd_emux *emu, char *buf, int len, int parsed, struct snd_midi_channel_set *chset)
sound/isa/sb/emu8000_callback.c
451
hw = emu->hw;
sound/isa/sb/emu8000_callback.c
472
oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2)
sound/isa/sb/emu8000_callback.c
476
hw = emu->hw;
sound/isa/sb/emu8000_callback.c
517
load_fx(struct snd_emux *emu, int type, int mode, const void __user *buf, long len)
sound/isa/sb/emu8000_callback.c
520
hw = emu->hw;
sound/isa/sb/emu8000_callback.c
74
hw->emu->ops = emu8000_ops;
sound/isa/sb/emu8000_local.h
27
void snd_emu8000_ops_setup(struct snd_emu8000 *emu);
sound/isa/sb/emu8000_local.h
30
int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index);
sound/isa/sb/emu8000_patch.c
100
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
sound/isa/sb/emu8000_patch.c
120
write_word(struct snd_emu8000 *emu, int *offset, unsigned short data)
sound/isa/sb/emu8000_patch.c
124
snd_emu8000_write_wait(emu);
sound/isa/sb/emu8000_patch.c
125
EMU8000_SMALW_WRITE(emu, *offset);
sound/isa/sb/emu8000_patch.c
127
EMU8000_SMLD_WRITE(emu, data);
sound/isa/sb/emu8000_patch.c
145
struct snd_emu8000 *emu;
sound/isa/sb/emu8000_patch.c
147
emu = rec->hw;
sound/isa/sb/emu8000_patch.c
179
snd_emux_terminate_all(emu->emu);
sound/isa/sb/emu8000_patch.c
180
rc = snd_emu8000_open_dma(emu, EMU8000_RAM_WRITE);
sound/isa/sb/emu8000_patch.c
185
snd_emu8000_write_wait(emu);
sound/isa/sb/emu8000_patch.c
186
EMU8000_SMALW_WRITE(emu, dram_offset);
sound/isa/sb/emu8000_patch.c
194
write_word(emu, &dram_offset, 0);
sound/isa/sb/emu8000_patch.c
205
write_word(emu, &dram_offset, s);
sound/isa/sb/emu8000_patch.c
221
write_word(emu, &dram_offset, s);
sound/isa/sb/emu8000_patch.c
236
write_word(emu, &dram_offset, 0);
sound/isa/sb/emu8000_patch.c
24
snd_emu8000_open_dma(struct snd_emu8000 *emu, int write)
sound/isa/sb/emu8000_patch.c
250
snd_emu8000_close_dma(emu);
sound/isa/sb/emu8000_patch.c
251
snd_emu8000_init_fm(emu);
sound/isa/sb/emu8000_patch.c
30
snd_emux_lock_voice(emu->emu, i);
sound/isa/sb/emu8000_patch.c
31
snd_emu8000_dma_chan(emu, i, write);
sound/isa/sb/emu8000_patch.c
35
EMU8000_VTFT_WRITE(emu, 30, 0);
sound/isa/sb/emu8000_patch.c
36
EMU8000_PSST_WRITE(emu, 30, 0x1d8);
sound/isa/sb/emu8000_patch.c
37
EMU8000_CSL_WRITE(emu, 30, 0x1e0);
sound/isa/sb/emu8000_patch.c
38
EMU8000_CCCA_WRITE(emu, 30, 0x1d8);
sound/isa/sb/emu8000_patch.c
39
EMU8000_VTFT_WRITE(emu, 31, 0);
sound/isa/sb/emu8000_patch.c
40
EMU8000_PSST_WRITE(emu, 31, 0x1d8);
sound/isa/sb/emu8000_patch.c
41
EMU8000_CSL_WRITE(emu, 31, 0x1e0);
sound/isa/sb/emu8000_patch.c
42
EMU8000_CCCA_WRITE(emu, 31, 0x1d8);
sound/isa/sb/emu8000_patch.c
51
snd_emu8000_close_dma(struct snd_emu8000 *emu)
sound/isa/sb/emu8000_patch.c
56
snd_emu8000_dma_chan(emu, i, EMU8000_RAM_CLOSE);
sound/isa/sb/emu8000_patch.c
57
snd_emux_unlock_voice(emu->emu, i);
sound/isa/sb/emu8000_patch.c
98
snd_emu8000_write_wait(struct snd_emu8000 *emu)
sound/isa/sb/emu8000_pcm.c
104
snd_emu8000_write_wait(struct snd_emu8000 *emu, int can_schedule)
sound/isa/sb/emu8000_pcm.c
106
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
sound/isa/sb/emu8000_pcm.c
119
emu8k_close_dram(struct snd_emu8000 *emu)
sound/isa/sb/emu8000_pcm.c
124
snd_emux_unlock_voice(emu->emu, i);
sound/isa/sb/emu8000_pcm.c
126
snd_emu8000_dma_chan(emu, i, EMU8000_RAM_CLOSE);
sound/isa/sb/emu8000_pcm.c
127
snd_emux_unlock_voice(emu->emu, i);
sound/isa/sb/emu8000_pcm.c
173
int val = EMU8000_CCCA_READ(rec->emu, ch) & 0xfffffff;
sound/isa/sb/emu8000_pcm.c
220
struct snd_emu8000 *emu = snd_pcm_substream_chip(subs);
sound/isa/sb/emu8000_pcm.c
228
rec->emu = emu;
sound/isa/sb/emu8000_pcm.c
236
runtime->hw.buffer_bytes_max = emu->mem_size - LOOP_BLANK_SIZE * 3;
sound/isa/sb/emu8000_pcm.c
273
struct snd_emu8000 *hw = rec->emu;
sound/isa/sb/emu8000_pcm.c
326
struct snd_emu8000 *hw = rec->emu;
sound/isa/sb/emu8000_pcm.c
359
struct snd_emu8000 *hw = rec->emu;
sound/isa/sb/emu8000_pcm.c
40
struct snd_emu8000 *emu;
sound/isa/sb/emu8000_pcm.c
422
struct snd_emu8000 *emu = (rec)->emu; \
sound/isa/sb/emu8000_pcm.c
423
snd_emu8000_write_wait(emu, 1); \
sound/isa/sb/emu8000_pcm.c
424
EMU8000_SMALW_WRITE(emu, offset); \
sound/isa/sb/emu8000_pcm.c
429
EMU8000_SMLD_WRITE(emu, sval); \
sound/isa/sb/emu8000_pcm.c
465
struct snd_emu8000 *emu = rec->emu; \
sound/isa/sb/emu8000_pcm.c
466
snd_emu8000_write_wait(emu, 1); \
sound/isa/sb/emu8000_pcm.c
467
EMU8000_SMALW_WRITE(emu, pos + rec->loop_start[0]); \
sound/isa/sb/emu8000_pcm.c
469
EMU8000_SMARW_WRITE(emu, pos + rec->loop_start[1]); \
sound/isa/sb/emu8000_pcm.c
474
EMU8000_SMLD_WRITE(emu, sval); \
sound/isa/sb/emu8000_pcm.c
478
EMU8000_SMRD_WRITE(emu, sval); \
sound/isa/sb/emu8000_pcm.c
526
snd_util_mem_free(rec->emu->memhdr, rec->block);
sound/isa/sb/emu8000_pcm.c
531
rec->block = snd_util_mem_alloc(rec->emu->memhdr, rec->allocated_bytes);
sound/isa/sb/emu8000_pcm.c
553
emu8k_close_dram(rec->emu);
sound/isa/sb/emu8000_pcm.c
554
snd_util_mem_free(rec->emu->memhdr, rec->block);
sound/isa/sb/emu8000_pcm.c
585
snd_emux_terminate_all(rec->emu->emu);
sound/isa/sb/emu8000_pcm.c
586
err = emu8k_open_dram_for_pcm(rec->emu, rec->voices);
sound/isa/sb/emu8000_pcm.c
592
snd_emu8000_write_wait(rec->emu, 0);
sound/isa/sb/emu8000_pcm.c
593
EMU8000_SMALW_WRITE(rec->emu, rec->offset);
sound/isa/sb/emu8000_pcm.c
595
EMU8000_SMLD_WRITE(rec->emu, 0);
sound/isa/sb/emu8000_pcm.c
597
EMU8000_SMALW_WRITE(rec->emu, rec->loop_start[ch] + rec->buf_size);
sound/isa/sb/emu8000_pcm.c
599
EMU8000_SMLD_WRITE(rec->emu, 0);
sound/isa/sb/emu8000_pcm.c
633
struct snd_emu8000 *emu = pcm->private_data;
sound/isa/sb/emu8000_pcm.c
634
emu->pcm = NULL;
sound/isa/sb/emu8000_pcm.c
637
int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index)
sound/isa/sb/emu8000_pcm.c
645
pcm->private_data = emu;
sound/isa/sb/emu8000_pcm.c
648
emu->pcm = pcm;
sound/isa/sb/emu8000_pcm.c
68
emu8k_open_dram_for_pcm(struct snd_emu8000 *emu, int channels)
sound/isa/sb/emu8000_pcm.c
73
snd_emux_lock_voice(emu->emu, 0);
sound/isa/sb/emu8000_pcm.c
75
snd_emux_lock_voice(emu->emu, 1);
sound/isa/sb/emu8000_pcm.c
80
snd_emux_lock_voice(emu->emu, i);
sound/isa/sb/emu8000_pcm.c
85
snd_emu8000_dma_chan(emu, i, mode);
sound/isa/sb/emu8000_pcm.c
89
EMU8000_VTFT_WRITE(emu, 30, 0);
sound/isa/sb/emu8000_pcm.c
90
EMU8000_PSST_WRITE(emu, 30, 0x1d8);
sound/isa/sb/emu8000_pcm.c
91
EMU8000_CSL_WRITE(emu, 30, 0x1e0);
sound/isa/sb/emu8000_pcm.c
92
EMU8000_CCCA_WRITE(emu, 30, 0x1d8);
sound/isa/sb/emu8000_pcm.c
93
EMU8000_VTFT_WRITE(emu, 31, 0);
sound/isa/sb/emu8000_pcm.c
94
EMU8000_PSST_WRITE(emu, 31, 0x1d8);
sound/isa/sb/emu8000_pcm.c
95
EMU8000_CSL_WRITE(emu, 31, 0x1e0);
sound/isa/sb/emu8000_pcm.c
96
EMU8000_CCCA_WRITE(emu, 31, 0x1d8);
sound/isa/sb/emu8000_synth.c
27
struct snd_emux *emu;
sound/isa/sb/emu8000_synth.c
33
if (hw->emu)
sound/isa/sb/emu8000_synth.c
36
if (snd_emux_new(&emu) < 0)
sound/isa/sb/emu8000_synth.c
39
hw->emu = emu;
sound/isa/sb/emu8000_synth.c
42
emu->hw = hw;
sound/isa/sb/emu8000_synth.c
43
emu->max_voices = EMU8000_DRAM_VOICES;
sound/isa/sb/emu8000_synth.c
44
emu->num_ports = hw->seq_ports;
sound/isa/sb/emu8000_synth.c
52
snd_emux_free(emu);
sound/isa/sb/emu8000_synth.c
53
hw->emu = NULL;
sound/isa/sb/emu8000_synth.c
57
emu->memhdr = hw->memhdr;
sound/isa/sb/emu8000_synth.c
58
emu->midi_ports = hw->seq_ports < 2 ? hw->seq_ports : 2; /* number of virmidi ports */
sound/isa/sb/emu8000_synth.c
59
emu->midi_devidx = 1;
sound/isa/sb/emu8000_synth.c
60
emu->linear_panning = 1;
sound/isa/sb/emu8000_synth.c
61
emu->hwdep_idx = 2; /* FIXED */
sound/isa/sb/emu8000_synth.c
63
if (snd_emux_register(emu, dev->card, hw->index, "Emu8000") < 0) {
sound/isa/sb/emu8000_synth.c
64
snd_emux_free(emu);
sound/isa/sb/emu8000_synth.c
66
hw->emu = NULL;
sound/isa/sb/emu8000_synth.c
93
snd_emux_free(hw->emu);
sound/isa/sb/emu8000_synth.c
95
hw->emu = NULL;
sound/pci/ca0106/ca0106.h
635
struct snd_ca0106 *emu;
sound/pci/ca0106/ca0106.h
638
void (*interrupt)(struct snd_ca0106 *emu, struct snd_ca0106_channel *channel);
sound/pci/ca0106/ca0106.h
643
struct snd_ca0106 *emu;
sound/pci/ca0106/ca0106.h
703
int snd_ca0106_mixer(struct snd_ca0106 *emu);
sound/pci/ca0106/ca0106.h
704
int snd_ca0106_proc_init(struct snd_ca0106 * emu);
sound/pci/ca0106/ca0106.h
706
unsigned int snd_ca0106_ptr_read(struct snd_ca0106 * emu,
sound/pci/ca0106/ca0106.h
710
void snd_ca0106_ptr_write(struct snd_ca0106 *emu,
sound/pci/ca0106/ca0106.h
715
int snd_ca0106_i2c_write(struct snd_ca0106 *emu, u32 reg, u32 value);
sound/pci/ca0106/ca0106.h
717
int snd_ca0106_spi_write(struct snd_ca0106 * emu,
sound/pci/ca0106/ca0106_main.c
1008
struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
sound/pci/ca0106/ca0106_main.c
1020
ptr = snd_ca0106_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
sound/pci/ca0106/ca0106_main.c
1023
snd_ca0106_ptr_read(emu, PLAYBACK_POINTER, channel));
sound/pci/ca0106/ca0106_main.c
1030
dev_warn(emu->card->dev, "ca0106: unstable DMA pointer!\n");
sound/pci/ca0106/ca0106_main.c
1038
struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
sound/pci/ca0106/ca0106_main.c
1047
ptr1 = snd_ca0106_ptr_read(emu, CAPTURE_POINTER, channel);
sound/pci/ca0106/ca0106_main.c
1131
struct snd_ca0106 *emu = ac97->private_data;
sound/pci/ca0106/ca0106_main.c
1133
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/ca0106/ca0106_main.c
1134
outb(reg, emu->port + CA0106_AC97ADDRESS);
sound/pci/ca0106/ca0106_main.c
1135
return inw(emu->port + CA0106_AC97DATA);
sound/pci/ca0106/ca0106_main.c
1141
struct snd_ca0106 *emu = ac97->private_data;
sound/pci/ca0106/ca0106_main.c
1143
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/ca0106/ca0106_main.c
1144
outb(reg, emu->port + CA0106_AC97ADDRESS);
sound/pci/ca0106/ca0106_main.c
1145
outw(val, emu->port + CA0106_AC97DATA);
sound/pci/ca0106/ca0106_main.c
1266
static int snd_ca0106_pcm(struct snd_ca0106 *emu, int device)
sound/pci/ca0106/ca0106_main.c
1273
err = snd_pcm_new(emu->card, "ca0106", device, 1, 1, &pcm);
sound/pci/ca0106/ca0106_main.c
1277
pcm->private_data = emu;
sound/pci/ca0106/ca0106_main.c
1309
&emu->pci->dev,
sound/pci/ca0106/ca0106_main.c
1317
&emu->pci->dev,
sound/pci/ca0106/ca0106_main.c
1326
emu->pcm[device] = pcm;
sound/pci/ca0106/ca0106_main.c
331
unsigned int snd_ca0106_ptr_read(struct snd_ca0106 * emu,
sound/pci/ca0106/ca0106_main.c
339
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/ca0106/ca0106_main.c
340
outl(regptr, emu->port + CA0106_PTR);
sound/pci/ca0106/ca0106_main.c
341
return inl(emu->port + CA0106_DATA);
sound/pci/ca0106/ca0106_main.c
344
void snd_ca0106_ptr_write(struct snd_ca0106 *emu,
sound/pci/ca0106/ca0106_main.c
353
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/ca0106/ca0106_main.c
354
outl(regptr, emu->port + CA0106_PTR);
sound/pci/ca0106/ca0106_main.c
355
outl(data, emu->port + CA0106_DATA);
sound/pci/ca0106/ca0106_main.c
358
int snd_ca0106_spi_write(struct snd_ca0106 * emu,
sound/pci/ca0106/ca0106_main.c
367
tmp = snd_ca0106_ptr_read(emu, reg, 0);
sound/pci/ca0106/ca0106_main.c
370
snd_ca0106_ptr_write(emu, reg, 0, reset | data);
sound/pci/ca0106/ca0106_main.c
371
tmp = snd_ca0106_ptr_read(emu, reg, 0); /* write post */
sound/pci/ca0106/ca0106_main.c
372
snd_ca0106_ptr_write(emu, reg, 0, set | data);
sound/pci/ca0106/ca0106_main.c
377
tmp = snd_ca0106_ptr_read(emu, reg, 0);
sound/pci/ca0106/ca0106_main.c
385
snd_ca0106_ptr_write(emu, reg, 0, reset | data);
sound/pci/ca0106/ca0106_main.c
386
tmp = snd_ca0106_ptr_read(emu, reg, 0); /* Write post */
sound/pci/ca0106/ca0106_main.c
391
int snd_ca0106_i2c_write(struct snd_ca0106 *emu,
sound/pci/ca0106/ca0106_main.c
400
dev_err(emu->card->dev, "i2c_write: invalid values.\n");
sound/pci/ca0106/ca0106_main.c
412
snd_ca0106_ptr_write(emu, I2C_D1, 0, tmp);
sound/pci/ca0106/ca0106_main.c
420
snd_ca0106_ptr_write(emu, I2C_A, 0, tmp);
sound/pci/ca0106/ca0106_main.c
424
status = snd_ca0106_ptr_read(emu, I2C_A, 0);
sound/pci/ca0106/ca0106_main.c
439
dev_err(emu->card->dev, "Writing to ADC failed!\n");
sound/pci/ca0106/ca0106_main.c
447
static void snd_ca0106_intr_enable(struct snd_ca0106 *emu, unsigned int intrenb)
sound/pci/ca0106/ca0106_main.c
451
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/ca0106/ca0106_main.c
452
intr_enable = inl(emu->port + CA0106_INTE) | intrenb;
sound/pci/ca0106/ca0106_main.c
453
outl(intr_enable, emu->port + CA0106_INTE);
sound/pci/ca0106/ca0106_main.c
456
static void snd_ca0106_intr_disable(struct snd_ca0106 *emu, unsigned int intrenb)
sound/pci/ca0106/ca0106_main.c
460
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/ca0106/ca0106_main.c
461
intr_enable = inl(emu->port + CA0106_INTE) & ~intrenb;
sound/pci/ca0106/ca0106_main.c
462
outl(intr_enable, emu->port + CA0106_INTE);
sound/pci/ca0106/ca0106_main.c
550
epcm->emu = chip;
sound/pci/ca0106/ca0106_main.c
559
channel->emu = chip;
sound/pci/ca0106/ca0106_main.c
645
epcm->emu = chip;
sound/pci/ca0106/ca0106_main.c
654
channel->emu = chip;
sound/pci/ca0106/ca0106_main.c
708
struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
sound/pci/ca0106/ca0106_main.c
712
u32 *table_base = (u32 *)(emu->buffer->area+(8*16*channel));
sound/pci/ca0106/ca0106_main.c
727
dev_dbg(emu->card->dev,
sound/pci/ca0106/ca0106_main.c
735
dev_dbg(emu->card->dev,
sound/pci/ca0106/ca0106_main.c
738
dev_dbg(emu->card->dev,
sound/pci/ca0106/ca0106_main.c
740
emu->buffer->addr, emu->buffer->area, emu->buffer->bytes);
sound/pci/ca0106/ca0106_main.c
780
hcfg = inl(emu->port + CA0106_HCFG) ;
sound/pci/ca0106/ca0106_main.c
782
outl(hcfg, emu->port + CA0106_HCFG);
sound/pci/ca0106/ca0106_main.c
783
reg40 = snd_ca0106_ptr_read(emu, 0x40, 0);
sound/pci/ca0106/ca0106_main.c
785
snd_ca0106_ptr_write(emu, 0x40, 0, reg40);
sound/pci/ca0106/ca0106_main.c
786
reg71 = snd_ca0106_ptr_read(emu, 0x71, 0);
sound/pci/ca0106/ca0106_main.c
788
snd_ca0106_ptr_write(emu, 0x71, 0, reg71);
sound/pci/ca0106/ca0106_main.c
796
snd_ca0106_ptr_write(emu, PLAYBACK_LIST_ADDR, channel, emu->buffer->addr+(8*16*channel));
sound/pci/ca0106/ca0106_main.c
797
snd_ca0106_ptr_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19);
sound/pci/ca0106/ca0106_main.c
798
snd_ca0106_ptr_write(emu, PLAYBACK_LIST_PTR, channel, 0);
sound/pci/ca0106/ca0106_main.c
799
snd_ca0106_ptr_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr);
sound/pci/ca0106/ca0106_main.c
800
snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->period_size)<<16); // buffer size in bytes
sound/pci/ca0106/ca0106_main.c
802
snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, 0); // buffer size in bytes
sound/pci/ca0106/ca0106_main.c
803
snd_ca0106_ptr_write(emu, PLAYBACK_POINTER, channel, 0);
sound/pci/ca0106/ca0106_main.c
804
snd_ca0106_ptr_write(emu, 0x07, channel, 0x0);
sound/pci/ca0106/ca0106_main.c
805
snd_ca0106_ptr_write(emu, 0x08, channel, 0);
sound/pci/ca0106/ca0106_main.c
806
snd_ca0106_ptr_write(emu, PLAYBACK_MUTE, 0x0, 0x0); /* Unmute output */
sound/pci/ca0106/ca0106_main.c
808
snd_ca0106_ptr_write(emu, SPCS0, 0,
sound/pci/ca0106/ca0106_main.c
821
struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
sound/pci/ca0106/ca0106_main.c
834
dev_dbg(emu->card->dev,
sound/pci/ca0106/ca0106_main.c
842
dev_dbg(emu->card->dev,
sound/pci/ca0106/ca0106_main.c
845
dev_dbg(emu->card->dev,
sound/pci/ca0106/ca0106_main.c
847
emu->buffer->addr, emu->buffer->area, emu->buffer->bytes);
sound/pci/ca0106/ca0106_main.c
882
hcfg = inl(emu->port + CA0106_HCFG) ;
sound/pci/ca0106/ca0106_main.c
884
outl(hcfg, emu->port + CA0106_HCFG);
sound/pci/ca0106/ca0106_main.c
885
reg71 = snd_ca0106_ptr_read(emu, 0x71, 0);
sound/pci/ca0106/ca0106_main.c
887
snd_ca0106_ptr_write(emu, 0x71, 0, reg71);
sound/pci/ca0106/ca0106_main.c
888
if (emu->details->i2c_adc == 1) { /* The SB0410 and SB0413 use I2C to control ADC. */
sound/pci/ca0106/ca0106_main.c
889
snd_ca0106_i2c_write(emu, ADC_MASTER, over_sampling); /* Adjust the over sampler to better suit the capture rate. */
sound/pci/ca0106/ca0106_main.c
901
snd_ca0106_ptr_write(emu, 0x13, channel, 0);
sound/pci/ca0106/ca0106_main.c
902
snd_ca0106_ptr_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr);
sound/pci/ca0106/ca0106_main.c
903
snd_ca0106_ptr_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_size)<<16); // buffer size in bytes
sound/pci/ca0106/ca0106_main.c
904
snd_ca0106_ptr_write(emu, CAPTURE_POINTER, channel, 0);
sound/pci/ca0106/ca0106_main.c
913
struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
sound/pci/ca0106/ca0106_main.c
936
if (snd_pcm_substream_chip(s) != emu ||
sound/pci/ca0106/ca0106_main.c
953
bits = snd_ca0106_ptr_read(emu, EXTENDED_INT_MASK, 0);
sound/pci/ca0106/ca0106_main.c
955
snd_ca0106_ptr_write(emu, EXTENDED_INT_MASK, 0, bits);
sound/pci/ca0106/ca0106_main.c
956
bits = snd_ca0106_ptr_read(emu, BASIC_INTERRUPT, 0);
sound/pci/ca0106/ca0106_main.c
958
snd_ca0106_ptr_write(emu, BASIC_INTERRUPT, 0, bits);
sound/pci/ca0106/ca0106_main.c
962
bits = snd_ca0106_ptr_read(emu, BASIC_INTERRUPT, 0);
sound/pci/ca0106/ca0106_main.c
964
snd_ca0106_ptr_write(emu, BASIC_INTERRUPT, 0, bits);
sound/pci/ca0106/ca0106_main.c
965
bits = snd_ca0106_ptr_read(emu, EXTENDED_INT_MASK, 0);
sound/pci/ca0106/ca0106_main.c
967
snd_ca0106_ptr_write(emu, EXTENDED_INT_MASK, 0, bits);
sound/pci/ca0106/ca0106_main.c
980
struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
sound/pci/ca0106/ca0106_main.c
988
snd_ca0106_ptr_write(emu, EXTENDED_INT_MASK, 0, snd_ca0106_ptr_read(emu, EXTENDED_INT_MASK, 0) | (0x110000<<channel));
sound/pci/ca0106/ca0106_main.c
989
snd_ca0106_ptr_write(emu, BASIC_INTERRUPT, 0, snd_ca0106_ptr_read(emu, BASIC_INTERRUPT, 0)|(0x100<<channel));
sound/pci/ca0106/ca0106_main.c
993
snd_ca0106_ptr_write(emu, BASIC_INTERRUPT, 0, snd_ca0106_ptr_read(emu, BASIC_INTERRUPT, 0) & ~(0x100<<channel));
sound/pci/ca0106/ca0106_main.c
994
snd_ca0106_ptr_write(emu, EXTENDED_INT_MASK, 0, snd_ca0106_ptr_read(emu, EXTENDED_INT_MASK, 0) & ~(0x110000<<channel));
sound/pci/ca0106/ca0106_mixer.c
102
snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */
sound/pci/ca0106/ca0106_mixer.c
103
ngain = emu->i2c_capture_volume[val][0]; /* Left */
sound/pci/ca0106/ca0106_mixer.c
104
ogain = emu->i2c_capture_volume[emu->i2c_capture_source][0]; /* Left */
sound/pci/ca0106/ca0106_mixer.c
106
snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ngain & 0xff);
sound/pci/ca0106/ca0106_mixer.c
107
ngain = emu->i2c_capture_volume[val][1]; /* Right */
sound/pci/ca0106/ca0106_mixer.c
108
ogain = emu->i2c_capture_volume[emu->i2c_capture_source][1]; /* Right */
sound/pci/ca0106/ca0106_mixer.c
110
snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ngain & 0xff);
sound/pci/ca0106/ca0106_mixer.c
112
snd_ca0106_i2c_write(emu, ADC_MUX, source); /* Set source */
sound/pci/ca0106/ca0106_mixer.c
113
emu->i2c_capture_source = val;
sound/pci/ca0106/ca0106_mixer.c
116
static void ca0106_set_capture_mic_line_in(struct snd_ca0106 *emu)
sound/pci/ca0106/ca0106_mixer.c
120
if (emu->capture_mic_line_in) {
sound/pci/ca0106/ca0106_mixer.c
122
tmp = inl(emu->port + CA0106_GPIO) & ~0x400;
sound/pci/ca0106/ca0106_mixer.c
124
outl(tmp, emu->port + CA0106_GPIO);
sound/pci/ca0106/ca0106_mixer.c
128
tmp = inl(emu->port + CA0106_GPIO) & ~0x400;
sound/pci/ca0106/ca0106_mixer.c
129
outl(tmp, emu->port + CA0106_GPIO);
sound/pci/ca0106/ca0106_mixer.c
134
static void ca0106_set_spdif_bits(struct snd_ca0106 *emu, int idx)
sound/pci/ca0106/ca0106_mixer.c
136
snd_ca0106_ptr_write(emu, SPCS0 + idx, 0, emu->spdif_str_bits[idx]);
sound/pci/ca0106/ca0106_mixer.c
149
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
151
ucontrol->value.integer.value[0] = emu->spdif_enable;
sound/pci/ca0106/ca0106_mixer.c
158
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
163
change = (emu->spdif_enable != val);
sound/pci/ca0106/ca0106_mixer.c
165
emu->spdif_enable = val;
sound/pci/ca0106/ca0106_mixer.c
166
ca0106_spdif_enable(emu);
sound/pci/ca0106/ca0106_mixer.c
184
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
186
ucontrol->value.enumerated.item[0] = emu->capture_source;
sound/pci/ca0106/ca0106_mixer.c
193
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
200
change = (emu->capture_source != val);
sound/pci/ca0106/ca0106_mixer.c
202
emu->capture_source = val;
sound/pci/ca0106/ca0106_mixer.c
203
ca0106_set_capture_source(emu);
sound/pci/ca0106/ca0106_mixer.c
221
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
223
ucontrol->value.enumerated.item[0] = emu->i2c_capture_source;
sound/pci/ca0106/ca0106_mixer.c
230
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
240
change = (emu->i2c_capture_source != source_id);
sound/pci/ca0106/ca0106_mixer.c
242
ca0106_set_i2c_capture_source(emu, source_id, 0);
sound/pci/ca0106/ca0106_mixer.c
266
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
268
ucontrol->value.enumerated.item[0] = emu->capture_mic_line_in;
sound/pci/ca0106/ca0106_mixer.c
275
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
282
change = (emu->capture_mic_line_in != val);
sound/pci/ca0106/ca0106_mixer.c
284
emu->capture_mic_line_in = val;
sound/pci/ca0106/ca0106_mixer.c
285
ca0106_set_capture_mic_line_in(emu);
sound/pci/ca0106/ca0106_mixer.c
328
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
332
emu->spdif_bits[idx]);
sound/pci/ca0106/ca0106_mixer.c
339
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
343
emu->spdif_str_bits[idx]);
sound/pci/ca0106/ca0106_mixer.c
368
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
373
if (val != emu->spdif_bits[idx]) {
sound/pci/ca0106/ca0106_mixer.c
374
emu->spdif_bits[idx] = val;
sound/pci/ca0106/ca0106_mixer.c
378
emu->spdif_str_bits[idx] = val;
sound/pci/ca0106/ca0106_mixer.c
379
ca0106_set_spdif_bits(emu, idx);
sound/pci/ca0106/ca0106_mixer.c
388
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
393
if (val != emu->spdif_str_bits[idx]) {
sound/pci/ca0106/ca0106_mixer.c
394
emu->spdif_str_bits[idx] = val;
sound/pci/ca0106/ca0106_mixer.c
395
ca0106_set_spdif_bits(emu, idx);
sound/pci/ca0106/ca0106_mixer.c
414
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
421
value = snd_ca0106_ptr_read(emu, reg, channel_id);
sound/pci/ca0106/ca0106_mixer.c
430
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
437
oval = snd_ca0106_ptr_read(emu, reg, channel_id);
sound/pci/ca0106/ca0106_mixer.c
444
snd_ca0106_ptr_write(emu, reg, channel_id, nval);
sound/pci/ca0106/ca0106_mixer.c
461
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
466
ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0];
sound/pci/ca0106/ca0106_mixer.c
467
ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1];
sound/pci/ca0106/ca0106_mixer.c
474
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
481
ogain = emu->i2c_capture_volume[source_id][0]; /* Left */
sound/pci/ca0106/ca0106_mixer.c
486
if (emu->i2c_capture_source == source_id)
sound/pci/ca0106/ca0106_mixer.c
487
snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) );
sound/pci/ca0106/ca0106_mixer.c
488
emu->i2c_capture_volume[source_id][0] = ucontrol->value.integer.value[0];
sound/pci/ca0106/ca0106_mixer.c
491
ogain = emu->i2c_capture_volume[source_id][1]; /* Right */
sound/pci/ca0106/ca0106_mixer.c
496
if (emu->i2c_capture_source == source_id)
sound/pci/ca0106/ca0106_mixer.c
497
snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff));
sound/pci/ca0106/ca0106_mixer.c
498
emu->i2c_capture_volume[source_id][1] = ucontrol->value.integer.value[1];
sound/pci/ca0106/ca0106_mixer.c
510
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
514
ucontrol->value.integer.value[0] = !(emu->spi_dac_reg[reg] & bit);
sound/pci/ca0106/ca0106_mixer.c
521
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/ca0106/ca0106_mixer.c
526
ret = emu->spi_dac_reg[reg] & bit;
sound/pci/ca0106/ca0106_mixer.c
530
emu->spi_dac_reg[reg] &= ~bit;
sound/pci/ca0106/ca0106_mixer.c
534
emu->spi_dac_reg[reg] |= bit;
sound/pci/ca0106/ca0106_mixer.c
537
ret = snd_ca0106_spi_write(emu, emu->spi_dac_reg[reg]);
sound/pci/ca0106/ca0106_mixer.c
63
static void ca0106_spdif_enable(struct snd_ca0106 *emu)
sound/pci/ca0106/ca0106_mixer.c
67
if (emu->spdif_enable) {
sound/pci/ca0106/ca0106_mixer.c
69
snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf);
sound/pci/ca0106/ca0106_mixer.c
70
snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x0b000000);
sound/pci/ca0106/ca0106_mixer.c
71
val = snd_ca0106_ptr_read(emu, CAPTURE_CONTROL, 0) & ~0x1000;
sound/pci/ca0106/ca0106_mixer.c
719
#define ADD_CTLS(emu, ctls) \
sound/pci/ca0106/ca0106_mixer.c
72
snd_ca0106_ptr_write(emu, CAPTURE_CONTROL, 0, val);
sound/pci/ca0106/ca0106_mixer.c
723
_err = snd_ctl_add(card, snd_ctl_new1(&ctls[i], emu)); \
sound/pci/ca0106/ca0106_mixer.c
73
val = inl(emu->port + CA0106_GPIO) & ~0x101;
sound/pci/ca0106/ca0106_mixer.c
74
outl(val, emu->port + CA0106_GPIO);
sound/pci/ca0106/ca0106_mixer.c
754
int snd_ca0106_mixer(struct snd_ca0106 *emu)
sound/pci/ca0106/ca0106_mixer.c
757
struct snd_card *card = emu->card;
sound/pci/ca0106/ca0106_mixer.c
78
snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf);
sound/pci/ca0106/ca0106_mixer.c
79
snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x000f0000);
sound/pci/ca0106/ca0106_mixer.c
80
val = snd_ca0106_ptr_read(emu, CAPTURE_CONTROL, 0) | 0x1000;
sound/pci/ca0106/ca0106_mixer.c
804
ADD_CTLS(emu, snd_ca0106_volume_ctls);
sound/pci/ca0106/ca0106_mixer.c
805
if (emu->details->i2c_adc == 1) {
sound/pci/ca0106/ca0106_mixer.c
806
ADD_CTLS(emu, snd_ca0106_volume_i2c_adc_ctls);
sound/pci/ca0106/ca0106_mixer.c
807
if (emu->details->gpio_type == 1)
sound/pci/ca0106/ca0106_mixer.c
808
err = snd_ctl_add(card, snd_ctl_new1(&snd_ca0106_capture_mic_line_in, emu));
sound/pci/ca0106/ca0106_mixer.c
81
snd_ca0106_ptr_write(emu, CAPTURE_CONTROL, 0, val);
sound/pci/ca0106/ca0106_mixer.c
810
err = snd_ctl_add(card, snd_ctl_new1(&snd_ca0106_capture_line_in_side_out, emu));
sound/pci/ca0106/ca0106_mixer.c
814
if (emu->details->spi_dac) {
sound/pci/ca0106/ca0106_mixer.c
818
ctl = snd_ca0106_volume_spi_dac_ctl(emu->details, i);
sound/pci/ca0106/ca0106_mixer.c
82
val = inl(emu->port + CA0106_GPIO) | 0x101;
sound/pci/ca0106/ca0106_mixer.c
821
err = snd_ctl_add(card, snd_ctl_new1(&ctl, emu));
sound/pci/ca0106/ca0106_mixer.c
83
outl(val, emu->port + CA0106_GPIO);
sound/pci/ca0106/ca0106_mixer.c
839
if (emu->details->spi_dac) {
sound/pci/ca0106/ca0106_mixer.c
87
static void ca0106_set_capture_source(struct snd_ca0106 *emu)
sound/pci/ca0106/ca0106_mixer.c
89
unsigned int val = emu->capture_source;
sound/pci/ca0106/ca0106_mixer.c
92
mask = snd_ca0106_ptr_read(emu, CAPTURE_SOURCE, 0) & 0xffff;
sound/pci/ca0106/ca0106_mixer.c
93
snd_ca0106_ptr_write(emu, CAPTURE_SOURCE, 0, source | mask);
sound/pci/ca0106/ca0106_mixer.c
96
static void ca0106_set_i2c_capture_source(struct snd_ca0106 *emu,
sound/pci/ca0106/ca0106_proc.c
261
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
264
value = snd_ca0106_ptr_read(emu, SAMPLE_RATE_TRACKER_STATUS, 0);
sound/pci/ca0106/ca0106_proc.c
273
value = snd_ca0106_ptr_read(emu, SPDIF_INPUT_STATUS, 0);
sound/pci/ca0106/ca0106_proc.c
283
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
290
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/ca0106/ca0106_proc.c
291
outl(val, emu->port + (reg & 0xfffffffc));
sound/pci/ca0106/ca0106_proc.c
299
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
305
scoped_guard(spinlock_irqsave, &emu->emu_lock) {
sound/pci/ca0106/ca0106_proc.c
306
value = inl(emu->port + i);
sound/pci/ca0106/ca0106_proc.c
315
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
321
scoped_guard(spinlock_irqsave, &emu->emu_lock) {
sound/pci/ca0106/ca0106_proc.c
322
value = inw(emu->port + i);
sound/pci/ca0106/ca0106_proc.c
331
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
337
scoped_guard(spinlock_irqsave, &emu->emu_lock) {
sound/pci/ca0106/ca0106_proc.c
338
value = inb(emu->port + i);
sound/pci/ca0106/ca0106_proc.c
347
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
355
value = snd_ca0106_ptr_read(emu, i, j);
sound/pci/ca0106/ca0106_proc.c
365
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
373
value = snd_ca0106_ptr_read(emu, i, j);
sound/pci/ca0106/ca0106_proc.c
383
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
390
snd_ca0106_ptr_write(emu, reg, channel_id, val);
sound/pci/ca0106/ca0106_proc.c
397
struct snd_ca0106 *emu = entry->private_data;
sound/pci/ca0106/ca0106_proc.c
404
snd_ca0106_i2c_write(emu, reg, val);
sound/pci/ca0106/ca0106_proc.c
409
int snd_ca0106_proc_init(struct snd_ca0106 *emu)
sound/pci/ca0106/ca0106_proc.c
411
snd_card_ro_proc_new(emu->card, "iec958", emu, snd_ca0106_proc_iec958);
sound/pci/ca0106/ca0106_proc.c
412
snd_card_rw_proc_new(emu->card, "ca0106_reg32", emu,
sound/pci/ca0106/ca0106_proc.c
415
snd_card_ro_proc_new(emu->card, "ca0106_reg16", emu,
sound/pci/ca0106/ca0106_proc.c
417
snd_card_ro_proc_new(emu->card, "ca0106_reg8", emu,
sound/pci/ca0106/ca0106_proc.c
419
snd_card_rw_proc_new(emu->card, "ca0106_regs1", emu,
sound/pci/ca0106/ca0106_proc.c
422
snd_card_rw_proc_new(emu->card, "ca0106_i2c", emu, NULL,
sound/pci/ca0106/ca0106_proc.c
424
snd_card_ro_proc_new(emu->card, "ca0106_regs2", emu,
sound/pci/emu10k1/emu10k1.c
102
err = snd_emu10k1_pcm(emu, 0);
sound/pci/emu10k1/emu10k1.c
105
if (emu->card_capabilities->ac97_chip) {
sound/pci/emu10k1/emu10k1.c
106
err = snd_emu10k1_pcm_mic(emu, 1);
sound/pci/emu10k1/emu10k1.c
110
err = snd_emu10k1_pcm_efx(emu, 2);
sound/pci/emu10k1/emu10k1.c
114
if (emu->card_capabilities->ca0151_chip) { /* P16V */
sound/pci/emu10k1/emu10k1.c
115
emu->p16v_buffer =
sound/pci/emu10k1/emu10k1.c
117
if (!emu->p16v_buffer)
sound/pci/emu10k1/emu10k1.c
121
err = snd_emu10k1_mixer(emu, 0, 3);
sound/pci/emu10k1/emu10k1.c
125
err = snd_emu10k1_timer(emu, 0);
sound/pci/emu10k1/emu10k1.c
129
err = snd_emu10k1_pcm_multi(emu, 3);
sound/pci/emu10k1/emu10k1.c
132
if (emu->card_capabilities->ca0151_chip) { /* P16V */
sound/pci/emu10k1/emu10k1.c
133
err = snd_p16v_pcm(emu, 4);
sound/pci/emu10k1/emu10k1.c
137
if (emu->audigy) {
sound/pci/emu10k1/emu10k1.c
138
err = snd_emu10k1_audigy_midi(emu);
sound/pci/emu10k1/emu10k1.c
142
err = snd_emu10k1_midi(emu);
sound/pci/emu10k1/emu10k1.c
146
err = snd_emu10k1_fx8010_new(emu, 0);
sound/pci/emu10k1/emu10k1.c
153
dev_warn(emu->card->dev,
sound/pci/emu10k1/emu10k1.c
159
arg->hwptr = emu;
sound/pci/emu10k1/emu10k1.c
166
strscpy(card->driver, emu->card_capabilities->driver,
sound/pci/emu10k1/emu10k1.c
168
strscpy(card->shortname, emu->card_capabilities->name,
sound/pci/emu10k1/emu10k1.c
172
card->shortname, emu->revision, emu->serial, emu->port, emu->irq);
sound/pci/emu10k1/emu10k1.c
187
struct snd_emu10k1 *emu = card->private_data;
sound/pci/emu10k1/emu10k1.c
191
emu->suspend = 1;
sound/pci/emu10k1/emu10k1.c
193
cancel_work_sync(&emu->emu1010.work);
sound/pci/emu10k1/emu10k1.c
195
snd_ac97_suspend(emu->ac97);
sound/pci/emu10k1/emu10k1.c
197
snd_emu10k1_efx_suspend(emu);
sound/pci/emu10k1/emu10k1.c
198
snd_emu10k1_suspend_regs(emu);
sound/pci/emu10k1/emu10k1.c
199
if (emu->card_capabilities->ca0151_chip)
sound/pci/emu10k1/emu10k1.c
200
snd_p16v_suspend(emu);
sound/pci/emu10k1/emu10k1.c
202
snd_emu10k1_done(emu);
sound/pci/emu10k1/emu10k1.c
209
struct snd_emu10k1 *emu = card->private_data;
sound/pci/emu10k1/emu10k1.c
211
snd_emu10k1_resume_init(emu);
sound/pci/emu10k1/emu10k1.c
212
snd_emu10k1_efx_resume(emu);
sound/pci/emu10k1/emu10k1.c
213
snd_ac97_resume(emu->ac97);
sound/pci/emu10k1/emu10k1.c
214
snd_emu10k1_resume_regs(emu);
sound/pci/emu10k1/emu10k1.c
216
if (emu->card_capabilities->ca0151_chip)
sound/pci/emu10k1/emu10k1.c
217
snd_p16v_resume(emu);
sound/pci/emu10k1/emu10k1.c
219
emu->suspend = 0;
sound/pci/emu10k1/emu10k1.c
74
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emu10k1.c
88
sizeof(*emu), &card);
sound/pci/emu10k1/emu10k1.c
91
emu = card->private_data;
sound/pci/emu10k1/emu10k1_callback.c
102
vp->emu->num_voices--;
sound/pci/emu10k1/emu10k1_callback.c
171
vp->emu->num_voices--;
sound/pci/emu10k1/emu10k1_callback.c
210
lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw,
sound/pci/emu10k1/emu10k1_callback.c
226
for (i = 0; i < emu->max_voices; i++) {
sound/pci/emu10k1/emu10k1_callback.c
229
vp = &emu->voices[i];
sound/pci/emu10k1/emu10k1_callback.c
276
get_voice(struct snd_emux *emu, struct snd_emux_port *port)
sound/pci/emu10k1/emu10k1_callback.c
283
hw = emu->hw;
sound/pci/emu10k1/emu10k1_callback.c
285
lookup_voices(emu, hw, best, 0);
sound/pci/emu10k1/emu10k1_callback.c
288
vp = &emu->voices[best[i].voice];
sound/pci/emu10k1/emu10k1_callback.c
295
emu->num_voices++;
sound/pci/emu10k1/emu10k1_callback.c
38
static int get_pitch_shift(struct snd_emux *emu);
sound/pci/emu10k1/emu10k1_callback.c
516
static int get_pitch_shift(struct snd_emux *emu)
sound/pci/emu10k1/emu10k1_callback.c
518
struct snd_emu10k1 *hw = emu->hw;
sound/pci/emu10k1/emu10k1_callback.c
82
struct snd_emux *emu;
sound/pci/emu10k1/emu10k1_callback.c
87
emu = hw->synth;
sound/pci/emu10k1/emu10k1_callback.c
89
lookup_voices(emu, hw, best, 1); /* no OFF voices */
sound/pci/emu10k1/emu10k1_callback.c
93
vp = &emu->voices[best[i].voice];
sound/pci/emu10k1/emu10k1_main.c
138
static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir)
sound/pci/emu10k1/emu10k1_main.c
1443
static void snd_emu10k1_detect_iommu(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
1447
emu->iommu_workaround = false;
sound/pci/emu10k1/emu10k1_main.c
1449
domain = iommu_get_domain_for_dev(emu->card->dev);
sound/pci/emu10k1/emu10k1_main.c
1453
dev_notice(emu->card->dev,
sound/pci/emu10k1/emu10k1_main.c
1455
emu->iommu_workaround = true;
sound/pci/emu10k1/emu10k1_main.c
146
HCFG_MUTEBUTTONENABLE, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
1466
struct snd_emu10k1 *emu = card->private_data;
sound/pci/emu10k1/emu10k1_main.c
148
outl(0, emu->port + INTE);
sound/pci/emu10k1/emu10k1_main.c
1480
emu->card = card;
sound/pci/emu10k1/emu10k1_main.c
1481
spin_lock_init(&emu->reg_lock);
sound/pci/emu10k1/emu10k1_main.c
1482
spin_lock_init(&emu->emu_lock);
sound/pci/emu10k1/emu10k1_main.c
1483
spin_lock_init(&emu->spi_lock);
sound/pci/emu10k1/emu10k1_main.c
1484
spin_lock_init(&emu->i2c_lock);
sound/pci/emu10k1/emu10k1_main.c
1485
spin_lock_init(&emu->voice_lock);
sound/pci/emu10k1/emu10k1_main.c
1486
spin_lock_init(&emu->synth_lock);
sound/pci/emu10k1/emu10k1_main.c
1487
spin_lock_init(&emu->memblk_lock);
sound/pci/emu10k1/emu10k1_main.c
1488
mutex_init(&emu->fx8010.lock);
sound/pci/emu10k1/emu10k1_main.c
1489
INIT_LIST_HEAD(&emu->mapped_link_head);
sound/pci/emu10k1/emu10k1_main.c
1490
INIT_LIST_HEAD(&emu->mapped_order_link_head);
sound/pci/emu10k1/emu10k1_main.c
1491
emu->pci = pci;
sound/pci/emu10k1/emu10k1_main.c
1492
emu->irq = -1;
sound/pci/emu10k1/emu10k1_main.c
1493
emu->synth = NULL;
sound/pci/emu10k1/emu10k1_main.c
1494
emu->get_synth_voice = NULL;
sound/pci/emu10k1/emu10k1_main.c
1495
INIT_WORK(&emu->emu1010.work, emu1010_work);
sound/pci/emu10k1/emu10k1_main.c
1496
mutex_init(&emu->emu1010.lock);
sound/pci/emu10k1/emu10k1_main.c
1498
emu->revision = pci->revision;
sound/pci/emu10k1/emu10k1_main.c
1499
pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &emu->serial);
sound/pci/emu10k1/emu10k1_main.c
150
snd_emu10k1_ptr_write_multiple(emu, 0,
sound/pci/emu10k1/emu10k1_main.c
1500
pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &emu->model);
sound/pci/emu10k1/emu10k1_main.c
1503
pci->vendor, pci->device, emu->serial, emu->model);
sound/pci/emu10k1/emu10k1_main.c
1513
if (c->subsystem && (c->subsystem != emu->serial))
sound/pci/emu10k1/emu10k1_main.c
1515
if (c->revision && c->revision != emu->revision)
sound/pci/emu10k1/emu10k1_main.c
1525
emu->card_capabilities = c;
sound/pci/emu10k1/emu10k1_main.c
1532
pci->vendor, pci->device, emu->serial, c->subsystem);
sound/pci/emu10k1/emu10k1_main.c
1537
emu->serial);
sound/pci/emu10k1/emu10k1_main.c
1542
is_audigy = emu->audigy = c->emu10k2_chip;
sound/pci/emu10k1/emu10k1_main.c
1544
snd_emu10k1_detect_iommu(emu);
sound/pci/emu10k1/emu10k1_main.c
1547
emu->address_mode = is_audigy ? 0 : 1;
sound/pci/emu10k1/emu10k1_main.c
1549
emu->dma_mask = emu->address_mode ? EMU10K1_DMA_MASK : AUDIGY_DMA_MASK;
sound/pci/emu10k1/emu10k1_main.c
1550
if (dma_set_mask_and_coherent(&pci->dev, emu->dma_mask) < 0) {
sound/pci/emu10k1/emu10k1_main.c
1553
emu->dma_mask);
sound/pci/emu10k1/emu10k1_main.c
1557
emu->gpr_base = A_FXGPREGBASE;
sound/pci/emu10k1/emu10k1_main.c
1559
emu->gpr_base = FXGPREGBASE;
sound/pci/emu10k1/emu10k1_main.c
1564
emu->port = pci_resource_start(pci, 0);
sound/pci/emu10k1/emu10k1_main.c
1566
emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT;
sound/pci/emu10k1/emu10k1_main.c
1568
page_table_size = sizeof(u32) * (emu->address_mode ? MAXPAGES1 :
sound/pci/emu10k1/emu10k1_main.c
1570
if (snd_emu10k1_alloc_pages_maybe_wider(emu, page_table_size,
sound/pci/emu10k1/emu10k1_main.c
1571
&emu->ptb_pages) < 0)
sound/pci/emu10k1/emu10k1_main.c
1574
(unsigned long)emu->ptb_pages.addr,
sound/pci/emu10k1/emu10k1_main.c
1575
(unsigned long)(emu->ptb_pages.addr + emu->ptb_pages.bytes));
sound/pci/emu10k1/emu10k1_main.c
1577
emu->page_ptr_table = vmalloc(array_size(sizeof(void *),
sound/pci/emu10k1/emu10k1_main.c
1578
emu->max_cache_pages));
sound/pci/emu10k1/emu10k1_main.c
1579
emu->page_addr_table = vmalloc(array_size(sizeof(unsigned long),
sound/pci/emu10k1/emu10k1_main.c
1580
emu->max_cache_pages));
sound/pci/emu10k1/emu10k1_main.c
1581
if (!emu->page_ptr_table || !emu->page_addr_table)
sound/pci/emu10k1/emu10k1_main.c
1584
if (snd_emu10k1_alloc_pages_maybe_wider(emu, EMUPAGESIZE,
sound/pci/emu10k1/emu10k1_main.c
1585
&emu->silent_page) < 0)
sound/pci/emu10k1/emu10k1_main.c
1588
(unsigned long)emu->silent_page.addr,
sound/pci/emu10k1/emu10k1_main.c
1589
(unsigned long)(emu->silent_page.addr +
sound/pci/emu10k1/emu10k1_main.c
1590
emu->silent_page.bytes));
sound/pci/emu10k1/emu10k1_main.c
1592
emu->memhdr = snd_util_memhdr_new(emu->max_cache_pages * PAGE_SIZE);
sound/pci/emu10k1/emu10k1_main.c
1593
if (!emu->memhdr)
sound/pci/emu10k1/emu10k1_main.c
1595
emu->memhdr->block_extra_size = sizeof(struct snd_emu10k1_memblk) -
sound/pci/emu10k1/emu10k1_main.c
1606
emu->fx8010.extin_mask = extin_mask;
sound/pci/emu10k1/emu10k1_main.c
1607
emu->fx8010.extout_mask = extout_mask;
sound/pci/emu10k1/emu10k1_main.c
1608
emu->enable_ir = enable_ir;
sound/pci/emu10k1/emu10k1_main.c
1610
if (emu->card_capabilities->ca_cardbus_chip) {
sound/pci/emu10k1/emu10k1_main.c
1611
err = snd_emu10k1_cardbus_init(emu);
sound/pci/emu10k1/emu10k1_main.c
1615
if (emu->card_capabilities->ecard) {
sound/pci/emu10k1/emu10k1_main.c
1616
err = snd_emu10k1_ecard_init(emu);
sound/pci/emu10k1/emu10k1_main.c
1619
} else if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emu10k1_main.c
1620
err = snd_emu10k1_emu1010_init(emu);
sound/pci/emu10k1/emu10k1_main.c
1626
snd_emu10k1_ptr_write(emu, AC97SLOT, 0,
sound/pci/emu10k1/emu10k1_main.c
1631
emu->fx8010.itram_size = (16 * 1024)/2;
sound/pci/emu10k1/emu10k1_main.c
1632
emu->fx8010.etram_pages.area = NULL;
sound/pci/emu10k1/emu10k1_main.c
1633
emu->fx8010.etram_pages.bytes = 0;
sound/pci/emu10k1/emu10k1_main.c
1637
IRQF_SHARED, KBUILD_MODNAME, emu))
sound/pci/emu10k1/emu10k1_main.c
1639
emu->irq = pci->irq;
sound/pci/emu10k1/emu10k1_main.c
1640
card->sync_irq = emu->irq;
sound/pci/emu10k1/emu10k1_main.c
1656
emu->spdif_bits[0] = emu->spdif_bits[1] =
sound/pci/emu10k1/emu10k1_main.c
1657
emu->spdif_bits[2] = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
sound/pci/emu10k1/emu10k1_main.c
1663
memset(emu->silent_page.area, 0, emu->silent_page.bytes);
sound/pci/emu10k1/emu10k1_main.c
1664
silent_page = emu->silent_page.addr << emu->address_mode;
sound/pci/emu10k1/emu10k1_main.c
1665
pgtbl = (__le32 *)emu->ptb_pages.area;
sound/pci/emu10k1/emu10k1_main.c
1666
for (idx = 0; idx < (emu->address_mode ? MAXPAGES1 : MAXPAGES0); idx++)
sound/pci/emu10k1/emu10k1_main.c
1671
emu->voices[idx].number = idx;
sound/pci/emu10k1/emu10k1_main.c
1673
err = snd_emu10k1_init(emu, enable_ir);
sound/pci/emu10k1/emu10k1_main.c
1677
err = alloc_pm_buffer(emu);
sound/pci/emu10k1/emu10k1_main.c
1683
err = snd_emu10k1_init_efx(emu);
sound/pci/emu10k1/emu10k1_main.c
1686
snd_emu10k1_audio_enable(emu);
sound/pci/emu10k1/emu10k1_main.c
1689
snd_emu10k1_proc_init(emu);
sound/pci/emu10k1/emu10k1_main.c
169
if (emu->audigy) {
sound/pci/emu10k1/emu10k1_main.c
171
snd_emu10k1_ptr_write(emu, SPBYPASS, 0, SPBYPASS_FORMAT);
sound/pci/emu10k1/emu10k1_main.c
1710
static int alloc_pm_buffer(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
1715
if (emu->audigy)
sound/pci/emu10k1/emu10k1_main.c
1717
emu->saved_ptr = vmalloc(array3_size(4, NUM_G, size));
sound/pci/emu10k1/emu10k1_main.c
1718
if (!emu->saved_ptr)
sound/pci/emu10k1/emu10k1_main.c
1720
if (snd_emu10k1_efx_alloc_pm_buffer(emu) < 0)
sound/pci/emu10k1/emu10k1_main.c
1722
if (emu->card_capabilities->ca0151_chip &&
sound/pci/emu10k1/emu10k1_main.c
1723
snd_p16v_alloc_pm_buffer(emu) < 0)
sound/pci/emu10k1/emu10k1_main.c
1728
static void free_pm_buffer(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
173
snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_REAR_RIGHT |
sound/pci/emu10k1/emu10k1_main.c
1730
vfree(emu->saved_ptr);
sound/pci/emu10k1/emu10k1_main.c
1731
snd_emu10k1_efx_free_pm_buffer(emu);
sound/pci/emu10k1/emu10k1_main.c
1732
if (emu->card_capabilities->ca0151_chip)
sound/pci/emu10k1/emu10k1_main.c
1733
snd_p16v_free_pm_buffer(emu);
sound/pci/emu10k1/emu10k1_main.c
1736
void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
1742
val = emu->saved_ptr;
sound/pci/emu10k1/emu10k1_main.c
1745
*val = snd_emu10k1_ptr_read(emu, *reg, i);
sound/pci/emu10k1/emu10k1_main.c
1746
if (emu->audigy) {
sound/pci/emu10k1/emu10k1_main.c
1749
*val = snd_emu10k1_ptr_read(emu, *reg, i);
sound/pci/emu10k1/emu10k1_main.c
1751
if (emu->audigy)
sound/pci/emu10k1/emu10k1_main.c
1752
emu->saved_a_iocfg = inw(emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
1753
emu->saved_hcfg = inl(emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
1756
void snd_emu10k1_resume_init(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
1758
if (emu->card_capabilities->ca_cardbus_chip)
sound/pci/emu10k1/emu10k1_main.c
1759
snd_emu10k1_cardbus_init(emu);
sound/pci/emu10k1/emu10k1_main.c
1760
if (emu->card_capabilities->ecard)
sound/pci/emu10k1/emu10k1_main.c
1761
snd_emu10k1_ecard_init(emu);
sound/pci/emu10k1/emu10k1_main.c
1762
else if (emu->card_capabilities->emu_model)
sound/pci/emu10k1/emu10k1_main.c
1763
snd_emu10k1_emu1010_init(emu);
sound/pci/emu10k1/emu10k1_main.c
1765
snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE);
sound/pci/emu10k1/emu10k1_main.c
1766
snd_emu10k1_init(emu, emu->enable_ir);
sound/pci/emu10k1/emu10k1_main.c
1769
void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
1775
snd_emu10k1_audio_enable(emu);
sound/pci/emu10k1/emu10k1_main.c
1778
if (emu->audigy)
sound/pci/emu10k1/emu10k1_main.c
1779
outw(emu->saved_a_iocfg, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
1780
outl(emu->saved_hcfg, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
1782
val = emu->saved_ptr;
sound/pci/emu10k1/emu10k1_main.c
1785
snd_emu10k1_ptr_write(emu, *reg, i, *val);
sound/pci/emu10k1/emu10k1_main.c
1786
if (emu->audigy) {
sound/pci/emu10k1/emu10k1_main.c
1789
snd_emu10k1_ptr_write(emu, *reg, i, *val);
sound/pci/emu10k1/emu10k1_main.c
179
snd_emu10k1_voice_init(emu, ch);
sound/pci/emu10k1/emu10k1_main.c
181
snd_emu10k1_ptr_write_multiple(emu, 0,
sound/pci/emu10k1/emu10k1_main.c
182
SPCS0, emu->spdif_bits[0],
sound/pci/emu10k1/emu10k1_main.c
183
SPCS1, emu->spdif_bits[1],
sound/pci/emu10k1/emu10k1_main.c
184
SPCS2, emu->spdif_bits[2],
sound/pci/emu10k1/emu10k1_main.c
187
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emu10k1_main.c
188
} else if (emu->card_capabilities->ca0151_chip) { /* audigy2 */
sound/pci/emu10k1/emu10k1_main.c
191
snd_emu10k1_ptr_write(emu, A_I2S_CAPTURE_RATE, 0, A_I2S_CAPTURE_96000);
sound/pci/emu10k1/emu10k1_main.c
194
snd_emu10k1_ptr20_write(emu, SRCSel, 0, 0x14);
sound/pci/emu10k1/emu10k1_main.c
197
snd_emu10k1_ptr20_write(emu, SRCMULTI_ENABLE, 0, 0xFFFFFFFF);
sound/pci/emu10k1/emu10k1_main.c
200
outl(0x0201, emu->port + HCFG2);
sound/pci/emu10k1/emu10k1_main.c
202
snd_emu10k1_ptr20_write(emu, CAPTURE_P16V_SOURCE, 0, 0x78e4);
sound/pci/emu10k1/emu10k1_main.c
203
} else if (emu->card_capabilities->ca0108_chip) { /* audigy2 Value */
sound/pci/emu10k1/emu10k1_main.c
205
dev_info(emu->card->dev, "Audigy2 value: Special config.\n");
sound/pci/emu10k1/emu10k1_main.c
207
snd_emu10k1_ptr_write(emu, A_I2S_CAPTURE_RATE, 0, A_I2S_CAPTURE_96000);
sound/pci/emu10k1/emu10k1_main.c
210
snd_emu10k1_ptr20_write(emu, P17V_SRCSel, 0, 0x14);
sound/pci/emu10k1/emu10k1_main.c
213
snd_emu10k1_ptr20_write(emu, P17V_MIXER_I2S_ENABLE, 0, 0xFF000000);
sound/pci/emu10k1/emu10k1_main.c
219
snd_emu10k1_ptr20_write(emu, P17V_MIXER_SPDIF_ENABLE, 0, 0xFF000000);
sound/pci/emu10k1/emu10k1_main.c
221
tmp = inw(emu->port + A_IOCFG) & ~0x8; /* Clear bit 3 */
sound/pci/emu10k1/emu10k1_main.c
222
outw(tmp, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
224
if (emu->card_capabilities->spi_dac) { /* Audigy 2 ZS Notebook with DAC Wolfson WM8768/WM8568 */
sound/pci/emu10k1/emu10k1_main.c
229
snd_emu10k1_spi_write(emu, spi_dac_init[n]);
sound/pci/emu10k1/emu10k1_main.c
231
snd_emu10k1_ptr20_write(emu, 0x60, 0, 0x10);
sound/pci/emu10k1/emu10k1_main.c
242
outw(0x76, emu->port + A_IOCFG); /* Windows uses 0x3f76 */
sound/pci/emu10k1/emu10k1_main.c
244
if (emu->card_capabilities->i2c_adc) { /* Audigy 2 ZS Notebook with ADC Wolfson WM8775 */
sound/pci/emu10k1/emu10k1_main.c
247
snd_emu10k1_ptr20_write(emu, P17V_I2S_SRC_SEL, 0, 0x2020205f);
sound/pci/emu10k1/emu10k1_main.c
248
tmp = inw(emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
249
outw(tmp | 0x4, emu->port + A_IOCFG); /* Set bit 2 for mic input */
sound/pci/emu10k1/emu10k1_main.c
250
tmp = inw(emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
253
snd_emu10k1_i2c_write(emu, i2c_adc_init[n][0], i2c_adc_init[n][1]);
sound/pci/emu10k1/emu10k1_main.c
255
emu->i2c_capture_volume[n][0] = 0xcf;
sound/pci/emu10k1/emu10k1_main.c
256
emu->i2c_capture_volume[n][1] = 0xcf;
sound/pci/emu10k1/emu10k1_main.c
261
snd_emu10k1_ptr_write(emu, PTB, 0, emu->ptb_pages.addr);
sound/pci/emu10k1/emu10k1_main.c
262
snd_emu10k1_ptr_write(emu, TCB, 0, 0); /* taken from original driver */
sound/pci/emu10k1/emu10k1_main.c
263
snd_emu10k1_ptr_write(emu, TCBS, 0, TCBS_BUFFSIZE_256K); /* taken from original driver */
sound/pci/emu10k1/emu10k1_main.c
265
silent_page = (emu->silent_page.addr << emu->address_mode) | (emu->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MASK0);
sound/pci/emu10k1/emu10k1_main.c
267
snd_emu10k1_ptr_write(emu, MAPA, ch, silent_page);
sound/pci/emu10k1/emu10k1_main.c
268
snd_emu10k1_ptr_write(emu, MAPB, ch, silent_page);
sound/pci/emu10k1/emu10k1_main.c
271
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emu10k1_main.c
274
HCFG_AUDIOENABLE, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
282
} else if (emu->audigy) {
sound/pci/emu10k1/emu10k1_main.c
283
if (emu->revision == 4) /* audigy2 */
sound/pci/emu10k1/emu10k1_main.c
287
HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
289
outl(HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
292
} else if (emu->model == 0x20 ||
sound/pci/emu10k1/emu10k1_main.c
293
emu->model == 0xc400 ||
sound/pci/emu10k1/emu10k1_main.c
294
(emu->model == 0x21 && emu->revision < 6))
sound/pci/emu10k1/emu10k1_main.c
295
outl(HCFG_LOCKTANKCACHE_MASK | HCFG_AUTOMUTE, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
298
outl(HCFG_LOCKTANKCACHE_MASK | HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
301
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emu10k1_main.c
303
} else if (emu->card_capabilities->i2c_adc) {
sound/pci/emu10k1/emu10k1_main.c
305
} else if (emu->audigy) {
sound/pci/emu10k1/emu10k1_main.c
306
u16 reg = inw(emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
307
outw(reg | A_IOCFG_GPOUT2, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
309
outw(reg | A_IOCFG_GPOUT1 | A_IOCFG_GPOUT2, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
311
outw(reg, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
313
unsigned int reg = inl(emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
314
outl(reg | HCFG_GPOUT2, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
316
outl(reg | HCFG_GPOUT1 | HCFG_GPOUT2, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
318
outl(reg, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
322
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emu10k1_main.c
324
} else if (emu->card_capabilities->i2c_adc) {
sound/pci/emu10k1/emu10k1_main.c
326
} else if (emu->audigy) { /* enable analog output */
sound/pci/emu10k1/emu10k1_main.c
327
u16 reg = inw(emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
328
outw(reg | A_IOCFG_GPOUT0, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
331
if (emu->address_mode == 0) {
sound/pci/emu10k1/emu10k1_main.c
333
outl(inl(emu->port + HCFG) | HCFG_EXPANDED_MEM, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
339
static void snd_emu10k1_audio_enable(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
344
outl(inl(emu->port + HCFG) | HCFG_AUDIOENABLE, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
347
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emu10k1_main.c
349
} else if (emu->card_capabilities->i2c_adc) {
sound/pci/emu10k1/emu10k1_main.c
351
} else if (emu->audigy) {
sound/pci/emu10k1/emu10k1_main.c
352
outw(inw(emu->port + A_IOCFG) & ~0x44, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
354
if (emu->card_capabilities->ca0151_chip) { /* audigy2 */
sound/pci/emu10k1/emu10k1_main.c
358
outw(inw(emu->port + A_IOCFG) | 0x0040, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
359
} else if (emu->card_capabilities->ca0108_chip) { /* audigy2 value */
sound/pci/emu10k1/emu10k1_main.c
361
outw(inw(emu->port + A_IOCFG) | 0x0060, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
364
outw(inw(emu->port + A_IOCFG) | 0x0080, emu->port + A_IOCFG);
sound/pci/emu10k1/emu10k1_main.c
373
emu->tos_link = 0;
sound/pci/emu10k1/emu10k1_main.c
374
tmp = inl(emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
376
outl(tmp|0x800, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
378
if (tmp != (inl(emu->port + HCFG) & ~0x800)) {
sound/pci/emu10k1/emu10k1_main.c
379
emu->tos_link = 1;
sound/pci/emu10k1/emu10k1_main.c
380
outl(tmp, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
386
if (emu->card_capabilities->emu_model)
sound/pci/emu10k1/emu10k1_main.c
387
snd_emu10k1_intr_enable(emu, INTE_PCIERRORENABLE | INTE_A_GPIOENABLE);
sound/pci/emu10k1/emu10k1_main.c
389
snd_emu10k1_intr_enable(emu, INTE_PCIERRORENABLE);
sound/pci/emu10k1/emu10k1_main.c
392
int snd_emu10k1_done(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
396
outl(0, emu->port + INTE);
sound/pci/emu10k1/emu10k1_main.c
402
snd_emu10k1_ptr_write_multiple(emu, ch,
sound/pci/emu10k1/emu10k1_main.c
412
if (emu->audigy)
sound/pci/emu10k1/emu10k1_main.c
413
snd_emu10k1_ptr_write(emu, A_DBG, 0, A_DBG_SINGLE_STEP);
sound/pci/emu10k1/emu10k1_main.c
415
snd_emu10k1_ptr_write(emu, DBG, 0, EMU10K1_DBG_SINGLE_STEP);
sound/pci/emu10k1/emu10k1_main.c
417
snd_emu10k1_ptr_write_multiple(emu, 0,
sound/pci/emu10k1/emu10k1_main.c
440
outl(HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
50
void snd_emu10k1_voice_init(struct snd_emu10k1 *emu, int ch)
sound/pci/emu10k1/emu10k1_main.c
52
snd_emu10k1_ptr_write_multiple(emu, ch,
sound/pci/emu10k1/emu10k1_main.c
522
static void snd_emu10k1_ecard_write(struct snd_emu10k1 *emu, unsigned int value)
sound/pci/emu10k1/emu10k1_main.c
529
hc_port = emu->port + HCFG;
sound/pci/emu10k1/emu10k1_main.c
560
static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emu10k1_main.c
566
snd_emu10k1_ecard_write(emu, emu->ecard_ctrl & ~EC_TRIM_CSN);
sound/pci/emu10k1/emu10k1_main.c
569
snd_emu10k1_ecard_write(emu, emu->ecard_ctrl & ~EC_TRIM_CSN);
sound/pci/emu10k1/emu10k1_main.c
574
value = emu->ecard_ctrl & ~(EC_TRIM_CSN | EC_TRIM_SDATA);
sound/pci/emu10k1/emu10k1_main.c
580
snd_emu10k1_ecard_write(emu, value);
sound/pci/emu10k1/emu10k1_main.c
581
snd_emu10k1_ecard_write(emu, value | EC_TRIM_SCLK);
sound/pci/emu10k1/emu10k1_main.c
582
snd_emu10k1_ecard_write(emu, value);
sound/pci/emu10k1/emu10k1_main.c
585
snd_emu10k1_ecard_write(emu, emu->ecard_ctrl);
sound/pci/emu10k1/emu10k1_main.c
588
static int snd_emu10k1_ecard_init(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
593
emu->ecard_ctrl = EC_RAW_RUN_MODE |
sound/pci/emu10k1/emu10k1_main.c
599
hc_value = inl(emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
600
outl(hc_value | HCFG_AUDIOENABLE | HCFG_CODECFORMAT_I2S, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
601
inl(emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
604
snd_emu10k1_ecard_write(emu, EC_ADCCAL | EC_LEDN | EC_TRIM_CSN);
sound/pci/emu10k1/emu10k1_main.c
607
snd_emu10k1_ecard_write(emu, EC_DACCAL | EC_LEDN | EC_TRIM_CSN);
sound/pci/emu10k1/emu10k1_main.c
612
snd_emu10k1_wait(emu, 48000);
sound/pci/emu10k1/emu10k1_main.c
617
snd_emu10k1_ecard_write(emu, EC_ADCCAL | EC_LEDN | EC_TRIM_CSN);
sound/pci/emu10k1/emu10k1_main.c
620
snd_emu10k1_ecard_write(emu, emu->ecard_ctrl);
sound/pci/emu10k1/emu10k1_main.c
623
snd_emu10k1_ecard_setadcgain(emu, EC_DEFAULT_ADC_GAIN);
sound/pci/emu10k1/emu10k1_main.c
628
static int snd_emu10k1_cardbus_init(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
636
special_port = emu->port + 0x38;
sound/pci/emu10k1/emu10k1_main.c
649
snd_emu10k1_ptr20_write(emu, TINA2_VOLUME, 0, 0xfefefefe); /* Defaults to 0x30303030 */
sound/pci/emu10k1/emu10k1_main.c
671
static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu, int dock,
sound/pci/emu10k1/emu10k1_main.c
678
filename = firmware_names[emu->card_capabilities->emu_model][dock];
sound/pci/emu10k1/emu10k1_main.c
681
err = request_firmware(fw, filename, &emu->pci->dev);
sound/pci/emu10k1/emu10k1_main.c
686
snd_emu1010_load_firmware_entry(emu, dock, *fw);
sound/pci/emu10k1/emu10k1_main.c
690
static void snd_emu1010_load_dock_firmware(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
701
dev_info(emu->card->dev, "emu1010: Loading Audio Dock Firmware\n");
sound/pci/emu10k1/emu10k1_main.c
702
err = snd_emu1010_load_firmware(emu, 1, &emu->dock_fw);
sound/pci/emu10k1/emu10k1_main.c
705
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, 0);
sound/pci/emu10k1/emu10k1_main.c
707
snd_emu1010_fpga_read(emu, EMU_HANA_ID, &tmp);
sound/pci/emu10k1/emu10k1_main.c
708
dev_dbg(emu->card->dev, "emu1010: EMU_HANA+DOCK_ID = 0x%x\n", tmp);
sound/pci/emu10k1/emu10k1_main.c
711
dev_err(emu->card->dev,
sound/pci/emu10k1/emu10k1_main.c
716
dev_info(emu->card->dev, "emu1010: Audio Dock Firmware loaded\n");
sound/pci/emu10k1/emu10k1_main.c
718
snd_emu1010_fpga_read(emu, EMU_DOCK_MAJOR_REV, &tmp);
sound/pci/emu10k1/emu10k1_main.c
719
snd_emu1010_fpga_read(emu, EMU_DOCK_MINOR_REV, &tmp2);
sound/pci/emu10k1/emu10k1_main.c
720
dev_info(emu->card->dev, "Audio Dock ver: %u.%u\n", tmp, tmp2);
sound/pci/emu10k1/emu10k1_main.c
726
static void emu1010_dock_event(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
730
snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, &reg); /* OPTIONS: Which cards are attached to the EMU */
sound/pci/emu10k1/emu10k1_main.c
733
snd_emu1010_load_dock_firmware(emu);
sound/pci/emu10k1/emu10k1_main.c
735
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE);
sound/pci/emu10k1/emu10k1_main.c
738
dev_info(emu->card->dev, "emu1010: Audio Dock detached\n");
sound/pci/emu10k1/emu10k1_main.c
740
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE);
sound/pci/emu10k1/emu10k1_main.c
744
static void emu1010_clock_event(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
748
scoped_guard(spinlock_irq, &emu->reg_lock) {
sound/pci/emu10k1/emu10k1_main.c
750
emu->emu1010.clock_source = emu->emu1010.clock_fallback;
sound/pci/emu10k1/emu10k1_main.c
751
emu->emu1010.wclock = 1 - emu->emu1010.clock_source;
sound/pci/emu10k1/emu10k1_main.c
752
snd_emu1010_update_clock(emu);
sound/pci/emu10k1/emu10k1_main.c
754
snd_ctl_build_ioff(&id, emu->ctl_clock_source, 0);
sound/pci/emu10k1/emu10k1_main.c
755
snd_ctl_notify(emu->card, SNDRV_CTL_EVENT_MASK_VALUE, &id);
sound/pci/emu10k1/emu10k1_main.c
760
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emu10k1_main.c
763
emu = container_of(work, struct snd_emu10k1, emu1010.work);
sound/pci/emu10k1/emu10k1_main.c
764
if (emu->card->shutdown)
sound/pci/emu10k1/emu10k1_main.c
767
if (emu->suspend)
sound/pci/emu10k1/emu10k1_main.c
771
guard(snd_emu1010_fpga_lock)(emu);
sound/pci/emu10k1/emu10k1_main.c
773
snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &sts);
sound/pci/emu10k1/emu10k1_main.c
778
emu1010_dock_event(emu);
sound/pci/emu10k1/emu10k1_main.c
781
emu1010_clock_event(emu);
sound/pci/emu10k1/emu10k1_main.c
784
static void emu1010_interrupt(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
788
u16 sts = inw(emu->port + A_GPIO);
sound/pci/emu10k1/emu10k1_main.c
789
u16 bit = emu->card_capabilities->ca0108_chip ? 0x2000 : 0x8000;
sound/pci/emu10k1/emu10k1_main.c
793
schedule_work(&emu->emu1010.work);
sound/pci/emu10k1/emu10k1_main.c
804
static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emu10k1_main.c
809
dev_info(emu->card->dev, "emu1010: Special config.\n");
sound/pci/emu10k1/emu10k1_main.c
813
outl(HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK, emu->port + HCFG);
sound/pci/emu10k1/emu10k1_main.c
815
guard(snd_emu1010_fpga_lock)(emu);
sound/pci/emu10k1/emu10k1_main.c
817
dev_info(emu->card->dev, "emu1010: Loading Hana Firmware\n");
sound/pci/emu10k1/emu10k1_main.c
818
err = snd_emu1010_load_firmware(emu, 0, &emu->firmware);
sound/pci/emu10k1/emu10k1_main.c
820
dev_info(emu->card->dev, "emu1010: Loading Firmware failed\n");
sound/pci/emu10k1/emu10k1_main.c
825
snd_emu1010_fpga_read(emu, EMU_HANA_ID, &reg);
sound/pci/emu10k1/emu10k1_main.c
828
dev_info(emu->card->dev,
sound/pci/emu10k1/emu10k1_main.c
834
dev_info(emu->card->dev, "emu1010: Hana Firmware loaded\n");
sound/pci/emu10k1/emu10k1_main.c
835
snd_emu1010_fpga_read(emu, EMU_HANA_MAJOR_REV, &tmp);
sound/pci/emu10k1/emu10k1_main.c
836
snd_emu1010_fpga_read(emu, EMU_HANA_MINOR_REV, &tmp2);
sound/pci/emu10k1/emu10k1_main.c
837
dev_info(emu->card->dev, "emu1010: Hana version: %u.%u\n", tmp, tmp2);
sound/pci/emu10k1/emu10k1_main.c
839
snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, EMU_HANA_DOCK_PWR_ON);
sound/pci/emu10k1/emu10k1_main.c
841
snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, &reg);
sound/pci/emu10k1/emu10k1_main.c
842
dev_info(emu->card->dev, "emu1010: Card options = 0x%x\n", reg);
sound/pci/emu10k1/emu10k1_main.c
844
snd_emu1010_load_dock_firmware(emu);
sound/pci/emu10k1/emu10k1_main.c
845
if (emu->card_capabilities->no_adat) {
sound/pci/emu10k1/emu10k1_main.c
846
emu->emu1010.optical_in = 0; /* IN_SPDIF */
sound/pci/emu10k1/emu10k1_main.c
847
emu->emu1010.optical_out = 0; /* OUT_SPDIF */
sound/pci/emu10k1/emu10k1_main.c
85
if (emu->audigy) {
sound/pci/emu10k1/emu10k1_main.c
850
emu->emu1010.optical_in = 1; /* IN_ADAT */
sound/pci/emu10k1/emu10k1_main.c
851
emu->emu1010.optical_out = 1; /* OUT_ADAT */
sound/pci/emu10k1/emu10k1_main.c
853
tmp = (emu->emu1010.optical_in ? EMU_HANA_OPTICAL_IN_ADAT : EMU_HANA_OPTICAL_IN_SPDIF) |
sound/pci/emu10k1/emu10k1_main.c
854
(emu->emu1010.optical_out ? EMU_HANA_OPTICAL_OUT_ADAT : EMU_HANA_OPTICAL_OUT_SPDIF);
sound/pci/emu10k1/emu10k1_main.c
855
snd_emu1010_fpga_write(emu, EMU_HANA_OPTICAL_TYPE, tmp);
sound/pci/emu10k1/emu10k1_main.c
857
emu->emu1010.adc_pads = 0x00;
sound/pci/emu10k1/emu10k1_main.c
858
snd_emu1010_fpga_write(emu, EMU_HANA_ADC_PADS, emu->emu1010.adc_pads);
sound/pci/emu10k1/emu10k1_main.c
86
snd_emu10k1_ptr_write_multiple(emu, ch,
sound/pci/emu10k1/emu10k1_main.c
860
snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_MISC, EMU_HANA_DOCK_PHONES_192_DAC4);
sound/pci/emu10k1/emu10k1_main.c
862
emu->emu1010.dac_pads = EMU_HANA_DOCK_DAC_PAD1 | EMU_HANA_DOCK_DAC_PAD2 |
sound/pci/emu10k1/emu10k1_main.c
864
snd_emu1010_fpga_write(emu, EMU_HANA_DAC_PADS, emu->emu1010.dac_pads);
sound/pci/emu10k1/emu10k1_main.c
866
snd_emu1010_fpga_write(emu, EMU_HANA_SPDIF_MODE, EMU_HANA_SPDIF_MODE_RX_INVALID);
sound/pci/emu10k1/emu10k1_main.c
868
snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_IN, EMU_HANA_MIDI_INA_FROM_HAMOA | EMU_HANA_MIDI_INB_FROM_DOCK2);
sound/pci/emu10k1/emu10k1_main.c
869
snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_OUT, EMU_HANA_MIDI_OUT_DOCK2 | EMU_HANA_MIDI_OUT_SYNC2);
sound/pci/emu10k1/emu10k1_main.c
871
emu->gpio_interrupt = emu1010_interrupt;
sound/pci/emu10k1/emu10k1_main.c
873
snd_emu1010_fpga_write(emu, EMU_HANA_IRQ_ENABLE,
sound/pci/emu10k1/emu10k1_main.c
875
snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &reg); // Clear pending IRQs
sound/pci/emu10k1/emu10k1_main.c
877
emu->emu1010.clock_source = 1; /* 48000 */
sound/pci/emu10k1/emu10k1_main.c
878
emu->emu1010.clock_fallback = 1; /* 48000 */
sound/pci/emu10k1/emu10k1_main.c
880
snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, EMU_HANA_DEFCLOCK_48K);
sound/pci/emu10k1/emu10k1_main.c
882
emu->emu1010.wclock = EMU_HANA_WCLOCK_INT_48K;
sound/pci/emu10k1/emu10k1_main.c
883
snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK, EMU_HANA_WCLOCK_INT_48K);
sound/pci/emu10k1/emu10k1_main.c
885
snd_emu1010_update_clock(emu);
sound/pci/emu10k1/emu10k1_main.c
889
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE);
sound/pci/emu10k1/emu10k1_main.c
898
static int alloc_pm_buffer(struct snd_emu10k1 *emu);
sound/pci/emu10k1/emu10k1_main.c
899
static void free_pm_buffer(struct snd_emu10k1 *emu);
sound/pci/emu10k1/emu10k1_main.c
904
struct snd_emu10k1 *emu = card->private_data;
sound/pci/emu10k1/emu10k1_main.c
906
if (emu->port) { /* avoid access to already used hardware */
sound/pci/emu10k1/emu10k1_main.c
907
snd_emu10k1_fx8010_tram_setup(emu, 0);
sound/pci/emu10k1/emu10k1_main.c
908
snd_emu10k1_done(emu);
sound/pci/emu10k1/emu10k1_main.c
909
snd_emu10k1_free_efx(emu);
sound/pci/emu10k1/emu10k1_main.c
911
if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1010) {
sound/pci/emu10k1/emu10k1_main.c
913
snd_emu1010_fpga_write_lock(emu, EMU_HANA_DOCK_PWR, 0);
sound/pci/emu10k1/emu10k1_main.c
915
cancel_work_sync(&emu->emu1010.work);
sound/pci/emu10k1/emu10k1_main.c
916
mutex_destroy(&emu->emu1010.lock);
sound/pci/emu10k1/emu10k1_main.c
917
release_firmware(emu->firmware);
sound/pci/emu10k1/emu10k1_main.c
918
release_firmware(emu->dock_fw);
sound/pci/emu10k1/emu10k1_main.c
919
snd_util_memhdr_free(emu->memhdr);
sound/pci/emu10k1/emu10k1_main.c
920
if (emu->silent_page.area)
sound/pci/emu10k1/emu10k1_main.c
921
snd_dma_free_pages(&emu->silent_page);
sound/pci/emu10k1/emu10k1_main.c
922
if (emu->ptb_pages.area)
sound/pci/emu10k1/emu10k1_main.c
923
snd_dma_free_pages(&emu->ptb_pages);
sound/pci/emu10k1/emu10k1_main.c
924
vfree(emu->page_ptr_table);
sound/pci/emu10k1/emu10k1_main.c
925
vfree(emu->page_addr_table);
sound/pci/emu10k1/emu10k1_main.c
927
free_pm_buffer(emu);
sound/pci/emu10k1/emu10k1_patch.c
100
sp->block = snd_emu10k1_synth_alloc(emu, blocksize);
sound/pci/emu10k1/emu10k1_patch.c
102
dev_dbg(emu->card->dev,
sound/pci/emu10k1/emu10k1_patch.c
113
snd_emu10k1_synth_memset(emu, sp->block, offset, size, fill);
sound/pci/emu10k1/emu10k1_patch.c
119
if (snd_emu10k1_synth_copy_from_user(emu, sp->block, offset, data, size, xor))
sound/pci/emu10k1/emu10k1_patch.c
126
if (snd_emu10k1_synth_copy_from_user(emu, sp->block, offset, data, size, xor))
sound/pci/emu10k1/emu10k1_patch.c
135
if (snd_emu10k1_synth_copy_from_user(emu, sp->block, offset, data, size, xor))
sound/pci/emu10k1/emu10k1_patch.c
141
snd_emu10k1_synth_memset(emu, sp->block, offset, blocksize - offset, fill);
sound/pci/emu10k1/emu10k1_patch.c
146
snd_emu10k1_synth_free(emu, sp->block);
sound/pci/emu10k1/emu10k1_patch.c
158
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emu10k1_patch.c
160
emu = rec->hw;
sound/pci/emu10k1/emu10k1_patch.c
165
snd_emu10k1_synth_free(emu, sp->block);
sound/pci/emu10k1/emu10k1_patch.c
35
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emu10k1_patch.c
37
emu = rec->hw;
sound/pci/emu10k1/emu10k1_patch.c
43
dev_warn(emu->card->dev,
sound/pci/emu10k1/emu10k1_synth_local.h
22
int snd_emu10k1_memhdr_init(struct snd_emux *emu);
sound/pci/emu10k1/emu10k1_synth_local.h
25
void snd_emu10k1_ops_setup(struct snd_emux *emu);
sound/pci/emu10k1/emu10k1x.c
1001
struct emu10k1x *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emu10k1x.c
1003
ucontrol->value.integer.value[0] = (snd_emu10k1x_ptr_read(emu, SPDIF_SELECT, 0) == 0x700) ? 0 : 1;
sound/pci/emu10k1/emu10k1x.c
1011
struct emu10k1x *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emu10k1x.c
1018
snd_emu10k1x_ptr_write(emu, SPDIF_SELECT, 0, 0x000);
sound/pci/emu10k1/emu10k1x.c
1019
snd_emu10k1x_ptr_write(emu, ROUTING, 0, 0x700);
sound/pci/emu10k1/emu10k1x.c
1020
snd_emu10k1x_gpio_write(emu, 0x1000);
sound/pci/emu10k1/emu10k1x.c
1023
snd_emu10k1x_ptr_write(emu, SPDIF_SELECT, 0, 0x700);
sound/pci/emu10k1/emu10k1x.c
1024
snd_emu10k1x_ptr_write(emu, ROUTING, 0, 0x1003F);
sound/pci/emu10k1/emu10k1x.c
1025
snd_emu10k1x_gpio_write(emu, 0x1080);
sound/pci/emu10k1/emu10k1x.c
1049
struct emu10k1x *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emu10k1x.c
1052
ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff;
sound/pci/emu10k1/emu10k1x.c
1053
ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff;
sound/pci/emu10k1/emu10k1x.c
1054
ucontrol->value.iec958.status[2] = (emu->spdif_bits[idx] >> 16) & 0xff;
sound/pci/emu10k1/emu10k1x.c
1055
ucontrol->value.iec958.status[3] = (emu->spdif_bits[idx] >> 24) & 0xff;
sound/pci/emu10k1/emu10k1x.c
1072
struct emu10k1x *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emu10k1x.c
1081
change = val != emu->spdif_bits[idx];
sound/pci/emu10k1/emu10k1x.c
1083
snd_emu10k1x_ptr_write(emu, SPCS0 + idx, 0, val);
sound/pci/emu10k1/emu10k1x.c
1084
emu->spdif_bits[idx] = val;
sound/pci/emu10k1/emu10k1x.c
1109
static int snd_emu10k1x_mixer(struct emu10k1x *emu)
sound/pci/emu10k1/emu10k1x.c
1113
struct snd_card *card = emu->card;
sound/pci/emu10k1/emu10k1x.c
1115
kctl = snd_ctl_new1(&snd_emu10k1x_spdif_mask_control, emu);
sound/pci/emu10k1/emu10k1x.c
1121
kctl = snd_ctl_new1(&snd_emu10k1x_shared_spdif, emu);
sound/pci/emu10k1/emu10k1x.c
1127
kctl = snd_ctl_new1(&snd_emu10k1x_spdif_control, emu);
sound/pci/emu10k1/emu10k1x.c
1140
static inline unsigned char mpu401_read(struct emu10k1x *emu, struct emu10k1x_midi *mpu, int idx)
sound/pci/emu10k1/emu10k1x.c
1142
return (unsigned char)snd_emu10k1x_ptr_read(emu, mpu->port + idx, 0);
sound/pci/emu10k1/emu10k1x.c
1145
static inline void mpu401_write(struct emu10k1x *emu, struct emu10k1x_midi *mpu, int data, int idx)
sound/pci/emu10k1/emu10k1x.c
1147
snd_emu10k1x_ptr_write(emu, mpu->port + idx, 0, data);
sound/pci/emu10k1/emu10k1x.c
1150
#define mpu401_write_data(emu, mpu, data) mpu401_write(emu, mpu, data, 0)
sound/pci/emu10k1/emu10k1x.c
1151
#define mpu401_write_cmd(emu, mpu, data) mpu401_write(emu, mpu, data, 1)
sound/pci/emu10k1/emu10k1x.c
1152
#define mpu401_read_data(emu, mpu) mpu401_read(emu, mpu, 0)
sound/pci/emu10k1/emu10k1x.c
1153
#define mpu401_read_stat(emu, mpu) mpu401_read(emu, mpu, 1)
sound/pci/emu10k1/emu10k1x.c
1155
#define mpu401_input_avail(emu,mpu) (!(mpu401_read_stat(emu,mpu) & 0x80))
sound/pci/emu10k1/emu10k1x.c
1156
#define mpu401_output_ready(emu,mpu) (!(mpu401_read_stat(emu,mpu) & 0x40))
sound/pci/emu10k1/emu10k1x.c
1162
static void mpu401_clear_rx(struct emu10k1x *emu, struct emu10k1x_midi *mpu)
sound/pci/emu10k1/emu10k1x.c
1165
for (; timeout > 0 && mpu401_input_avail(emu, mpu); timeout--)
sound/pci/emu10k1/emu10k1x.c
1166
mpu401_read_data(emu, mpu);
sound/pci/emu10k1/emu10k1x.c
1169
dev_err(emu->card->dev,
sound/pci/emu10k1/emu10k1x.c
1171
mpu401_read_stat(emu, mpu));
sound/pci/emu10k1/emu10k1x.c
1179
static void do_emu10k1x_midi_interrupt(struct emu10k1x *emu,
sound/pci/emu10k1/emu10k1x.c
1185
snd_emu10k1x_intr_disable(emu, midi->tx_enable | midi->rx_enable);
sound/pci/emu10k1/emu10k1x.c
1190
if ((status & midi->ipr_rx) && mpu401_input_avail(emu, midi)) {
sound/pci/emu10k1/emu10k1x.c
1192
mpu401_clear_rx(emu, midi);
sound/pci/emu10k1/emu10k1x.c
1194
byte = mpu401_read_data(emu, midi);
sound/pci/emu10k1/emu10k1x.c
1202
if ((status & midi->ipr_tx) && mpu401_output_ready(emu, midi)) {
sound/pci/emu10k1/emu10k1x.c
1205
mpu401_write_data(emu, midi, byte);
sound/pci/emu10k1/emu10k1x.c
1207
snd_emu10k1x_intr_disable(emu, midi->tx_enable);
sound/pci/emu10k1/emu10k1x.c
1213
static void snd_emu10k1x_midi_interrupt(struct emu10k1x *emu, unsigned int status)
sound/pci/emu10k1/emu10k1x.c
1215
do_emu10k1x_midi_interrupt(emu, &emu->midi, status);
sound/pci/emu10k1/emu10k1x.c
1218
static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu,
sound/pci/emu10k1/emu10k1x.c
1224
mpu401_write_data(emu, midi, 0x00);
sound/pci/emu10k1/emu10k1x.c
1227
mpu401_write_cmd(emu, midi, cmd);
sound/pci/emu10k1/emu10k1x.c
1232
if (mpu401_input_avail(emu, midi)) {
sound/pci/emu10k1/emu10k1x.c
1233
if (mpu401_read_data(emu, midi) == MPU401_ACK)
sound/pci/emu10k1/emu10k1x.c
1237
if (!ok && mpu401_read_data(emu, midi) == MPU401_ACK)
sound/pci/emu10k1/emu10k1x.c
1244
dev_err(emu->card->dev,
sound/pci/emu10k1/emu10k1x.c
1246
cmd, emu->port,
sound/pci/emu10k1/emu10k1x.c
1247
mpu401_read_stat(emu, midi),
sound/pci/emu10k1/emu10k1x.c
1248
mpu401_read_data(emu, midi));
sound/pci/emu10k1/emu10k1x.c
1256
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
1259
emu = midi->emu;
sound/pci/emu10k1/emu10k1x.c
1260
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emu10k1x.c
1268
if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1))
sound/pci/emu10k1/emu10k1x.c
1270
if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
sound/pci/emu10k1/emu10k1x.c
1277
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
1280
emu = midi->emu;
sound/pci/emu10k1/emu10k1x.c
1281
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emu10k1x.c
1289
if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1))
sound/pci/emu10k1/emu10k1x.c
1291
if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
sound/pci/emu10k1/emu10k1x.c
1298
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
1301
emu = midi->emu;
sound/pci/emu10k1/emu10k1x.c
1302
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emu10k1x.c
1305
snd_emu10k1x_intr_disable(emu, midi->rx_enable);
sound/pci/emu10k1/emu10k1x.c
1311
return snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
sound/pci/emu10k1/emu10k1x.c
1316
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
1319
emu = midi->emu;
sound/pci/emu10k1/emu10k1x.c
1320
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emu10k1x.c
1323
snd_emu10k1x_intr_disable(emu, midi->tx_enable);
sound/pci/emu10k1/emu10k1x.c
1329
return snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
sound/pci/emu10k1/emu10k1x.c
1334
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
1336
emu = midi->emu;
sound/pci/emu10k1/emu10k1x.c
1337
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emu10k1x.c
1341
snd_emu10k1x_intr_enable(emu, midi->rx_enable);
sound/pci/emu10k1/emu10k1x.c
1343
snd_emu10k1x_intr_disable(emu, midi->rx_enable);
sound/pci/emu10k1/emu10k1x.c
1348
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
1351
emu = midi->emu;
sound/pci/emu10k1/emu10k1x.c
1352
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emu10k1x.c
1362
if (mpu401_output_ready(emu, midi)) {
sound/pci/emu10k1/emu10k1x.c
1368
mpu401_write_data(emu, midi, byte);
sound/pci/emu10k1/emu10k1x.c
1375
snd_emu10k1x_intr_enable(emu, midi->tx_enable);
sound/pci/emu10k1/emu10k1x.c
1377
snd_emu10k1x_intr_disable(emu, midi->tx_enable);
sound/pci/emu10k1/emu10k1x.c
1406
static int emu10k1x_midi_init(struct emu10k1x *emu,
sound/pci/emu10k1/emu10k1x.c
1413
err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi);
sound/pci/emu10k1/emu10k1x.c
1416
midi->emu = emu;
sound/pci/emu10k1/emu10k1x.c
1432
static int snd_emu10k1x_midi(struct emu10k1x *emu)
sound/pci/emu10k1/emu10k1x.c
1434
struct emu10k1x_midi *midi = &emu->midi;
sound/pci/emu10k1/emu10k1x.c
1437
err = emu10k1x_midi_init(emu, midi, 0, "EMU10K1X MPU-401 (UART)");
sound/pci/emu10k1/emu10k1x.c
185
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
193
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
200
struct emu10k1x *emu;
sound/pci/emu10k1/emu10k1x.c
211
void (*interrupt)(struct emu10k1x *emu, unsigned int status);
sound/pci/emu10k1/emu10k1x.c
280
static unsigned int snd_emu10k1x_ptr_read(struct emu10k1x * emu,
sound/pci/emu10k1/emu10k1x.c
288
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/emu10k1x.c
289
outl(regptr, emu->port + PTR);
sound/pci/emu10k1/emu10k1x.c
290
return inl(emu->port + DATA);
sound/pci/emu10k1/emu10k1x.c
293
static void snd_emu10k1x_ptr_write(struct emu10k1x *emu,
sound/pci/emu10k1/emu10k1x.c
302
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/emu10k1x.c
303
outl(regptr, emu->port + PTR);
sound/pci/emu10k1/emu10k1x.c
304
outl(data, emu->port + DATA);
sound/pci/emu10k1/emu10k1x.c
307
static void snd_emu10k1x_intr_enable(struct emu10k1x *emu, unsigned int intrenb)
sound/pci/emu10k1/emu10k1x.c
311
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/emu10k1x.c
312
intr_enable = inl(emu->port + INTE) | intrenb;
sound/pci/emu10k1/emu10k1x.c
313
outl(intr_enable, emu->port + INTE);
sound/pci/emu10k1/emu10k1x.c
316
static void snd_emu10k1x_intr_disable(struct emu10k1x *emu, unsigned int intrenb)
sound/pci/emu10k1/emu10k1x.c
320
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/emu10k1x.c
321
intr_enable = inl(emu->port + INTE) & ~intrenb;
sound/pci/emu10k1/emu10k1x.c
322
outl(intr_enable, emu->port + INTE);
sound/pci/emu10k1/emu10k1x.c
325
static void snd_emu10k1x_gpio_write(struct emu10k1x *emu, unsigned int value)
sound/pci/emu10k1/emu10k1x.c
327
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/emu10k1x.c
328
outl(value, emu->port + GPIO);
sound/pci/emu10k1/emu10k1x.c
336
static void snd_emu10k1x_pcm_interrupt(struct emu10k1x *emu, struct emu10k1x_voice *voice)
sound/pci/emu10k1/emu10k1x.c
346
dev_info(emu->card->dev,
sound/pci/emu10k1/emu10k1x.c
373
epcm->emu = chip;
sound/pci/emu10k1/emu10k1x.c
398
epcm->voice = &epcm->emu->voices[substream->pcm->device];
sound/pci/emu10k1/emu10k1x.c
429
struct emu10k1x *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emu10k1x.c
433
u32 *table_base = (u32 *)(emu->dma_buffer->area+1024*voice);
sound/pci/emu10k1/emu10k1x.c
442
snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_ADDR, voice, emu->dma_buffer->addr+1024*voice);
sound/pci/emu10k1/emu10k1x.c
443
snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_SIZE, voice, (runtime->periods - 1) << 19);
sound/pci/emu10k1/emu10k1x.c
444
snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_PTR, voice, 0);
sound/pci/emu10k1/emu10k1x.c
445
snd_emu10k1x_ptr_write(emu, PLAYBACK_POINTER, voice, 0);
sound/pci/emu10k1/emu10k1x.c
446
snd_emu10k1x_ptr_write(emu, PLAYBACK_UNKNOWN1, voice, 0);
sound/pci/emu10k1/emu10k1x.c
447
snd_emu10k1x_ptr_write(emu, PLAYBACK_UNKNOWN2, voice, 0);
sound/pci/emu10k1/emu10k1x.c
448
snd_emu10k1x_ptr_write(emu, PLAYBACK_DMA_ADDR, voice, runtime->dma_addr);
sound/pci/emu10k1/emu10k1x.c
450
snd_emu10k1x_ptr_write(emu, PLAYBACK_PERIOD_SIZE, voice, frames_to_bytes(runtime, runtime->period_size)<<16);
sound/pci/emu10k1/emu10k1x.c
459
struct emu10k1x *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emu10k1x.c
474
snd_emu10k1x_intr_enable(emu, (INTE_CH_0_LOOP | INTE_CH_0_HALF_LOOP) << channel);
sound/pci/emu10k1/emu10k1x.c
476
snd_emu10k1x_intr_enable(emu, INTE_CH_0_LOOP << channel);
sound/pci/emu10k1/emu10k1x.c
478
snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0)|(TRIGGER_CHANNEL_0<<channel));
sound/pci/emu10k1/emu10k1x.c
482
snd_emu10k1x_intr_disable(emu, (INTE_CH_0_LOOP | INTE_CH_0_HALF_LOOP) << channel);
sound/pci/emu10k1/emu10k1x.c
483
snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0) & ~(TRIGGER_CHANNEL_0<<channel));
sound/pci/emu10k1/emu10k1x.c
496
struct emu10k1x *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emu10k1x.c
505
ptr3 = snd_emu10k1x_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
sound/pci/emu10k1/emu10k1x.c
506
ptr1 = snd_emu10k1x_ptr_read(emu, PLAYBACK_POINTER, channel);
sound/pci/emu10k1/emu10k1x.c
507
ptr4 = snd_emu10k1x_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
sound/pci/emu10k1/emu10k1x.c
513
ptr1 = snd_emu10k1x_ptr_read(emu, PLAYBACK_POINTER, channel);
sound/pci/emu10k1/emu10k1x.c
554
epcm->emu = chip;
sound/pci/emu10k1/emu10k1x.c
579
if (epcm->emu->capture_voice.use)
sound/pci/emu10k1/emu10k1x.c
581
epcm->voice = &epcm->emu->capture_voice;
sound/pci/emu10k1/emu10k1x.c
612
struct emu10k1x *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emu10k1x.c
615
snd_emu10k1x_ptr_write(emu, CAPTURE_DMA_ADDR, 0, runtime->dma_addr);
sound/pci/emu10k1/emu10k1x.c
616
snd_emu10k1x_ptr_write(emu, CAPTURE_BUFFER_SIZE, 0, frames_to_bytes(runtime, runtime->buffer_size)<<16); // buffer size in bytes
sound/pci/emu10k1/emu10k1x.c
617
snd_emu10k1x_ptr_write(emu, CAPTURE_POINTER, 0, 0);
sound/pci/emu10k1/emu10k1x.c
618
snd_emu10k1x_ptr_write(emu, CAPTURE_UNKNOWN, 0, 0);
sound/pci/emu10k1/emu10k1x.c
627
struct emu10k1x *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emu10k1x.c
634
snd_emu10k1x_intr_enable(emu, INTE_CAP_0_LOOP |
sound/pci/emu10k1/emu10k1x.c
636
snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0)|TRIGGER_CAPTURE);
sound/pci/emu10k1/emu10k1x.c
641
snd_emu10k1x_intr_disable(emu, INTE_CAP_0_LOOP |
sound/pci/emu10k1/emu10k1x.c
643
snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0) & ~(TRIGGER_CAPTURE));
sound/pci/emu10k1/emu10k1x.c
656
struct emu10k1x *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emu10k1x.c
664
ptr = bytes_to_frames(runtime, snd_emu10k1x_ptr_read(emu, CAPTURE_POINTER, 0));
sound/pci/emu10k1/emu10k1x.c
684
struct emu10k1x *emu = ac97->private_data;
sound/pci/emu10k1/emu10k1x.c
686
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/emu10k1x.c
687
outb(reg, emu->port + AC97ADDRESS);
sound/pci/emu10k1/emu10k1x.c
688
return inw(emu->port + AC97DATA);
sound/pci/emu10k1/emu10k1x.c
694
struct emu10k1x *emu = ac97->private_data;
sound/pci/emu10k1/emu10k1x.c
696
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/emu10k1x.c
697
outb(reg, emu->port + AC97ADDRESS);
sound/pci/emu10k1/emu10k1x.c
698
outw(val, emu->port + AC97DATA);
sound/pci/emu10k1/emu10k1x.c
796
static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device)
sound/pci/emu10k1/emu10k1x.c
806
err = snd_pcm_new(emu->card, "emu10k1x", device, 1, capture, &pcm);
sound/pci/emu10k1/emu10k1x.c
810
pcm->private_data = emu;
sound/pci/emu10k1/emu10k1x.c
838
emu->pcm = pcm;
sound/pci/emu10k1/emu10k1x.c
841
&emu->pci->dev, 32*1024, 32*1024);
sound/pci/emu10k1/emu10k1x.c
900
chip->voices[ch].emu = chip;
sound/pci/emu10k1/emu10k1x.c
949
struct emu10k1x *emu = entry->private_data;
sound/pci/emu10k1/emu10k1x.c
955
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/emu10k1x.c
956
value = inl(emu->port + i);
sound/pci/emu10k1/emu10k1x.c
961
value = snd_emu10k1x_ptr_read(emu, i, 0);
sound/pci/emu10k1/emu10k1x.c
963
value1 = snd_emu10k1x_ptr_read(emu, i, 1);
sound/pci/emu10k1/emu10k1x.c
964
value2 = snd_emu10k1x_ptr_read(emu, i, 2);
sound/pci/emu10k1/emu10k1x.c
975
struct emu10k1x *emu = entry->private_data;
sound/pci/emu10k1/emu10k1x.c
984
snd_emu10k1x_ptr_write(emu, reg, channel_id, val);
sound/pci/emu10k1/emu10k1x.c
988
static int snd_emu10k1x_proc_init(struct emu10k1x *emu)
sound/pci/emu10k1/emu10k1x.c
990
snd_card_rw_proc_new(emu->card, "emu10k1x_regs", emu,
sound/pci/emu10k1/emufx.c
1007
if (copy_gctl_to_user(emu, icode->gpr_list_controls,
sound/pci/emu10k1/emufx.c
1020
static int snd_emu10k1_icode_poke(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
1026
guard(mutex)(&emu->fx8010.lock);
sound/pci/emu10k1/emufx.c
1027
err = snd_emu10k1_verify_controls(emu, icode, in_kernel);
sound/pci/emu10k1/emufx.c
1030
strscpy(emu->fx8010.name, icode->name, sizeof(emu->fx8010.name));
sound/pci/emu10k1/emufx.c
1033
if (emu->audigy)
sound/pci/emu10k1/emufx.c
1034
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg | A_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
1036
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
1038
err = snd_emu10k1_del_controls(emu, icode, in_kernel);
sound/pci/emu10k1/emufx.c
1041
err = snd_emu10k1_gpr_poke(emu, icode, in_kernel);
sound/pci/emu10k1/emufx.c
1044
err = snd_emu10k1_tram_poke(emu, icode, in_kernel);
sound/pci/emu10k1/emufx.c
1047
err = snd_emu10k1_code_poke(emu, icode, in_kernel);
sound/pci/emu10k1/emufx.c
1050
err = snd_emu10k1_add_controls(emu, icode, in_kernel);
sound/pci/emu10k1/emufx.c
1054
if (emu->audigy)
sound/pci/emu10k1/emufx.c
1055
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg);
sound/pci/emu10k1/emufx.c
1057
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg);
sound/pci/emu10k1/emufx.c
1061
static int snd_emu10k1_icode_peek(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
1066
guard(mutex)(&emu->fx8010.lock);
sound/pci/emu10k1/emufx.c
1067
strscpy(icode->name, emu->fx8010.name, sizeof(icode->name));
sound/pci/emu10k1/emufx.c
1069
err = snd_emu10k1_gpr_peek(emu, icode);
sound/pci/emu10k1/emufx.c
1071
err = snd_emu10k1_tram_peek(emu, icode);
sound/pci/emu10k1/emufx.c
1073
err = snd_emu10k1_code_peek(emu, icode);
sound/pci/emu10k1/emufx.c
1075
err = snd_emu10k1_list_controls(emu, icode);
sound/pci/emu10k1/emufx.c
1079
static int snd_emu10k1_ipcm_poke(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
1091
pcm = &emu->fx8010.pcm[ipcm->substream];
sound/pci/emu10k1/emufx.c
1092
guard(mutex)(&emu->fx8010.lock);
sound/pci/emu10k1/emufx.c
1093
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emufx.c
1119
static int snd_emu10k1_ipcm_peek(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
1129
pcm = &emu->fx8010.pcm[ipcm->substream];
sound/pci/emu10k1/emufx.c
1130
guard(mutex)(&emu->fx8010.lock);
sound/pci/emu10k1/emufx.c
1131
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emufx.c
1260
static int _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
1331
if (emu->card_capabilities->spk71) {
sound/pci/emu10k1/emufx.c
1387
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emufx.c
1390
if (emu->card_capabilities->ca0108_chip) {
sound/pci/emu10k1/emufx.c
1408
if (emu->card_capabilities->ac97_chip) {
sound/pci/emu10k1/emufx.c
1428
emu->card_capabilities->ac97_chip ? "Audigy CD Playback Volume" : "CD Playback Volume",
sound/pci/emu10k1/emufx.c
1435
emu->card_capabilities->ac97_chip ? "Audigy CD Capture Volume" : "CD Capture Volume",
sound/pci/emu10k1/emufx.c
1454
emu->card_capabilities->ac97_chip ? "Line2 Playback Volume" : "Line Playback Volume",
sound/pci/emu10k1/emufx.c
1461
emu->card_capabilities->ac97_chip ? "Line2 Capture Volume" : "Line Capture Volume",
sound/pci/emu10k1/emufx.c
1480
emu->card_capabilities->ac97_chip ? "Aux2 Playback Volume" : "Aux Playback Volume",
sound/pci/emu10k1/emufx.c
1487
emu->card_capabilities->ac97_chip ? "Aux2 Capture Volume" : "Aux Capture Volume",
sound/pci/emu10k1/emufx.c
1516
if (emu->card_capabilities->spk71) {
sound/pci/emu10k1/emufx.c
1611
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emufx.c
1613
dev_info(emu->card->dev, "EMU outputs on\n");
sound/pci/emu10k1/emufx.c
1615
if (emu->card_capabilities->ca0108_chip) {
sound/pci/emu10k1/emufx.c
1627
if (emu->card_capabilities->spk71)
sound/pci/emu10k1/emufx.c
1645
if ((z==1) && (emu->card_capabilities->spdif_bug)) {
sound/pci/emu10k1/emufx.c
1647
dev_info(emu->card->dev,
sound/pci/emu10k1/emufx.c
1649
emu->card_capabilities->name);
sound/pci/emu10k1/emufx.c
1672
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emufx.c
1674
if (emu->card_capabilities->ca0108_chip) {
sound/pci/emu10k1/emufx.c
1675
dev_info(emu->card->dev, "EMU2 inputs on\n");
sound/pci/emu10k1/emufx.c
1691
dev_info(emu->card->dev, "EMU inputs on\n");
sound/pci/emu10k1/emufx.c
1741
emu->support_tlv = 1; /* support TLV */
sound/pci/emu10k1/emufx.c
1742
err = snd_emu10k1_icode_poke(emu, icode, true);
sound/pci/emu10k1/emufx.c
1743
emu->support_tlv = 0; /* clear again */
sound/pci/emu10k1/emufx.c
1791
static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
2020
if (emu->fx8010.extin_mask & ((1<<EXTIN_AC97_L)|(1<<EXTIN_AC97_R))) {
sound/pci/emu10k1/emufx.c
2031
if (emu->fx8010.extin_mask & ((1<<EXTIN_SPDIF_CD_L)|(1<<EXTIN_SPDIF_CD_R))) {
sound/pci/emu10k1/emufx.c
2048
if (emu->fx8010.extin_mask & ((1<<EXTIN_ZOOM_L)|(1<<EXTIN_ZOOM_R))) {
sound/pci/emu10k1/emufx.c
2065
if (emu->fx8010.extin_mask & ((1<<EXTIN_TOSLINK_L)|(1<<EXTIN_TOSLINK_R))) {
sound/pci/emu10k1/emufx.c
2082
if (emu->fx8010.extin_mask & ((1<<EXTIN_LINE1_L)|(1<<EXTIN_LINE1_R))) {
sound/pci/emu10k1/emufx.c
2099
if (emu->fx8010.extin_mask & ((1<<EXTIN_COAX_SPDIF_L)|(1<<EXTIN_COAX_SPDIF_R))) {
sound/pci/emu10k1/emufx.c
2116
if (emu->fx8010.extin_mask & ((1<<EXTIN_LINE2_L)|(1<<EXTIN_LINE2_R))) {
sound/pci/emu10k1/emufx.c
2212
if (emu->fx8010.extout_mask & ((1<<EXTOUT_AC97_L)|(1<<EXTOUT_AC97_R))) {
sound/pci/emu10k1/emufx.c
2219
if (emu->fx8010.extout_mask & ((1<<EXTOUT_TOSLINK_L)|(1<<EXTOUT_TOSLINK_R))) {
sound/pci/emu10k1/emufx.c
2236
if (emu->fx8010.extout_mask & ((1<<EXTOUT_HEADPHONE_L)|(1<<EXTOUT_HEADPHONE_R))) {
sound/pci/emu10k1/emufx.c
2257
if (emu->fx8010.extout_mask & ((1<<EXTOUT_REAR_L)|(1<<EXTOUT_REAR_R)))
sound/pci/emu10k1/emufx.c
2261
if (emu->fx8010.extout_mask & ((1<<EXTOUT_AC97_REAR_L)|(1<<EXTOUT_AC97_REAR_R)))
sound/pci/emu10k1/emufx.c
2265
if (emu->fx8010.extout_mask & (1<<EXTOUT_AC97_CENTER)) {
sound/pci/emu10k1/emufx.c
2275
if (emu->fx8010.extout_mask & (1<<EXTOUT_AC97_LFE)) {
sound/pci/emu10k1/emufx.c
2290
if (emu->fx8010.extout_mask & (1<<EXTOUT_MIC_CAP))
sound/pci/emu10k1/emufx.c
2294
if (emu->card_capabilities->sblive51) {
sound/pci/emu10k1/emufx.c
2321
err = snd_emu10k1_fx8010_tram_setup(emu, ipcm->buffer_size);
sound/pci/emu10k1/emufx.c
2326
emu->support_tlv = 1; /* support TLV */
sound/pci/emu10k1/emufx.c
2327
err = snd_emu10k1_icode_poke(emu, icode, true);
sound/pci/emu10k1/emufx.c
2328
emu->support_tlv = 0; /* clear again */
sound/pci/emu10k1/emufx.c
2330
err = snd_emu10k1_ipcm_poke(emu, ipcm);
sound/pci/emu10k1/emufx.c
2342
int snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
2344
spin_lock_init(&emu->fx8010.irq_lock);
sound/pci/emu10k1/emufx.c
2345
INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
sound/pci/emu10k1/emufx.c
2346
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2347
return _snd_emu10k1_audigy_init_efx(emu);
sound/pci/emu10k1/emufx.c
2349
return _snd_emu10k1_init_efx(emu);
sound/pci/emu10k1/emufx.c
2352
void snd_emu10k1_free_efx(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
2355
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2356
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg = A_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
2358
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg = EMU10K1_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
2362
int snd_emu10k1_fx8010_tone_control_activate(struct snd_emu10k1 *emu, int output)
sound/pci/emu10k1/emufx.c
2366
snd_emu10k1_ptr_write(emu, emu->gpr_base + 0x94 + output, 0, 1);
sound/pci/emu10k1/emufx.c
2370
int snd_emu10k1_fx8010_tone_control_deactivate(struct snd_emu10k1 *emu, int output)
sound/pci/emu10k1/emufx.c
2374
snd_emu10k1_ptr_write(emu, emu->gpr_base + 0x94 + output, 0, 0);
sound/pci/emu10k1/emufx.c
2379
int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size)
sound/pci/emu10k1/emufx.c
2393
if ((emu->fx8010.etram_pages.bytes / 2) == size)
sound/pci/emu10k1/emufx.c
2395
scoped_guard(spinlock_irq, &emu->emu_lock) {
sound/pci/emu10k1/emufx.c
2396
outl(HCFG_LOCKTANKCACHE_MASK | inl(emu->port + HCFG), emu->port + HCFG);
sound/pci/emu10k1/emufx.c
2398
snd_emu10k1_ptr_write(emu, TCB, 0, 0);
sound/pci/emu10k1/emufx.c
2399
snd_emu10k1_ptr_write(emu, TCBS, 0, TCBS_BUFFSIZE_16K);
sound/pci/emu10k1/emufx.c
2400
if (emu->fx8010.etram_pages.area != NULL) {
sound/pci/emu10k1/emufx.c
2401
snd_dma_free_pages(&emu->fx8010.etram_pages);
sound/pci/emu10k1/emufx.c
2402
emu->fx8010.etram_pages.area = NULL;
sound/pci/emu10k1/emufx.c
2403
emu->fx8010.etram_pages.bytes = 0;
sound/pci/emu10k1/emufx.c
2407
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &emu->pci->dev,
sound/pci/emu10k1/emufx.c
2408
size * 2, &emu->fx8010.etram_pages) < 0)
sound/pci/emu10k1/emufx.c
2410
memset(emu->fx8010.etram_pages.area, 0, size * 2);
sound/pci/emu10k1/emufx.c
2411
snd_emu10k1_ptr_write(emu, TCB, 0, emu->fx8010.etram_pages.addr);
sound/pci/emu10k1/emufx.c
2412
snd_emu10k1_ptr_write(emu, TCBS, 0, size_reg);
sound/pci/emu10k1/emufx.c
2413
scoped_guard(spinlock_irq, &emu->emu_lock) {
sound/pci/emu10k1/emufx.c
2414
outl(inl(emu->port + HCFG) & ~HCFG_LOCKTANKCACHE_MASK, emu->port + HCFG);
sound/pci/emu10k1/emufx.c
2434
static void snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
2441
info->internal_tram_size = emu->fx8010.itram_size;
sound/pci/emu10k1/emufx.c
2442
info->external_tram_size = emu->fx8010.etram_pages.bytes / 2;
sound/pci/emu10k1/emufx.c
2444
extin = emu->audigy ? snd_emu10k1_audigy_ins : snd_emu10k1_sblive_ins;
sound/pci/emu10k1/emufx.c
2445
extout = emu->audigy ? snd_emu10k1_audigy_outs : snd_emu10k1_sblive_outs;
sound/pci/emu10k1/emufx.c
2446
extin_mask = emu->audigy ? ~0 : emu->fx8010.extin_mask;
sound/pci/emu10k1/emufx.c
2447
extout_mask = emu->audigy ? ~0 : emu->fx8010.extout_mask;
sound/pci/emu10k1/emufx.c
2455
info->gpr_controls = emu->fx8010.gpr_count;
sound/pci/emu10k1/emufx.c
2460
struct snd_emu10k1 *emu = hw->private_data;
sound/pci/emu10k1/emufx.c
2470
emu->support_tlv = 1;
sound/pci/emu10k1/emufx.c
2476
snd_emu10k1_fx8010_info(emu, info);
sound/pci/emu10k1/emufx.c
2490
res = snd_emu10k1_icode_poke(emu, icode, false);
sound/pci/emu10k1/emufx.c
2497
res = snd_emu10k1_icode_peek(emu, icode);
sound/pci/emu10k1/emufx.c
2508
res = snd_emu10k1_ipcm_poke(emu, ipcm);
sound/pci/emu10k1/emufx.c
2515
res = snd_emu10k1_ipcm_peek(emu, ipcm);
sound/pci/emu10k1/emufx.c
2527
scoped_guard(mutex, &emu->fx8010.lock) {
sound/pci/emu10k1/emufx.c
2528
res = snd_emu10k1_fx8010_tram_setup(emu, addr);
sound/pci/emu10k1/emufx.c
2534
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2535
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg |= A_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
2537
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg |= EMU10K1_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
2542
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2543
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg = 0);
sound/pci/emu10k1/emufx.c
2545
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg = 0);
sound/pci/emu10k1/emufx.c
2550
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2551
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg | A_DBG_ZC);
sound/pci/emu10k1/emufx.c
2553
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_ZC);
sound/pci/emu10k1/emufx.c
2555
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2556
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg);
sound/pci/emu10k1/emufx.c
2558
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg);
sound/pci/emu10k1/emufx.c
2565
if (emu->audigy) {
sound/pci/emu10k1/emufx.c
2568
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg |= A_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
2570
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg | A_DBG_STEP | addr);
sound/pci/emu10k1/emufx.c
2574
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg |= EMU10K1_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
2576
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_STEP | addr);
sound/pci/emu10k1/emufx.c
2580
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2581
addr = snd_emu10k1_ptr_read(emu, A_DBG, 0);
sound/pci/emu10k1/emufx.c
2583
addr = snd_emu10k1_ptr_read(emu, DBG, 0);
sound/pci/emu10k1/emufx.c
2596
int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device)
sound/pci/emu10k1/emufx.c
2601
err = snd_hwdep_new(emu->card, "FX8010", device, &hw);
sound/pci/emu10k1/emufx.c
2609
hw->private_data = emu;
sound/pci/emu10k1/emufx.c
2614
int snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
2618
len = emu->audigy ? 0x200 : 0x100;
sound/pci/emu10k1/emufx.c
2619
emu->saved_gpr = kmalloc_array(len, 4, GFP_KERNEL);
sound/pci/emu10k1/emufx.c
2620
if (! emu->saved_gpr)
sound/pci/emu10k1/emufx.c
2622
len = emu->audigy ? 0x100 : 0xa0;
sound/pci/emu10k1/emufx.c
2623
emu->tram_val_saved = kmalloc_array(len, 4, GFP_KERNEL);
sound/pci/emu10k1/emufx.c
2624
emu->tram_addr_saved = kmalloc_array(len, 4, GFP_KERNEL);
sound/pci/emu10k1/emufx.c
2625
if (! emu->tram_val_saved || ! emu->tram_addr_saved)
sound/pci/emu10k1/emufx.c
2627
len = emu->audigy ? 2 * 1024 : 2 * 512;
sound/pci/emu10k1/emufx.c
2628
emu->saved_icode = vmalloc(array_size(len, 4));
sound/pci/emu10k1/emufx.c
2629
if (! emu->saved_icode)
sound/pci/emu10k1/emufx.c
2634
void snd_emu10k1_efx_free_pm_buffer(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
2636
kfree(emu->saved_gpr);
sound/pci/emu10k1/emufx.c
2637
kfree(emu->tram_val_saved);
sound/pci/emu10k1/emufx.c
2638
kfree(emu->tram_addr_saved);
sound/pci/emu10k1/emufx.c
2639
vfree(emu->saved_icode);
sound/pci/emu10k1/emufx.c
2645
void snd_emu10k1_efx_suspend(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
2649
len = emu->audigy ? 0x200 : 0x100;
sound/pci/emu10k1/emufx.c
2651
emu->saved_gpr[i] = snd_emu10k1_ptr_read(emu, emu->gpr_base + i, 0);
sound/pci/emu10k1/emufx.c
2653
len = emu->audigy ? 0x100 : 0xa0;
sound/pci/emu10k1/emufx.c
2655
emu->tram_val_saved[i] = snd_emu10k1_ptr_read(emu, TANKMEMDATAREGBASE + i, 0);
sound/pci/emu10k1/emufx.c
2656
emu->tram_addr_saved[i] = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + i, 0);
sound/pci/emu10k1/emufx.c
2657
if (emu->audigy) {
sound/pci/emu10k1/emufx.c
2658
emu->tram_addr_saved[i] >>= 12;
sound/pci/emu10k1/emufx.c
2659
emu->tram_addr_saved[i] |=
sound/pci/emu10k1/emufx.c
2660
snd_emu10k1_ptr_read(emu, A_TANKMEMCTLREGBASE + i, 0) << 20;
sound/pci/emu10k1/emufx.c
2664
len = emu->audigy ? 2 * 1024 : 2 * 512;
sound/pci/emu10k1/emufx.c
2666
emu->saved_icode[i] = snd_emu10k1_efx_read(emu, i);
sound/pci/emu10k1/emufx.c
2669
void snd_emu10k1_efx_resume(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
2674
if (emu->fx8010.etram_pages.bytes > 0) {
sound/pci/emu10k1/emufx.c
2676
size = emu->fx8010.etram_pages.bytes / 2;
sound/pci/emu10k1/emufx.c
2682
outl(HCFG_LOCKTANKCACHE_MASK | inl(emu->port + HCFG), emu->port + HCFG);
sound/pci/emu10k1/emufx.c
2683
snd_emu10k1_ptr_write(emu, TCB, 0, emu->fx8010.etram_pages.addr);
sound/pci/emu10k1/emufx.c
2684
snd_emu10k1_ptr_write(emu, TCBS, 0, size_reg);
sound/pci/emu10k1/emufx.c
2685
outl(inl(emu->port + HCFG) & ~HCFG_LOCKTANKCACHE_MASK, emu->port + HCFG);
sound/pci/emu10k1/emufx.c
2688
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2689
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg | A_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
2691
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_SINGLE_STEP);
sound/pci/emu10k1/emufx.c
2693
len = emu->audigy ? 0x200 : 0x100;
sound/pci/emu10k1/emufx.c
2695
snd_emu10k1_ptr_write(emu, emu->gpr_base + i, 0, emu->saved_gpr[i]);
sound/pci/emu10k1/emufx.c
2697
len = emu->audigy ? 0x100 : 0xa0;
sound/pci/emu10k1/emufx.c
2699
snd_emu10k1_ptr_write(emu, TANKMEMDATAREGBASE + i, 0,
sound/pci/emu10k1/emufx.c
2700
emu->tram_val_saved[i]);
sound/pci/emu10k1/emufx.c
2701
if (! emu->audigy)
sound/pci/emu10k1/emufx.c
2702
snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0,
sound/pci/emu10k1/emufx.c
2703
emu->tram_addr_saved[i]);
sound/pci/emu10k1/emufx.c
2705
snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0,
sound/pci/emu10k1/emufx.c
2706
emu->tram_addr_saved[i] << 12);
sound/pci/emu10k1/emufx.c
2707
snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0,
sound/pci/emu10k1/emufx.c
2708
emu->tram_addr_saved[i] >> 20);
sound/pci/emu10k1/emufx.c
2712
len = emu->audigy ? 2 * 1024 : 2 * 512;
sound/pci/emu10k1/emufx.c
2714
snd_emu10k1_efx_write(emu, i, emu->saved_icode[i]);
sound/pci/emu10k1/emufx.c
2717
if (emu->audigy)
sound/pci/emu10k1/emufx.c
2718
snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg);
sound/pci/emu10k1/emufx.c
2720
snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg);
sound/pci/emu10k1/emufx.c
362
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emufx.c
380
snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, val);
sound/pci/emu10k1/emufx.c
383
snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, ~val);
sound/pci/emu10k1/emufx.c
386
snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, db_table[val]);
sound/pci/emu10k1/emufx.c
389
snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0,
sound/pci/emu10k1/emufx.c
398
snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[j * ctl->vcount + i], 0, bass_table[val][j]);
sound/pci/emu10k1/emufx.c
406
snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[j * ctl->vcount + i], 0, treble_table[val][j]);
sound/pci/emu10k1/emufx.c
409
snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, onoff_table[val]);
sound/pci/emu10k1/emufx.c
421
static void snd_emu10k1_fx8010_interrupt(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emufx.c
425
irq = emu->fx8010.irq_handlers;
sound/pci/emu10k1/emufx.c
428
if (snd_emu10k1_ptr_read(emu, emu->gpr_base + irq->gpr_running, 0) & 0xffff0000) {
sound/pci/emu10k1/emufx.c
430
irq->handler(emu, irq->private_data);
sound/pci/emu10k1/emufx.c
431
snd_emu10k1_ptr_write(emu, emu->gpr_base + irq->gpr_running, 0, 1);
sound/pci/emu10k1/emufx.c
437
int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
447
guard(spinlock_irqsave)(&emu->fx8010.irq_lock);
sound/pci/emu10k1/emufx.c
448
if (emu->fx8010.irq_handlers == NULL) {
sound/pci/emu10k1/emufx.c
449
emu->fx8010.irq_handlers = irq;
sound/pci/emu10k1/emufx.c
450
emu->dsp_interrupt = snd_emu10k1_fx8010_interrupt;
sound/pci/emu10k1/emufx.c
451
snd_emu10k1_intr_enable(emu, INTE_FXDSPENABLE);
sound/pci/emu10k1/emufx.c
453
irq->next = emu->fx8010.irq_handlers;
sound/pci/emu10k1/emufx.c
454
emu->fx8010.irq_handlers = irq;
sound/pci/emu10k1/emufx.c
459
int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
464
guard(spinlock_irqsave)(&emu->fx8010.irq_lock);
sound/pci/emu10k1/emufx.c
465
tmp = emu->fx8010.irq_handlers;
sound/pci/emu10k1/emufx.c
467
emu->fx8010.irq_handlers = tmp->next;
sound/pci/emu10k1/emufx.c
468
if (emu->fx8010.irq_handlers == NULL) {
sound/pci/emu10k1/emufx.c
469
snd_emu10k1_intr_disable(emu, INTE_FXDSPENABLE);
sound/pci/emu10k1/emufx.c
470
emu->dsp_interrupt = NULL;
sound/pci/emu10k1/emufx.c
519
static void snd_emu10k1_efx_write(struct snd_emu10k1 *emu, unsigned int pc, unsigned int data)
sound/pci/emu10k1/emufx.c
521
pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE;
sound/pci/emu10k1/emufx.c
522
snd_emu10k1_ptr_write(emu, pc, 0, data);
sound/pci/emu10k1/emufx.c
525
unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc)
sound/pci/emu10k1/emufx.c
527
pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE;
sound/pci/emu10k1/emufx.c
528
return snd_emu10k1_ptr_read(emu, pc, 0);
sound/pci/emu10k1/emufx.c
531
static int snd_emu10k1_gpr_poke(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
538
for (gpr = 0; gpr < (emu->audigy ? 0x200 : 0x100); gpr++) {
sound/pci/emu10k1/emufx.c
545
snd_emu10k1_ptr_write(emu, emu->gpr_base + gpr, 0, val);
sound/pci/emu10k1/emufx.c
550
static int snd_emu10k1_gpr_peek(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
556
for (gpr = 0; gpr < (emu->audigy ? 0x200 : 0x100); gpr++) {
sound/pci/emu10k1/emufx.c
558
val = snd_emu10k1_ptr_read(emu, emu->gpr_base + gpr, 0);
sound/pci/emu10k1/emufx.c
565
static int snd_emu10k1_tram_poke(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
572
for (tram = 0; tram < (emu->audigy ? 0x100 : 0xa0); tram++) {
sound/pci/emu10k1/emufx.c
583
snd_emu10k1_ptr_write(emu, TANKMEMDATAREGBASE + tram, 0, val);
sound/pci/emu10k1/emufx.c
584
if (!emu->audigy) {
sound/pci/emu10k1/emufx.c
585
snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + tram, 0, addr);
sound/pci/emu10k1/emufx.c
587
snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + tram, 0, addr << 12);
sound/pci/emu10k1/emufx.c
588
snd_emu10k1_ptr_write(emu, A_TANKMEMCTLREGBASE + tram, 0, addr >> 20);
sound/pci/emu10k1/emufx.c
594
static int snd_emu10k1_tram_peek(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
601
for (tram = 0; tram < (emu->audigy ? 0x100 : 0xa0); tram++) {
sound/pci/emu10k1/emufx.c
603
val = snd_emu10k1_ptr_read(emu, TANKMEMDATAREGBASE + tram, 0);
sound/pci/emu10k1/emufx.c
604
if (!emu->audigy) {
sound/pci/emu10k1/emufx.c
605
addr = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + tram, 0);
sound/pci/emu10k1/emufx.c
607
addr = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + tram, 0) >> 12;
sound/pci/emu10k1/emufx.c
608
addr |= snd_emu10k1_ptr_read(emu, A_TANKMEMCTLREGBASE + tram, 0) << 20;
sound/pci/emu10k1/emufx.c
617
static int snd_emu10k1_code_poke(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
623
for (pc = 0; pc < (emu->audigy ? 2*1024 : 2*512); pc += 2) {
sound/pci/emu10k1/emufx.c
634
snd_emu10k1_efx_write(emu, pc + 0, lo);
sound/pci/emu10k1/emufx.c
635
snd_emu10k1_efx_write(emu, pc + 1, hi);
sound/pci/emu10k1/emufx.c
640
static int snd_emu10k1_code_peek(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
646
for (pc = 0; pc < (emu->audigy ? 2*1024 : 2*512); pc += 2) {
sound/pci/emu10k1/emufx.c
648
if (put_user(snd_emu10k1_efx_read(emu, pc + 0),
sound/pci/emu10k1/emufx.c
651
if (put_user(snd_emu10k1_efx_read(emu, pc + 1),
sound/pci/emu10k1/emufx.c
659
snd_emu10k1_look_for_ctl(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
666
list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) {
sound/pci/emu10k1/emufx.c
704
static int copy_gctl(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
714
if (emu->support_tlv) {
sound/pci/emu10k1/emufx.c
732
static int copy_gctl_to_user(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
741
if (emu->support_tlv)
sound/pci/emu10k1/emufx.c
761
static int snd_emu10k1_verify_controls(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
776
if (snd_emu10k1_look_for_ctl(emu, &id) == NULL)
sound/pci/emu10k1/emufx.c
784
if (copy_gctl(emu, gctl, icode->gpr_add_controls, i,
sound/pci/emu10k1/emufx.c
789
if (snd_emu10k1_look_for_ctl(emu, &gctl->id))
sound/pci/emu10k1/emufx.c
792
if (snd_ctl_find_id(emu->card, gctl_id)) {
sound/pci/emu10k1/emufx.c
832
if (copy_gctl(emu, gctl, icode->gpr_list_controls, i,
sound/pci/emu10k1/emufx.c
854
static int snd_emu10k1_add_controls(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
876
if (copy_gctl(emu, gctl, icode->gpr_add_controls, i,
sound/pci/emu10k1/emufx.c
891
ctl = snd_emu10k1_look_for_ctl(emu, &gctl->id);
sound/pci/emu10k1/emufx.c
925
kctl = snd_ctl_new1(&knew, emu);
sound/pci/emu10k1/emufx.c
926
err = snd_ctl_add(emu->card, kctl);
sound/pci/emu10k1/emufx.c
934
list_add_tail(&ctl->list, &emu->fx8010.gpr_ctl);
sound/pci/emu10k1/emufx.c
940
snd_ctl_notify(emu->card, SNDRV_CTL_EVENT_MASK_VALUE |
sound/pci/emu10k1/emufx.c
952
static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
959
struct snd_card *card = emu->card;
sound/pci/emu10k1/emufx.c
967
ctl = snd_emu10k1_look_for_ctl(emu, &id);
sound/pci/emu10k1/emufx.c
974
static int snd_emu10k1_list_controls(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emufx.c
987
list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) {
sound/pci/emu10k1/emumixer.c
1026
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1028
ucontrol->value.enumerated.item[0] = emu->emu1010.clock_fallback;
sound/pci/emu10k1/emumixer.c
1035
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1041
change = (emu->emu1010.clock_fallback != val);
sound/pci/emu10k1/emumixer.c
1043
emu->emu1010.clock_fallback = val;
sound/pci/emu10k1/emumixer.c
1044
snd_emu1010_fpga_write_lock(emu, EMU_HANA_DEFCLOCK, 1 - val);
sound/pci/emu10k1/emumixer.c
1073
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1075
ucontrol->value.enumerated.item[0] = emu->emu1010.optical_out;
sound/pci/emu10k1/emumixer.c
1082
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1091
change = (emu->emu1010.optical_out != val);
sound/pci/emu10k1/emumixer.c
1093
emu->emu1010.optical_out = val;
sound/pci/emu10k1/emumixer.c
1094
tmp = (emu->emu1010.optical_in ? EMU_HANA_OPTICAL_IN_ADAT : EMU_HANA_OPTICAL_IN_SPDIF) |
sound/pci/emu10k1/emumixer.c
1095
(emu->emu1010.optical_out ? EMU_HANA_OPTICAL_OUT_ADAT : EMU_HANA_OPTICAL_OUT_SPDIF);
sound/pci/emu10k1/emumixer.c
1096
snd_emu1010_fpga_write_lock(emu, EMU_HANA_OPTICAL_TYPE, tmp);
sound/pci/emu10k1/emumixer.c
1124
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1126
ucontrol->value.enumerated.item[0] = emu->emu1010.optical_in;
sound/pci/emu10k1/emumixer.c
1133
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1142
change = (emu->emu1010.optical_in != val);
sound/pci/emu10k1/emumixer.c
1144
emu->emu1010.optical_in = val;
sound/pci/emu10k1/emumixer.c
1145
tmp = (emu->emu1010.optical_in ? EMU_HANA_OPTICAL_IN_ADAT : EMU_HANA_OPTICAL_IN_SPDIF) |
sound/pci/emu10k1/emumixer.c
1146
(emu->emu1010.optical_out ? EMU_HANA_OPTICAL_OUT_ADAT : EMU_HANA_OPTICAL_OUT_SPDIF);
sound/pci/emu10k1/emumixer.c
1147
snd_emu1010_fpga_write_lock(emu, EMU_HANA_OPTICAL_TYPE, tmp);
sound/pci/emu10k1/emumixer.c
1180
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1182
ucontrol->value.enumerated.item[0] = emu->i2c_capture_source;
sound/pci/emu10k1/emumixer.c
1189
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1204
change = (emu->i2c_capture_source != source_id);
sound/pci/emu10k1/emumixer.c
1206
snd_emu10k1_i2c_write(emu, ADC_MUX, 0); /* Mute input */
sound/pci/emu10k1/emumixer.c
1207
scoped_guard(spinlock_irq, &emu->emu_lock) {
sound/pci/emu10k1/emumixer.c
1208
gpio = inw(emu->port + A_IOCFG);
sound/pci/emu10k1/emumixer.c
1210
outw(gpio | 0x4, emu->port + A_IOCFG);
sound/pci/emu10k1/emumixer.c
1212
outw(gpio & ~0x4, emu->port + A_IOCFG);
sound/pci/emu10k1/emumixer.c
1215
ngain = emu->i2c_capture_volume[source_id][0]; /* Left */
sound/pci/emu10k1/emumixer.c
1216
ogain = emu->i2c_capture_volume[emu->i2c_capture_source][0]; /* Left */
sound/pci/emu10k1/emumixer.c
1218
snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff));
sound/pci/emu10k1/emumixer.c
1219
ngain = emu->i2c_capture_volume[source_id][1]; /* Right */
sound/pci/emu10k1/emumixer.c
1220
ogain = emu->i2c_capture_volume[emu->i2c_capture_source][1]; /* Right */
sound/pci/emu10k1/emumixer.c
1222
snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff));
sound/pci/emu10k1/emumixer.c
1225
snd_emu10k1_i2c_write(emu, ADC_MUX, source); /* Set source */
sound/pci/emu10k1/emumixer.c
1226
emu->i2c_capture_source = source_id;
sound/pci/emu10k1/emumixer.c
1253
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1262
ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0];
sound/pci/emu10k1/emumixer.c
1263
ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1];
sound/pci/emu10k1/emumixer.c
1270
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1287
ogain = emu->i2c_capture_volume[source_id][0]; /* Left */
sound/pci/emu10k1/emumixer.c
1289
if (emu->i2c_capture_source == source_id)
sound/pci/emu10k1/emumixer.c
1290
snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ngain0);
sound/pci/emu10k1/emumixer.c
1291
emu->i2c_capture_volume[source_id][0] = ngain0;
sound/pci/emu10k1/emumixer.c
1294
ogain = emu->i2c_capture_volume[source_id][1]; /* Right */
sound/pci/emu10k1/emumixer.c
1296
if (emu->i2c_capture_source == source_id)
sound/pci/emu10k1/emumixer.c
1297
snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ngain1);
sound/pci/emu10k1/emumixer.c
1298
emu->i2c_capture_volume[source_id][1] = ngain1;
sound/pci/emu10k1/emumixer.c
1331
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1334
tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0);
sound/pci/emu10k1/emumixer.c
1354
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1374
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emumixer.c
1375
reg = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0);
sound/pci/emu10k1/emumixer.c
1380
snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, 0, tmp);
sound/pci/emu10k1/emumixer.c
1399
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1411
change = val != emu->spdif_bits[idx];
sound/pci/emu10k1/emumixer.c
1413
snd_emu10k1_ptr_write(emu, SPCS0 + idx, 0, val);
sound/pci/emu10k1/emumixer.c
1414
emu->spdif_bits[idx] = val;
sound/pci/emu10k1/emumixer.c
1440
static void update_emu10k1_fxrt(struct snd_emu10k1 *emu, int voice, unsigned char *route)
sound/pci/emu10k1/emumixer.c
1442
if (emu->audigy) {
sound/pci/emu10k1/emumixer.c
1443
snd_emu10k1_ptr_write_multiple(emu, voice,
sound/pci/emu10k1/emumixer.c
1448
snd_emu10k1_ptr_write(emu, FXRT, voice,
sound/pci/emu10k1/emumixer.c
1453
static void update_emu10k1_send_volume(struct snd_emu10k1 *emu, int voice, unsigned char *volume)
sound/pci/emu10k1/emumixer.c
1455
snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_A, voice, volume[0]);
sound/pci/emu10k1/emumixer.c
1456
snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_B, voice, volume[1]);
sound/pci/emu10k1/emumixer.c
1457
snd_emu10k1_ptr_write(emu, PSST_FXSENDAMOUNT_C, voice, volume[2]);
sound/pci/emu10k1/emumixer.c
1458
snd_emu10k1_ptr_write(emu, DSL_FXSENDAMOUNT_D, voice, volume[3]);
sound/pci/emu10k1/emumixer.c
1459
if (emu->audigy) {
sound/pci/emu10k1/emumixer.c
1460
snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, voice,
sound/pci/emu10k1/emumixer.c
1469
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1471
uinfo->count = emu->audigy ? 3*8 : 3*4;
sound/pci/emu10k1/emumixer.c
1473
uinfo->value.integer.max = emu->audigy ? 0x3f : 0x0f;
sound/pci/emu10k1/emumixer.c
1480
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1482
&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1484
int num_efx = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1485
int mask = emu->audigy ? 0x3f : 0x0f;
sound/pci/emu10k1/emumixer.c
1497
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1499
&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1501
int num_efx = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1502
int mask = emu->audigy ? 0x3f : 0x0f;
sound/pci/emu10k1/emumixer.c
1504
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emumixer.c
1515
update_emu10k1_fxrt(emu, mix->epcm->voices[0]->number,
sound/pci/emu10k1/emumixer.c
1517
update_emu10k1_fxrt(emu, mix->epcm->voices[0]->number + 1,
sound/pci/emu10k1/emumixer.c
1520
update_emu10k1_fxrt(emu, mix->epcm->voices[0]->number,
sound/pci/emu10k1/emumixer.c
1540
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1542
uinfo->count = emu->audigy ? 3*8 : 3*4;
sound/pci/emu10k1/emumixer.c
1551
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1553
&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1555
int num_efx = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1565
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1567
&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1569
int num_efx = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1571
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emumixer.c
1581
update_emu10k1_send_volume(emu, mix->epcm->voices[0]->number,
sound/pci/emu10k1/emumixer.c
1583
update_emu10k1_send_volume(emu, mix->epcm->voices[0]->number + 1,
sound/pci/emu10k1/emumixer.c
1586
update_emu10k1_send_volume(emu, mix->epcm->voices[0]->number,
sound/pci/emu10k1/emumixer.c
1616
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1618
&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1629
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1631
&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1634
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emumixer.c
1645
snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[0]->number, mix->attn[1]);
sound/pci/emu10k1/emumixer.c
1646
snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[0]->number + 1, mix->attn[2]);
sound/pci/emu10k1/emumixer.c
1648
snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[0]->number, mix->attn[0]);
sound/pci/emu10k1/emumixer.c
1669
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1671
uinfo->count = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1673
uinfo->value.integer.max = emu->audigy ? 0x3f : 0x0f;
sound/pci/emu10k1/emumixer.c
1680
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1682
&emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1684
int num_efx = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1685
int mask = emu->audigy ? 0x3f : 0x0f;
sound/pci/emu10k1/emumixer.c
1696
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1698
struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
sound/pci/emu10k1/emumixer.c
1700
int num_efx = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1701
int mask = emu->audigy ? 0x3f : 0x0f;
sound/pci/emu10k1/emumixer.c
1703
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emumixer.c
1714
update_emu10k1_fxrt(emu, mix->epcm->voices[ch]->number,
sound/pci/emu10k1/emumixer.c
1734
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1736
uinfo->count = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1745
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1747
&emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1749
int num_efx = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1759
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1761
struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
sound/pci/emu10k1/emumixer.c
1763
int num_efx = emu->audigy ? 8 : 4;
sound/pci/emu10k1/emumixer.c
1765
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emumixer.c
1775
update_emu10k1_send_volume(emu, mix->epcm->voices[ch]->number,
sound/pci/emu10k1/emumixer.c
1806
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1808
&emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
sound/pci/emu10k1/emumixer.c
1817
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1819
struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
sound/pci/emu10k1/emumixer.c
1823
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emumixer.c
1832
snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[ch]->number, mix->attn[0]);
sound/pci/emu10k1/emumixer.c
1854
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1856
if (emu->audigy)
sound/pci/emu10k1/emumixer.c
1857
ucontrol->value.integer.value[0] = inw(emu->port + A_IOCFG) & A_IOCFG_GPOUT0 ? 1 : 0;
sound/pci/emu10k1/emumixer.c
1859
ucontrol->value.integer.value[0] = inl(emu->port + HCFG) & HCFG_GPOUT0 ? 1 : 0;
sound/pci/emu10k1/emumixer.c
1860
if (emu->card_capabilities->invert_shared_spdif)
sound/pci/emu10k1/emumixer.c
1870
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1875
if (emu->card_capabilities->invert_shared_spdif)
sound/pci/emu10k1/emumixer.c
1877
guard(spinlock_irq)(&emu->emu_lock);
sound/pci/emu10k1/emumixer.c
1878
if ( emu->card_capabilities->i2c_adc) {
sound/pci/emu10k1/emumixer.c
1880
} else if (emu->audigy) {
sound/pci/emu10k1/emumixer.c
1881
reg = inw(emu->port + A_IOCFG);
sound/pci/emu10k1/emumixer.c
1887
outw(reg | val, emu->port + A_IOCFG);
sound/pci/emu10k1/emumixer.c
1890
reg = inl(emu->port + HCFG);
sound/pci/emu10k1/emumixer.c
1896
outl(reg | val, emu->port + HCFG);
sound/pci/emu10k1/emumixer.c
1926
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1930
val = snd_ac97_read(emu->ac97, AC97_REC_GAIN);
sound/pci/emu10k1/emumixer.c
1938
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
1945
return snd_ac97_update(emu->ac97, AC97_REC_GAIN, val);
sound/pci/emu10k1/emumixer.c
1962
struct snd_emu10k1 *emu = ac97->private_data;
sound/pci/emu10k1/emumixer.c
1963
emu->ac97 = NULL;
sound/pci/emu10k1/emumixer.c
1987
int snd_emu10k1_mixer(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emumixer.c
1992
struct snd_card *card = emu->card;
sound/pci/emu10k1/emumixer.c
2110
if (emu->card_capabilities->ac97_chip) {
sound/pci/emu10k1/emumixer.c
2118
err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus);
sound/pci/emu10k1/emumixer.c
2124
ac97.private_data = emu;
sound/pci/emu10k1/emumixer.c
2127
err = snd_ac97_mixer(pbus, &ac97, &emu->ac97);
sound/pci/emu10k1/emumixer.c
2129
if (emu->card_capabilities->ac97_chip == 1)
sound/pci/emu10k1/emumixer.c
2131
dev_info(emu->card->dev,
sound/pci/emu10k1/emumixer.c
2133
dev_info(emu->card->dev,
sound/pci/emu10k1/emumixer.c
2135
snd_device_free(emu->card, pbus);
sound/pci/emu10k1/emumixer.c
2138
if (emu->audigy) {
sound/pci/emu10k1/emumixer.c
2140
snd_ac97_write_cache(emu->ac97, AC97_MASTER, 0x0000);
sound/pci/emu10k1/emumixer.c
2142
snd_ac97_write_cache(emu->ac97, AC97_REC_SEL, 0x0000);
sound/pci/emu10k1/emumixer.c
2144
snd_ac97_update_bits(emu->ac97, AC97_GENERAL_PURPOSE,
sound/pci/emu10k1/emumixer.c
2146
if (emu->card_capabilities->adc_1361t)
sound/pci/emu10k1/emumixer.c
2156
if (emu->ac97->id == AC97_ID_STAC9758) {
sound/pci/emu10k1/emumixer.c
2157
emu->rear_ac97 = 1;
sound/pci/emu10k1/emumixer.c
2158
snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT);
sound/pci/emu10k1/emumixer.c
2159
snd_ac97_write_cache(emu->ac97, AC97_HEADPHONE, 0x0202);
sound/pci/emu10k1/emumixer.c
2164
snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202);
sound/pci/emu10k1/emumixer.c
2165
snd_ac97_write_cache(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202);
sound/pci/emu10k1/emumixer.c
2170
} else if (emu->card_capabilities->i2c_adc) {
sound/pci/emu10k1/emumixer.c
2176
if (emu->card_capabilities->ecard)
sound/pci/emu10k1/emumixer.c
2177
strscpy(emu->card->mixername, "EMU APS");
sound/pci/emu10k1/emumixer.c
2178
else if (emu->audigy)
sound/pci/emu10k1/emumixer.c
2179
strscpy(emu->card->mixername, "SB Audigy");
sound/pci/emu10k1/emumixer.c
2181
strscpy(emu->card->mixername, "Emu10k1");
sound/pci/emu10k1/emumixer.c
2184
if (emu->audigy)
sound/pci/emu10k1/emumixer.c
2185
if (emu->card_capabilities->adc_1361t)
sound/pci/emu10k1/emumixer.c
2187
else if (emu->card_capabilities->i2c_adc)
sound/pci/emu10k1/emumixer.c
2196
if (emu->card_capabilities->subsystem == 0x80401102) { /* SB Live! Platinum CT4760P */
sound/pci/emu10k1/emumixer.c
2202
if (emu->card_capabilities->subsystem == 0x20071102) { /* Audigy 4 Pro */
sound/pci/emu10k1/emumixer.c
2208
kctl = emu->ctl_send_routing = snd_ctl_new1(&snd_emu10k1_send_routing_control, emu);
sound/pci/emu10k1/emumixer.c
2215
kctl = emu->ctl_send_volume = snd_ctl_new1(&snd_emu10k1_send_volume_control, emu);
sound/pci/emu10k1/emumixer.c
2222
kctl = emu->ctl_attn = snd_ctl_new1(&snd_emu10k1_attn_control, emu);
sound/pci/emu10k1/emumixer.c
2230
kctl = emu->ctl_efx_send_routing = snd_ctl_new1(&snd_emu10k1_efx_send_routing_control, emu);
sound/pci/emu10k1/emumixer.c
2238
kctl = emu->ctl_efx_send_volume = snd_ctl_new1(&snd_emu10k1_efx_send_volume_control, emu);
sound/pci/emu10k1/emumixer.c
2246
kctl = emu->ctl_efx_attn = snd_ctl_new1(&snd_emu10k1_efx_attn_control, emu);
sound/pci/emu10k1/emumixer.c
2254
if (!emu->card_capabilities->ecard && !emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emumixer.c
2256
kctl = snd_ctl_new1(&snd_emu10k1_spdif_mask_control, emu);
sound/pci/emu10k1/emumixer.c
2259
if (!emu->audigy)
sound/pci/emu10k1/emumixer.c
2260
kctl->id.device = emu->pcm_efx->device;
sound/pci/emu10k1/emumixer.c
2264
kctl = snd_ctl_new1(&snd_emu10k1_spdif_control, emu);
sound/pci/emu10k1/emumixer.c
2267
if (!emu->audigy)
sound/pci/emu10k1/emumixer.c
2268
kctl->id.device = emu->pcm_efx->device;
sound/pci/emu10k1/emumixer.c
2274
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emumixer.c
2276
} else if (emu->audigy) {
sound/pci/emu10k1/emumixer.c
2277
kctl = snd_ctl_new1(&snd_audigy_shared_spdif, emu);
sound/pci/emu10k1/emumixer.c
2284
kctl = snd_ctl_new1(&snd_audigy_spdif_output_rate, emu);
sound/pci/emu10k1/emumixer.c
2291
} else if (! emu->card_capabilities->ecard) {
sound/pci/emu10k1/emumixer.c
2293
kctl = snd_ctl_new1(&snd_emu10k1_shared_spdif, emu);
sound/pci/emu10k1/emumixer.c
2300
if (emu->card_capabilities->ca0151_chip) { /* P16V */
sound/pci/emu10k1/emumixer.c
2301
err = snd_p16v_mixer(emu);
sound/pci/emu10k1/emumixer.c
2306
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emumixer.c
2307
unsigned i, emu_idx = emu1010_idx(emu);
sound/pci/emu10k1/emumixer.c
2313
emu->emu1010.input_source[i] =
sound/pci/emu10k1/emumixer.c
2316
emu->emu1010.output_source[i] =
sound/pci/emu10k1/emumixer.c
2318
scoped_guard(snd_emu1010_fpga_lock, emu) {
sound/pci/emu10k1/emumixer.c
2319
snd_emu1010_apply_sources(emu);
sound/pci/emu10k1/emumixer.c
2322
kctl = emu->ctl_clock_source = snd_ctl_new1(&snd_emu1010_clock_source, emu);
sound/pci/emu10k1/emumixer.c
2327
snd_ctl_new1(&snd_emu1010_clock_fallback, emu));
sound/pci/emu10k1/emumixer.c
2331
err = add_ctls(emu, &emu1010_adc_pads_ctl,
sound/pci/emu10k1/emumixer.c
2335
err = add_ctls(emu, &emu1010_dac_pads_ctl,
sound/pci/emu10k1/emumixer.c
2340
if (!emu->card_capabilities->no_adat) {
sound/pci/emu10k1/emumixer.c
2342
snd_ctl_new1(&snd_emu1010_optical_out, emu));
sound/pci/emu10k1/emumixer.c
2346
snd_ctl_new1(&snd_emu1010_optical_in, emu));
sound/pci/emu10k1/emumixer.c
2351
err = add_emu1010_source_mixers(emu);
sound/pci/emu10k1/emumixer.c
2356
if ( emu->card_capabilities->i2c_adc) {
sound/pci/emu10k1/emumixer.c
2357
err = snd_ctl_add(card, snd_ctl_new1(&snd_audigy_i2c_capture_source, emu));
sound/pci/emu10k1/emumixer.c
2361
err = add_ctls(emu, &i2c_volume_ctl,
sound/pci/emu10k1/emumixer.c
2368
if (emu->card_capabilities->ac97_chip && emu->audigy) {
sound/pci/emu10k1/emumixer.c
2370
emu));
sound/pci/emu10k1/emumixer.c
28
static int add_ctls(struct snd_emu10k1 *emu, const struct snd_kcontrol_new *tpl,
sound/pci/emu10k1/emumixer.c
37
err = snd_ctl_add(emu->card, snd_ctl_new1(&kctl, emu));
sound/pci/emu10k1/emumixer.c
55
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
577
static unsigned emu1010_idx(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emumixer.c
579
return emu->card_capabilities->emu_model - 1;
sound/pci/emu10k1/emumixer.c
582
static void snd_emu1010_output_source_apply(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emumixer.c
586
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
588
snd_emu1010_fpga_link_dst_src_write(emu,
sound/pci/emu10k1/emumixer.c
592
static void snd_emu1010_input_source_apply(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emumixer.c
596
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
598
snd_emu1010_fpga_link_dst_src_write(emu,
sound/pci/emu10k1/emumixer.c
602
static void snd_emu1010_apply_sources(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emumixer.c
605
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
609
emu, i, emu->emu1010.output_source[i]);
sound/pci/emu10k1/emumixer.c
61
ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff;
sound/pci/emu10k1/emumixer.c
612
emu, i, emu->emu1010.input_source[i]);
sound/pci/emu10k1/emumixer.c
62
ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff;
sound/pci/emu10k1/emumixer.c
627
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
629
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
63
ucontrol->value.iec958.status[2] = (emu->spdif_bits[idx] >> 16) & 0xff;
sound/pci/emu10k1/emumixer.c
637
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
639
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
64
ucontrol->value.iec958.status[3] = (emu->spdif_bits[idx] >> 24) & 0xff;
sound/pci/emu10k1/emumixer.c
644
ucontrol->value.enumerated.item[0] = emu->emu1010.output_source[channel];
sound/pci/emu10k1/emumixer.c
651
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
653
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
662
change = (emu->emu1010.output_source[channel] != val);
sound/pci/emu10k1/emumixer.c
664
emu->emu1010.output_source[channel] = val;
sound/pci/emu10k1/emumixer.c
665
guard(snd_emu1010_fpga_lock)(emu);
sound/pci/emu10k1/emumixer.c
666
snd_emu1010_output_source_apply(emu, channel, val);
sound/pci/emu10k1/emumixer.c
682
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
684
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
689
ucontrol->value.enumerated.item[0] = emu->emu1010.input_source[channel];
sound/pci/emu10k1/emumixer.c
696
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
698
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
707
change = (emu->emu1010.input_source[channel] != val);
sound/pci/emu10k1/emumixer.c
709
emu->emu1010.input_source[channel] = val;
sound/pci/emu10k1/emumixer.c
710
guard(snd_emu1010_fpga_lock)(emu);
sound/pci/emu10k1/emumixer.c
711
snd_emu1010_input_source_apply(emu, channel, val);
sound/pci/emu10k1/emumixer.c
724
static int add_emu1010_source_mixers(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emumixer.c
727
&emu1010_routing_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
730
err = add_ctls(emu, &emu1010_output_source_ctl,
sound/pci/emu10k1/emumixer.c
734
err = add_ctls(emu, &emu1010_input_source_ctl,
sound/pci/emu10k1/emumixer.c
758
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
761
ucontrol->value.integer.value[0] = (emu->emu1010.adc_pads & mask) ? 1 : 0;
sound/pci/emu10k1/emumixer.c
767
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
773
cache = emu->emu1010.adc_pads;
sound/pci/emu10k1/emumixer.c
778
change = (cache != emu->emu1010.adc_pads);
sound/pci/emu10k1/emumixer.c
780
snd_emu1010_fpga_write_lock(emu, EMU_HANA_ADC_PADS, cache );
sound/pci/emu10k1/emumixer.c
781
emu->emu1010.adc_pads = cache;
sound/pci/emu10k1/emumixer.c
816
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
819
ucontrol->value.integer.value[0] = (emu->emu1010.dac_pads & mask) ? 1 : 0;
sound/pci/emu10k1/emumixer.c
825
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
831
cache = emu->emu1010.dac_pads;
sound/pci/emu10k1/emumixer.c
836
change = (cache != emu->emu1010.dac_pads);
sound/pci/emu10k1/emumixer.c
838
snd_emu1010_fpga_write_lock(emu, EMU_HANA_DAC_PADS, cache );
sound/pci/emu10k1/emumixer.c
839
emu->emu1010.dac_pads = cache;
sound/pci/emu10k1/emumixer.c
958
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
960
&emu1010_clock_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
968
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
970
ucontrol->value.enumerated.item[0] = emu->emu1010.clock_source;
sound/pci/emu10k1/emumixer.c
977
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emumixer.c
979
&emu1010_clock_info[emu1010_idx(emu)];
sound/pci/emu10k1/emumixer.c
985
guard(snd_emu1010_fpga_lock)(emu);
sound/pci/emu10k1/emumixer.c
986
scoped_guard(spinlock_irq, &emu->reg_lock) {
sound/pci/emu10k1/emumixer.c
987
if (emu->emu1010.clock_source == val)
sound/pci/emu10k1/emumixer.c
989
emu->emu1010.clock_source = val;
sound/pci/emu10k1/emumixer.c
990
emu->emu1010.wclock = emu_ci->vals[val];
sound/pci/emu10k1/emumixer.c
991
snd_emu1010_update_clock(emu);
sound/pci/emu10k1/emumixer.c
993
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_MUTE);
sound/pci/emu10k1/emumixer.c
994
snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK, emu->emu1010.wclock);
sound/pci/emu10k1/emumixer.c
998
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE);
sound/pci/emu10k1/emumpu401.c
100
static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int status)
sound/pci/emu10k1/emumpu401.c
102
do_emu10k1_midi_interrupt(emu, &emu->midi2, status);
sound/pci/emu10k1/emumpu401.c
105
static int snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack)
sound/pci/emu10k1/emumpu401.c
110
mpu401_write_data(emu, midi, 0x00);
sound/pci/emu10k1/emumpu401.c
113
mpu401_write_cmd(emu, midi, cmd);
sound/pci/emu10k1/emumpu401.c
118
if (mpu401_input_avail(emu, midi)) {
sound/pci/emu10k1/emumpu401.c
119
if (mpu401_read_data(emu, midi) == MPU401_ACK)
sound/pci/emu10k1/emumpu401.c
123
if (!ok && mpu401_read_data(emu, midi) == MPU401_ACK)
sound/pci/emu10k1/emumpu401.c
130
dev_err(emu->card->dev,
sound/pci/emu10k1/emumpu401.c
132
cmd, emu->port,
sound/pci/emu10k1/emumpu401.c
133
mpu401_read_stat(emu, midi),
sound/pci/emu10k1/emumpu401.c
134
mpu401_read_data(emu, midi));
sound/pci/emu10k1/emumpu401.c
142
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emumpu401.c
145
emu = midi->emu;
sound/pci/emu10k1/emumpu401.c
146
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emumpu401.c
15
static inline unsigned char mpu401_read(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emumpu401.c
154
if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1))
sound/pci/emu10k1/emumpu401.c
156
if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
sound/pci/emu10k1/emumpu401.c
163
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emumpu401.c
166
emu = midi->emu;
sound/pci/emu10k1/emumpu401.c
167
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emumpu401.c
175
if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1))
sound/pci/emu10k1/emumpu401.c
177
if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
sound/pci/emu10k1/emumpu401.c
18
if (emu->audigy)
sound/pci/emu10k1/emumpu401.c
184
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emumpu401.c
187
emu = midi->emu;
sound/pci/emu10k1/emumpu401.c
188
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emumpu401.c
19
return (unsigned char)snd_emu10k1_ptr_read(emu, mpu->port + idx, 0);
sound/pci/emu10k1/emumpu401.c
191
snd_emu10k1_intr_disable(emu, midi->rx_enable);
sound/pci/emu10k1/emumpu401.c
197
return snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0);
sound/pci/emu10k1/emumpu401.c
202
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emumpu401.c
205
emu = midi->emu;
sound/pci/emu10k1/emumpu401.c
206
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emumpu401.c
209
snd_emu10k1_intr_disable(emu, midi->tx_enable);
sound/pci/emu10k1/emumpu401.c
21
return inb(emu->port + mpu->port + idx);
sound/pci/emu10k1/emumpu401.c
215
return snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0);
sound/pci/emu10k1/emumpu401.c
220
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emumpu401.c
222
emu = midi->emu;
sound/pci/emu10k1/emumpu401.c
223
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emumpu401.c
227
snd_emu10k1_intr_enable(emu, midi->rx_enable);
sound/pci/emu10k1/emumpu401.c
229
snd_emu10k1_intr_disable(emu, midi->rx_enable);
sound/pci/emu10k1/emumpu401.c
234
struct snd_emu10k1 *emu;
sound/pci/emu10k1/emumpu401.c
237
emu = midi->emu;
sound/pci/emu10k1/emumpu401.c
238
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/emumpu401.c
24
static inline void mpu401_write(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emumpu401.c
248
if (mpu401_output_ready(emu, midi)) {
sound/pci/emu10k1/emumpu401.c
254
mpu401_write_data(emu, midi, byte);
sound/pci/emu10k1/emumpu401.c
261
snd_emu10k1_intr_enable(emu, midi->tx_enable);
sound/pci/emu10k1/emumpu401.c
263
snd_emu10k1_intr_disable(emu, midi->tx_enable);
sound/pci/emu10k1/emumpu401.c
27
if (emu->audigy)
sound/pci/emu10k1/emumpu401.c
28
snd_emu10k1_ptr_write(emu, mpu->port + idx, 0, data);
sound/pci/emu10k1/emumpu401.c
292
static int emu10k1_midi_init(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, int device, char *name)
sound/pci/emu10k1/emumpu401.c
297
err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi);
sound/pci/emu10k1/emumpu401.c
30
outb(data, emu->port + mpu->port + idx);
sound/pci/emu10k1/emumpu401.c
300
midi->emu = emu;
sound/pci/emu10k1/emumpu401.c
316
int snd_emu10k1_midi(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emumpu401.c
318
struct snd_emu10k1_midi *midi = &emu->midi;
sound/pci/emu10k1/emumpu401.c
321
err = emu10k1_midi_init(emu, midi, 0, "EMU10K1 MPU-401 (UART)");
sound/pci/emu10k1/emumpu401.c
33
#define mpu401_write_data(emu, mpu, data) mpu401_write(emu, mpu, data, 0)
sound/pci/emu10k1/emumpu401.c
334
int snd_emu10k1_audigy_midi(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emumpu401.c
339
midi = &emu->midi;
sound/pci/emu10k1/emumpu401.c
34
#define mpu401_write_cmd(emu, mpu, data) mpu401_write(emu, mpu, data, 1)
sound/pci/emu10k1/emumpu401.c
340
err = emu10k1_midi_init(emu, midi, 0, "Audigy MPU-401 (UART)");
sound/pci/emu10k1/emumpu401.c
35
#define mpu401_read_data(emu, mpu) mpu401_read(emu, mpu, 0)
sound/pci/emu10k1/emumpu401.c
351
midi = &emu->midi2;
sound/pci/emu10k1/emumpu401.c
352
err = emu10k1_midi_init(emu, midi, 1, "Audigy MPU-401 #2");
sound/pci/emu10k1/emumpu401.c
36
#define mpu401_read_stat(emu, mpu) mpu401_read(emu, mpu, 1)
sound/pci/emu10k1/emumpu401.c
38
#define mpu401_input_avail(emu,mpu) (!(mpu401_read_stat(emu,mpu) & 0x80))
sound/pci/emu10k1/emumpu401.c
39
#define mpu401_output_ready(emu,mpu) (!(mpu401_read_stat(emu,mpu) & 0x40))
sound/pci/emu10k1/emumpu401.c
45
static void mpu401_clear_rx(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *mpu)
sound/pci/emu10k1/emumpu401.c
48
for (; timeout > 0 && mpu401_input_avail(emu, mpu); timeout--)
sound/pci/emu10k1/emumpu401.c
49
mpu401_read_data(emu, mpu);
sound/pci/emu10k1/emumpu401.c
52
dev_err(emu->card->dev,
sound/pci/emu10k1/emumpu401.c
54
mpu401_read_stat(emu, mpu));
sound/pci/emu10k1/emumpu401.c
62
static void do_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, unsigned int status)
sound/pci/emu10k1/emumpu401.c
67
snd_emu10k1_intr_disable(emu, midi->tx_enable | midi->rx_enable);
sound/pci/emu10k1/emumpu401.c
72
if ((status & midi->ipr_rx) && mpu401_input_avail(emu, midi)) {
sound/pci/emu10k1/emumpu401.c
74
mpu401_clear_rx(emu, midi);
sound/pci/emu10k1/emumpu401.c
76
byte = mpu401_read_data(emu, midi);
sound/pci/emu10k1/emumpu401.c
84
if ((status & midi->ipr_tx) && mpu401_output_ready(emu, midi)) {
sound/pci/emu10k1/emumpu401.c
87
mpu401_write_data(emu, midi, byte);
sound/pci/emu10k1/emumpu401.c
89
snd_emu10k1_intr_disable(emu, midi->tx_enable);
sound/pci/emu10k1/emumpu401.c
95
static void snd_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, unsigned int status)
sound/pci/emu10k1/emumpu401.c
97
do_emu10k1_midi_interrupt(emu, &emu->midi, status);
sound/pci/emu10k1/emupcm.c
104
err = snd_emu10k1_voice_alloc(epcm->emu,
sound/pci/emu10k1/emupcm.c
1063
static void snd_emu10k1_pcm_mixer_notify1(struct snd_emu10k1 *emu, struct snd_kcontrol *kctl, int idx, int activate)
sound/pci/emu10k1/emupcm.c
1073
snd_ctl_notify(emu->card, SNDRV_CTL_EVENT_MASK_VALUE |
sound/pci/emu10k1/emupcm.c
1078
static void snd_emu10k1_pcm_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate)
sound/pci/emu10k1/emupcm.c
1080
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_routing, idx, activate);
sound/pci/emu10k1/emupcm.c
1081
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_volume, idx, activate);
sound/pci/emu10k1/emupcm.c
1082
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_attn, idx, activate);
sound/pci/emu10k1/emupcm.c
1085
static void snd_emu10k1_pcm_efx_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate)
sound/pci/emu10k1/emupcm.c
1087
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_routing, idx, activate);
sound/pci/emu10k1/emupcm.c
1088
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_volume, idx, activate);
sound/pci/emu10k1/emupcm.c
1089
snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_attn, idx, activate);
sound/pci/emu10k1/emupcm.c
1099
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1104
mix = &emu->efx_pcm_mixer[i];
sound/pci/emu10k1/emupcm.c
1106
snd_emu10k1_pcm_efx_mixer_notify(emu, i, 0);
sound/pci/emu10k1/emupcm.c
1129
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1138
epcm->emu = emu;
sound/pci/emu10k1/emupcm.c
1145
if (emu->card_capabilities->emu_model)
sound/pci/emu10k1/emupcm.c
1146
snd_emu1010_constrain_efx_rate(emu, runtime);
sound/pci/emu10k1/emupcm.c
1154
mix = &emu->efx_pcm_mixer[i];
sound/pci/emu10k1/emupcm.c
1161
snd_emu10k1_pcm_efx_mixer_notify(emu, i, 1);
sound/pci/emu10k1/emupcm.c
1168
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1177
epcm->emu = emu;
sound/pci/emu10k1/emupcm.c
1188
if (emu->card_capabilities->emu_model)
sound/pci/emu10k1/emupcm.c
1189
sample_rate = emu->emu1010.word_clock;
sound/pci/emu10k1/emupcm.c
1197
mix = &emu->pcm_mixer[substream->number];
sound/pci/emu10k1/emupcm.c
1205
snd_emu10k1_pcm_mixer_notify(emu, substream->number, 1);
sound/pci/emu10k1/emupcm.c
1211
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1212
struct snd_emu10k1_pcm_mixer *mix = &emu->pcm_mixer[substream->number];
sound/pci/emu10k1/emupcm.c
1215
snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0);
sound/pci/emu10k1/emupcm.c
1221
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1228
epcm->emu = emu;
sound/pci/emu10k1/emupcm.c
1235
epcm->capture_idx_reg = emu->audigy ? A_ADCIDX : ADCIDX;
sound/pci/emu10k1/emupcm.c
1239
snd_emu10k1_constrain_capture_rates(emu, runtime);
sound/pci/emu10k1/emupcm.c
1242
emu->capture_interrupt = snd_emu10k1_pcm_ac97adc_interrupt;
sound/pci/emu10k1/emupcm.c
1243
emu->pcm_capture_substream = substream;
sound/pci/emu10k1/emupcm.c
1249
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1251
emu->capture_interrupt = NULL;
sound/pci/emu10k1/emupcm.c
1252
emu->pcm_capture_substream = NULL;
sound/pci/emu10k1/emupcm.c
1258
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1265
epcm->emu = emu;
sound/pci/emu10k1/emupcm.c
1272
epcm->capture_idx_reg = emu->audigy ? A_MICIDX : MICIDX;
sound/pci/emu10k1/emupcm.c
1280
emu->capture_mic_interrupt = snd_emu10k1_pcm_ac97mic_interrupt;
sound/pci/emu10k1/emupcm.c
1281
emu->pcm_capture_mic_substream = substream;
sound/pci/emu10k1/emupcm.c
1287
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1289
emu->capture_mic_interrupt = NULL;
sound/pci/emu10k1/emupcm.c
1290
emu->pcm_capture_mic_substream = NULL;
sound/pci/emu10k1/emupcm.c
1296
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1299
int nefx = emu->audigy ? 64 : 32;
sound/pci/emu10k1/emupcm.c
1305
epcm->emu = emu;
sound/pci/emu10k1/emupcm.c
1316
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emupcm.c
1317
snd_emu1010_constrain_efx_rate(emu, runtime);
sound/pci/emu10k1/emupcm.c
1339
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
1342
if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) {
sound/pci/emu10k1/emupcm.c
1347
epcm->capture_cr_val = emu->efx_voices_mask[0];
sound/pci/emu10k1/emupcm.c
1348
epcm->capture_cr_val2 = emu->efx_voices_mask[1];
sound/pci/emu10k1/emupcm.c
1358
emu->capture_efx_interrupt = snd_emu10k1_pcm_efx_interrupt;
sound/pci/emu10k1/emupcm.c
1359
emu->pcm_capture_efx_substream = substream;
sound/pci/emu10k1/emupcm.c
1365
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1367
emu->capture_efx_interrupt = NULL;
sound/pci/emu10k1/emupcm.c
1368
emu->pcm_capture_efx_substream = NULL;
sound/pci/emu10k1/emupcm.c
1401
int snd_emu10k1_pcm(struct snd_emu10k1 *emu, int device)
sound/pci/emu10k1/emupcm.c
1407
err = snd_pcm_new(emu->card, "emu10k1", device, 32, 1, &pcm);
sound/pci/emu10k1/emupcm.c
1411
pcm->private_data = emu;
sound/pci/emu10k1/emupcm.c
1419
emu->pcm = pcm;
sound/pci/emu10k1/emupcm.c
1424
&emu->pci->dev,
sound/pci/emu10k1/emupcm.c
1429
&emu->pci->dev, 64*1024, 64*1024);
sound/pci/emu10k1/emupcm.c
1434
int snd_emu10k1_pcm_multi(struct snd_emu10k1 *emu, int device)
sound/pci/emu10k1/emupcm.c
1440
err = snd_pcm_new(emu->card, "emu10k1", device, 1, 0, &pcm);
sound/pci/emu10k1/emupcm.c
1444
pcm->private_data = emu;
sound/pci/emu10k1/emupcm.c
1451
emu->pcm_multi = pcm;
sound/pci/emu10k1/emupcm.c
1455
&emu->pci->dev,
sound/pci/emu10k1/emupcm.c
1470
int snd_emu10k1_pcm_mic(struct snd_emu10k1 *emu, int device)
sound/pci/emu10k1/emupcm.c
1475
err = snd_pcm_new(emu->card, "emu10k1 mic", device, 0, 1, &pcm);
sound/pci/emu10k1/emupcm.c
1479
pcm->private_data = emu;
sound/pci/emu10k1/emupcm.c
1485
emu->pcm_mic = pcm;
sound/pci/emu10k1/emupcm.c
1487
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &emu->pci->dev,
sound/pci/emu10k1/emupcm.c
1495
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emupcm.c
1496
int nefx = emu->audigy ? 64 : 32;
sound/pci/emu10k1/emupcm.c
1506
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emupcm.c
1507
int nefx = emu->audigy ? 64 : 32;
sound/pci/emu10k1/emupcm.c
1511
ucontrol->value.integer.value[idx] = (emu->efx_voices_mask[idx / 32] & (1 << (idx % 32))) ? 1 : 0;
sound/pci/emu10k1/emupcm.c
1517
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/emupcm.c
1519
int nefx = emu->audigy ? 64 : 32;
sound/pci/emu10k1/emupcm.c
1532
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
1533
change = (nval[0] != emu->efx_voices_mask[0]) ||
sound/pci/emu10k1/emupcm.c
1534
(nval[1] != emu->efx_voices_mask[1]);
sound/pci/emu10k1/emupcm.c
1535
emu->efx_voices_mask[0] = nval[0];
sound/pci/emu10k1/emupcm.c
1536
emu->efx_voices_mask[1] = nval[1];
sound/pci/emu10k1/emupcm.c
1562
static void snd_emu10k1_fx8010_playback_irq(struct snd_emu10k1 *emu, void *private_data)
sound/pci/emu10k1/emupcm.c
1596
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1597
struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
sound/pci/emu10k1/emupcm.c
1606
snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + tram_pos,
sound/pci/emu10k1/emupcm.c
1607
(unsigned short *)emu->fx8010.etram_pages.area + tram_pos + tram_size / 2,
sound/pci/emu10k1/emupcm.c
1614
snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + tram_pos,
sound/pci/emu10k1/emupcm.c
1615
(unsigned short *)emu->fx8010.etram_pages.area + tram_pos + tram_size / 2,
sound/pci/emu10k1/emupcm.c
1624
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1625
struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
sound/pci/emu10k1/emupcm.c
1633
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1634
struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
sound/pci/emu10k1/emupcm.c
1638
snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0);
sound/pci/emu10k1/emupcm.c
1644
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1646
struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
sound/pci/emu10k1/emupcm.c
1660
snd_emu10k1_ptr_write_multiple(emu, 0,
sound/pci/emu10k1/emupcm.c
1661
emu->gpr_base + pcm->gpr_running, 0, /* reset */
sound/pci/emu10k1/emupcm.c
1662
emu->gpr_base + pcm->gpr_trigger, 0, /* reset */
sound/pci/emu10k1/emupcm.c
1663
emu->gpr_base + pcm->gpr_size, runtime->buffer_size,
sound/pci/emu10k1/emupcm.c
1664
emu->gpr_base + pcm->gpr_ptr, 0, /* reset ptr number */
sound/pci/emu10k1/emupcm.c
1665
emu->gpr_base + pcm->gpr_count, runtime->period_size,
sound/pci/emu10k1/emupcm.c
1666
emu->gpr_base + pcm->gpr_tmpcount, runtime->period_size,
sound/pci/emu10k1/emupcm.c
1669
snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels));
sound/pci/emu10k1/emupcm.c
1675
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1676
struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
sound/pci/emu10k1/emupcm.c
1679
guard(spinlock)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
1693
snd_emu10k1_ptr_write(emu, SPCS0 + i, 0, bits);
sound/pci/emu10k1/emupcm.c
1697
result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq);
sound/pci/emu10k1/emupcm.c
1701
snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1);
sound/pci/emu10k1/emupcm.c
1706
snd_emu10k1_fx8010_unregister_irq_handler(emu, &pcm->irq);
sound/pci/emu10k1/emupcm.c
1707
snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0);
sound/pci/emu10k1/emupcm.c
1719
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1720
struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
sound/pci/emu10k1/emupcm.c
1723
if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0))
sound/pci/emu10k1/emupcm.c
1725
ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0) << 2;
sound/pci/emu10k1/emupcm.c
1751
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1753
struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
sound/pci/emu10k1/emupcm.c
1758
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
1767
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
1768
struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
sound/pci/emu10k1/emupcm.c
1770
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
1785
int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device)
sound/pci/emu10k1/emupcm.c
1791
err = snd_pcm_new(emu->card, "emu10k1 efx", device, emu->audigy ? 0 : 8, 1, &pcm);
sound/pci/emu10k1/emupcm.c
1795
pcm->private_data = emu;
sound/pci/emu10k1/emupcm.c
1797
if (!emu->audigy)
sound/pci/emu10k1/emupcm.c
1802
if (emu->audigy)
sound/pci/emu10k1/emupcm.c
1806
emu->pcm_efx = pcm;
sound/pci/emu10k1/emupcm.c
1808
if (!emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emupcm.c
1812
if (emu->audigy) {
sound/pci/emu10k1/emupcm.c
1813
emu->efx_voices_mask[0] = 0;
sound/pci/emu10k1/emupcm.c
1814
emu->efx_voices_mask[1] = 0xffff;
sound/pci/emu10k1/emupcm.c
1816
emu->efx_voices_mask[0] = 0xffff0000;
sound/pci/emu10k1/emupcm.c
1817
emu->efx_voices_mask[1] = 0;
sound/pci/emu10k1/emupcm.c
1819
kctl = snd_ctl_new1(&snd_emu10k1_pcm_efx_voices_mask, emu);
sound/pci/emu10k1/emupcm.c
1823
err = snd_ctl_add(emu->card, kctl);
sound/pci/emu10k1/emupcm.c
1832
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &emu->pci->dev,
sound/pci/emu10k1/emupcm.c
185
static void snd_emu10k1_constrain_capture_rates(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
188
if (emu->card_capabilities->emu_model &&
sound/pci/emu10k1/emupcm.c
189
emu->emu1010.word_clock == 44100) {
sound/pci/emu10k1/emupcm.c
195
} else if (emu->audigy) {
sound/pci/emu10k1/emupcm.c
20
static void snd_emu10k1_pcm_interrupt(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
202
static void snd_emu1010_constrain_efx_rate(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
207
rate = emu->emu1010.word_clock;
sound/pci/emu10k1/emupcm.c
260
static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
273
silent_page = ((unsigned int)emu->silent_page.addr << emu->address_mode) |
sound/pci/emu10k1/emupcm.c
274
(emu->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MASK0);
sound/pci/emu10k1/emupcm.c
275
snd_emu10k1_ptr_write_multiple(emu, voice,
sound/pci/emu10k1/emupcm.c
296
if (emu->audigy) {
sound/pci/emu10k1/emupcm.c
297
snd_emu10k1_ptr_write_multiple(emu, voice,
sound/pci/emu10k1/emupcm.c
305
snd_emu10k1_ptr_write(emu, A_CSBA + i, voice, (amh << 16) | aml);
sound/pci/emu10k1/emupcm.c
308
snd_emu10k1_ptr_write(emu, FXRT, voice,
sound/pci/emu10k1/emupcm.c
31
dev_dbg(emu->card->dev,
sound/pci/emu10k1/emupcm.c
312
emu->voices[voice].dirty = 1;
sound/pci/emu10k1/emupcm.c
315
static void snd_emu10k1_pcm_init_voices(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
322
guard(spinlock_irq)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
323
snd_emu10k1_pcm_init_voice(emu, evoice, w_16, stereo,
sound/pci/emu10k1/emupcm.c
328
snd_emu10k1_pcm_init_voice(emu, evoice + 1, w_16, true,
sound/pci/emu10k1/emupcm.c
33
epcm->substream->runtime->hw->pointer(emu, epcm->substream),
sound/pci/emu10k1/emupcm.c
334
static void snd_emu10k1_pcm_init_extra_voice(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
343
snd_emu10k1_pcm_init_voice(emu, evoice, w_16, false,
sound/pci/emu10k1/emupcm.c
351
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
372
if (emu->iommu_workaround)
sound/pci/emu10k1/emupcm.c
377
if (emu->iommu_workaround && runtime->dma_bytes >= EMUPAGESIZE)
sound/pci/emu10k1/emupcm.c
382
snd_emu10k1_free_pages(emu, epcm->memblk);
sound/pci/emu10k1/emupcm.c
383
epcm->memblk = snd_emu10k1_alloc_pages(emu, substream);
sound/pci/emu10k1/emupcm.c
397
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
40
static void snd_emu10k1_pcm_ac97adc_interrupt(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
405
snd_emu10k1_voice_free(epcm->emu, epcm->extra);
sound/pci/emu10k1/emupcm.c
410
snd_emu10k1_free_pages(emu, epcm->memblk);
sound/pci/emu10k1/emupcm.c
420
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
429
if (emu->card_capabilities->emu_model &&
sound/pci/emu10k1/emupcm.c
430
emu->emu1010.word_clock == 44100)
sound/pci/emu10k1/emupcm.c
436
snd_emu10k1_pcm_init_extra_voice(emu, epcm->extra, w_16,
sound/pci/emu10k1/emupcm.c
441
snd_emu10k1_pcm_init_voices(emu, epcm->voices[0], w_16, stereo,
sound/pci/emu10k1/emupcm.c
443
&emu->pcm_mixer[substream->number]);
sound/pci/emu10k1/emupcm.c
45
if (emu->pcm_capture_substream->runtime->mode == SNDRV_PCM_MODE_FRAME)
sound/pci/emu10k1/emupcm.c
450
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
464
snd_emu10k1_pcm_init_extra_voice(emu, epcm->extra, true,
sound/pci/emu10k1/emupcm.c
469
snd_emu10k1_pcm_init_voices(emu, epcm->voices[i], true, false,
sound/pci/emu10k1/emupcm.c
471
&emu->efx_pcm_mixer[i]);
sound/pci/emu10k1/emupcm.c
49
snd_pcm_period_elapsed(emu->pcm_capture_substream);
sound/pci/emu10k1/emupcm.c
499
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
505
snd_emu10k1_ptr_write(emu, epcm->capture_bs_reg, 0, 0);
sound/pci/emu10k1/emupcm.c
508
snd_emu10k1_ptr_write(emu, ADCCR, 0, 0);
sound/pci/emu10k1/emupcm.c
511
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emupcm.c
517
if (emu->audigy) {
sound/pci/emu10k1/emupcm.c
518
snd_emu10k1_ptr_write_multiple(emu, 0,
sound/pci/emu10k1/emupcm.c
52
static void snd_emu10k1_pcm_ac97mic_interrupt(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
523
snd_emu10k1_ptr_write(emu, FXWC, 0, 0);
sound/pci/emu10k1/emupcm.c
528
snd_emu10k1_ptr_write(emu, epcm->capture_ba_reg, 0, runtime->dma_addr);
sound/pci/emu10k1/emupcm.c
546
epcm->capture_cr_val = emu->audigy ? A_ADCCR_LCHANENABLE : ADCCR_LCHANENABLE;
sound/pci/emu10k1/emupcm.c
548
epcm->capture_cr_val |= emu->audigy ? A_ADCCR_RCHANENABLE : ADCCR_RCHANENABLE;
sound/pci/emu10k1/emupcm.c
549
epcm->capture_cr_val |= emu->audigy ?
sound/pci/emu10k1/emupcm.c
556
static void snd_emu10k1_playback_fill_cache(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
569
snd_emu10k1_ptr_write(emu, CD0 + i, voice, sample);
sound/pci/emu10k1/emupcm.c
57
if (emu->pcm_capture_mic_substream->runtime->mode == SNDRV_PCM_MODE_FRAME)
sound/pci/emu10k1/emupcm.c
575
snd_emu10k1_ptr_write(emu, CCR, voice + 1, ccr);
sound/pci/emu10k1/emupcm.c
577
snd_emu10k1_ptr_write(emu, CCR, voice, ccr);
sound/pci/emu10k1/emupcm.c
580
static void snd_emu10k1_playback_prepare_voices(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
600
snd_emu10k1_ptr_write(emu, CCCA_CURRADDR, voice, loop_start);
sound/pci/emu10k1/emupcm.c
602
snd_emu10k1_playback_fill_cache(emu, voice, sample, stereo);
sound/pci/emu10k1/emupcm.c
61
snd_pcm_period_elapsed(emu->pcm_capture_mic_substream);
sound/pci/emu10k1/emupcm.c
622
snd_emu10k1_ptr_write(emu, CCCA_CURRADDR, epcm->extra->number, eloop_start);
sound/pci/emu10k1/emupcm.c
628
static void snd_emu10k1_playback_commit_volume(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
632
snd_emu10k1_ptr_write_multiple(emu, evoice->number,
sound/pci/emu10k1/emupcm.c
638
static void snd_emu10k1_playback_unmute_voice(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
64
static void snd_emu10k1_pcm_efx_interrupt(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
648
snd_emu10k1_playback_commit_volume(emu, evoice, vattn);
sound/pci/emu10k1/emupcm.c
651
static void snd_emu10k1_playback_unmute_voices(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
656
snd_emu10k1_playback_unmute_voice(emu, evoice, stereo, true, mix);
sound/pci/emu10k1/emupcm.c
658
snd_emu10k1_playback_unmute_voice(emu, evoice + 1, true, false, mix);
sound/pci/emu10k1/emupcm.c
661
static void snd_emu10k1_playback_mute_voice(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
664
snd_emu10k1_playback_commit_volume(emu, evoice, 0);
sound/pci/emu10k1/emupcm.c
667
static void snd_emu10k1_playback_mute_voices(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
671
snd_emu10k1_playback_mute_voice(emu, evoice);
sound/pci/emu10k1/emupcm.c
673
snd_emu10k1_playback_mute_voice(emu, evoice + 1);
sound/pci/emu10k1/emupcm.c
676
static void snd_emu10k1_playback_commit_pitch(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
679
u32 ptrx = snd_emu10k1_ptr_read(emu, PTRX, voice);
sound/pci/emu10k1/emupcm.c
680
u32 cpf = snd_emu10k1_ptr_read(emu, CPF, voice);
sound/pci/emu10k1/emupcm.c
681
snd_emu10k1_ptr_write_multiple(emu, voice,
sound/pci/emu10k1/emupcm.c
687
static void snd_emu10k1_playback_trigger_voice(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
69
if (emu->pcm_capture_efx_substream->runtime->mode == SNDRV_PCM_MODE_FRAME)
sound/pci/emu10k1/emupcm.c
693
snd_emu10k1_playback_commit_pitch(emu, voice, evoice->epcm->pitch_target << 16);
sound/pci/emu10k1/emupcm.c
696
static void snd_emu10k1_playback_stop_voice(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
702
snd_emu10k1_playback_commit_pitch(emu, voice, 0);
sound/pci/emu10k1/emupcm.c
705
static void snd_emu10k1_playback_set_running(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
709
snd_emu10k1_voice_intr_enable(emu, epcm->extra->number);
sound/pci/emu10k1/emupcm.c
712
static void snd_emu10k1_playback_set_stopped(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
715
snd_emu10k1_voice_intr_disable(emu, epcm->extra->number);
sound/pci/emu10k1/emupcm.c
722
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
73
snd_pcm_period_elapsed(emu->pcm_capture_efx_substream);
sound/pci/emu10k1/emupcm.c
734
guard(spinlock)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
737
snd_emu10k1_playback_prepare_voices(emu, epcm, w_16, stereo, 1);
sound/pci/emu10k1/emupcm.c
741
mix = &emu->pcm_mixer[substream->number];
sound/pci/emu10k1/emupcm.c
742
snd_emu10k1_playback_unmute_voices(emu, epcm->voices[0], stereo, mix);
sound/pci/emu10k1/emupcm.c
743
snd_emu10k1_playback_set_running(emu, epcm);
sound/pci/emu10k1/emupcm.c
744
snd_emu10k1_playback_trigger_voice(emu, epcm->voices[0]);
sound/pci/emu10k1/emupcm.c
745
snd_emu10k1_playback_trigger_voice(emu, epcm->extra);
sound/pci/emu10k1/emupcm.c
750
snd_emu10k1_playback_stop_voice(emu, epcm->voices[0]);
sound/pci/emu10k1/emupcm.c
751
snd_emu10k1_playback_stop_voice(emu, epcm->extra);
sound/pci/emu10k1/emupcm.c
752
snd_emu10k1_playback_set_stopped(emu, epcm);
sound/pci/emu10k1/emupcm.c
753
snd_emu10k1_playback_mute_voices(emu, epcm->voices[0], stereo);
sound/pci/emu10k1/emupcm.c
764
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
768
guard(spinlock)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
773
outl(epcm->capture_ipr, emu->port + IPR);
sound/pci/emu10k1/emupcm.c
774
snd_emu10k1_intr_enable(emu, epcm->capture_inte);
sound/pci/emu10k1/emupcm.c
781
snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val);
sound/pci/emu10k1/emupcm.c
784
if (emu->audigy) {
sound/pci/emu10k1/emupcm.c
785
snd_emu10k1_ptr_write_multiple(emu, 0,
sound/pci/emu10k1/emupcm.c
789
dev_dbg(emu->card->dev,
sound/pci/emu10k1/emupcm.c
794
snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val);
sound/pci/emu10k1/emupcm.c
799
snd_emu10k1_ptr_write(emu, epcm->capture_bs_reg, 0, epcm->capture_bs_val);
sound/pci/emu10k1/emupcm.c
80
snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]);
sound/pci/emu10k1/emupcm.c
806
snd_emu10k1_intr_disable(emu, epcm->capture_inte);
sound/pci/emu10k1/emupcm.c
807
outl(epcm->capture_ipr, emu->port + IPR);
sound/pci/emu10k1/emupcm.c
808
snd_emu10k1_ptr_write(emu, epcm->capture_bs_reg, 0, 0);
sound/pci/emu10k1/emupcm.c
811
snd_emu10k1_ptr_write(emu, ADCCR, 0, 0);
sound/pci/emu10k1/emupcm.c
814
if (emu->audigy) {
sound/pci/emu10k1/emupcm.c
815
snd_emu10k1_ptr_write_multiple(emu, 0,
sound/pci/emu10k1/emupcm.c
820
snd_emu10k1_ptr_write(emu, FXWC, 0, 0);
sound/pci/emu10k1/emupcm.c
834
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
842
ptr = snd_emu10k1_ptr_read(emu, CCCA, epcm->voices[0]->number) & 0x00ffffff;
sound/pci/emu10k1/emupcm.c
879
static void snd_emu10k1_efx_playback_freeze_voices(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
885
snd_emu10k1_ptr_write(emu, CPF_STOP, voice, 1);
sound/pci/emu10k1/emupcm.c
886
snd_emu10k1_playback_commit_pitch(emu, voice, PITCH_48000 << 16);
sound/pci/emu10k1/emupcm.c
890
static void snd_emu10k1_efx_playback_unmute_voices(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
895
snd_emu10k1_playback_unmute_voice(emu, epcm->voices[i], false, true,
sound/pci/emu10k1/emupcm.c
896
&emu->efx_pcm_mixer[i]);
sound/pci/emu10k1/emupcm.c
899
static void snd_emu10k1_efx_playback_stop_voices(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emupcm.c
904
snd_emu10k1_playback_stop_voice(emu, epcm->voices[i]);
sound/pci/emu10k1/emupcm.c
905
snd_emu10k1_playback_set_stopped(emu, epcm);
sound/pci/emu10k1/emupcm.c
908
snd_emu10k1_playback_mute_voice(emu, epcm->voices[i]);
sound/pci/emu10k1/emupcm.c
914
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
920
guard(spinlock)(&emu->reg_lock);
sound/pci/emu10k1/emupcm.c
93
err = snd_emu10k1_voice_alloc(epcm->emu,
sound/pci/emu10k1/emupcm.c
930
snd_emu10k1_voice_set_loop_stop_multiple(emu, mask);
sound/pci/emu10k1/emupcm.c
932
emu, epcm, runtime->channels);
sound/pci/emu10k1/emupcm.c
934
emu, epcm, true, false, runtime->channels);
sound/pci/emu10k1/emupcm.c
940
snd_emu10k1_efx_playback_unmute_voices(emu, epcm, runtime->channels);
sound/pci/emu10k1/emupcm.c
942
snd_emu10k1_playback_set_running(emu, epcm);
sound/pci/emu10k1/emupcm.c
943
result = snd_emu10k1_voice_clear_loop_stop_multiple_atomic(emu, mask);
sound/pci/emu10k1/emupcm.c
946
snd_emu10k1_playback_trigger_voice(emu, epcm->extra);
sound/pci/emu10k1/emupcm.c
951
emu, epcm, runtime->channels);
sound/pci/emu10k1/emupcm.c
957
snd_emu10k1_voice_clear_loop_stop_multiple(emu, mask);
sound/pci/emu10k1/emupcm.c
962
snd_emu10k1_playback_stop_voice(emu, epcm->extra);
sound/pci/emu10k1/emupcm.c
964
emu, epcm, runtime->channels);
sound/pci/emu10k1/emupcm.c
977
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/emupcm.c
988
ptr = snd_emu10k1_ptr_read(emu, epcm->capture_idx_reg, 0) & 0x0000ffff;
sound/pci/emu10k1/emuproc.c
105
val = snd_emu10k1_ptr_read(emu, FXRT, idx);
sound/pci/emu10k1/emuproc.c
121
if (!emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emuproc.c
132
if (emu->efx_voices_mask[0] & (1 << idx))
sound/pci/emu10k1/emuproc.c
135
if (emu->audigy) {
sound/pci/emu10k1/emuproc.c
137
if (emu->efx_voices_mask[1] & (1 << idx))
sound/pci/emu10k1/emuproc.c
142
if (emu->efx_voices_mask[0] & ((1 << 16) << idx)) {
sound/pci/emu10k1/emuproc.c
143
if (emu->card_capabilities->sblive51) {
sound/pci/emu10k1/emuproc.c
164
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
168
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emuproc.c
169
guard(snd_emu1010_fpga_lock)(emu);
sound/pci/emu10k1/emuproc.c
174
snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &value);
sound/pci/emu10k1/emuproc.c
179
snd_emu1010_fpga_read(emu, EMU_HANA_LOCK_STS_LO, &value);
sound/pci/emu10k1/emuproc.c
180
snd_emu1010_fpga_read(emu, EMU_HANA_LOCK_STS_HI, &value2);
sound/pci/emu10k1/emuproc.c
184
snd_emu1010_get_raw_rate(emu, EMU_HANA_WCLOCK_HANA_SPDIF_IN));
sound/pci/emu10k1/emuproc.c
185
if (emu->card_capabilities->emu_model != EMU_MODEL_EMU0404) {
sound/pci/emu10k1/emuproc.c
187
snd_emu1010_get_raw_rate(emu, EMU_HANA_WCLOCK_HANA_ADAT_IN));
sound/pci/emu10k1/emuproc.c
189
snd_emu1010_get_raw_rate(emu, EMU_HANA_WCLOCK_2ND_HANA));
sound/pci/emu10k1/emuproc.c
19
static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu,
sound/pci/emu10k1/emuproc.c
191
if (emu->card_capabilities->emu_model == EMU_MODEL_EMU0404 ||
sound/pci/emu10k1/emuproc.c
192
emu->card_capabilities->emu_model == EMU_MODEL_EMU1010)
sound/pci/emu10k1/emuproc.c
194
snd_emu1010_get_raw_rate(emu, EMU_HANA_WCLOCK_SYNC_BNC));
sound/pci/emu10k1/emuproc.c
196
snd_emu1010_fpga_read(emu, EMU_HANA_SPDIF_MODE, &value);
sound/pci/emu10k1/emuproc.c
204
snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS);
sound/pci/emu10k1/emuproc.c
205
snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS);
sound/pci/emu10k1/emuproc.c
208
val = snd_emu10k1_ptr_read(emu, ZVSRCS, 0);
sound/pci/emu10k1/emuproc.c
219
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
221
val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0);
sound/pci/emu10k1/emuproc.c
31
status = snd_emu10k1_ptr_read(emu, status_reg, 0);
sound/pci/emu10k1/emuproc.c
336
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
344
snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name);
sound/pci/emu10k1/emuproc.c
346
for (pc = 0; pc < (emu->audigy ? 1024 : 512); pc++) {
sound/pci/emu10k1/emuproc.c
352
low = snd_emu10k1_efx_read(emu, pc * 2);
sound/pci/emu10k1/emuproc.c
353
high = snd_emu10k1_efx_read(emu, pc * 2 + 1);
sound/pci/emu10k1/emuproc.c
354
if (emu->audigy) {
sound/pci/emu10k1/emuproc.c
388
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
401
offset = emu->audigy ? A_MICROCODEBASE : MICROCODEBASE;
sound/pci/emu10k1/emuproc.c
403
offset = emu->audigy ? A_FXGPREGBASE : FXGPREGBASE;
sound/pci/emu10k1/emuproc.c
411
val = snd_emu10k1_ptr_read(emu, offset + idx + (pos >> 2), 0);
sound/pci/emu10k1/emuproc.c
412
if (tram_addr && emu->audigy) {
sound/pci/emu10k1/emuproc.c
414
val |= snd_emu10k1_ptr_read(emu, 0x100 + idx + (pos >> 2), 0) << 20;
sound/pci/emu10k1/emuproc.c
429
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
439
voice = &emu->voices[idx];
sound/pci/emu10k1/emuproc.c
450
static void snd_emu_proc_emu1010_link_read(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emuproc.c
454
u32 src = snd_emu1010_fpga_link_dst_src_read(emu, dst);
sound/pci/emu10k1/emuproc.c
461
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
465
guard(snd_emu1010_fpga_lock)(emu);
sound/pci/emu10k1/emuproc.c
470
snd_emu1010_fpga_read(emu, i, &value);
sound/pci/emu10k1/emuproc.c
477
snd_emu_proc_emu1010_link_read(emu, buffer, i);
sound/pci/emu10k1/emuproc.c
478
if (emu->card_capabilities->emu_model != EMU_MODEL_EMU0404)
sound/pci/emu10k1/emuproc.c
480
snd_emu_proc_emu1010_link_read(emu, buffer, 0x100 + i);
sound/pci/emu10k1/emuproc.c
481
if (emu->card_capabilities->emu_model != EMU_MODEL_EMU1616)
sound/pci/emu10k1/emuproc.c
483
snd_emu_proc_emu1010_link_read(emu, buffer, 0x200 + i);
sound/pci/emu10k1/emuproc.c
485
snd_emu_proc_emu1010_link_read(emu, buffer, 0x300 + i);
sound/pci/emu10k1/emuproc.c
486
if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) {
sound/pci/emu10k1/emuproc.c
488
snd_emu_proc_emu1010_link_read(emu, buffer, 0x400 + i);
sound/pci/emu10k1/emuproc.c
489
} else if (emu->card_capabilities->emu_model != EMU_MODEL_EMU0404) {
sound/pci/emu10k1/emuproc.c
49
rate = snd_emu10k1_ptr_read(emu, rate_reg, 0);
sound/pci/emu10k1/emuproc.c
491
snd_emu_proc_emu1010_link_read(emu, buffer, 0x400 + i);
sound/pci/emu10k1/emuproc.c
492
if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1010B) {
sound/pci/emu10k1/emuproc.c
494
snd_emu_proc_emu1010_link_read(emu, buffer, 0x500 + i);
sound/pci/emu10k1/emuproc.c
497
snd_emu_proc_emu1010_link_read(emu, buffer, 0x500);
sound/pci/emu10k1/emuproc.c
498
snd_emu_proc_emu1010_link_read(emu, buffer, 0x501);
sound/pci/emu10k1/emuproc.c
499
snd_emu_proc_emu1010_link_read(emu, buffer, 0x600);
sound/pci/emu10k1/emuproc.c
500
snd_emu_proc_emu1010_link_read(emu, buffer, 0x601);
sound/pci/emu10k1/emuproc.c
501
snd_emu_proc_emu1010_link_read(emu, buffer, 0x700);
sound/pci/emu10k1/emuproc.c
502
snd_emu_proc_emu1010_link_read(emu, buffer, 0x701);
sound/pci/emu10k1/emuproc.c
510
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
515
value = inl(emu->port + i);
sound/pci/emu10k1/emuproc.c
523
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
530
outl(val, emu->port + (reg & 0xfffffffc));
sound/pci/emu10k1/emuproc.c
535
static unsigned int snd_ptr_read(struct snd_emu10k1 * emu,
sound/pci/emu10k1/emuproc.c
544
guard(spinlock_irq)(&emu->emu_lock);
sound/pci/emu10k1/emuproc.c
545
outl(regptr, emu->port + iobase + PTR);
sound/pci/emu10k1/emuproc.c
546
return inl(emu->port + iobase + DATA);
sound/pci/emu10k1/emuproc.c
549
static void snd_ptr_write(struct snd_emu10k1 *emu,
sound/pci/emu10k1/emuproc.c
559
guard(spinlock_irq)(&emu->emu_lock);
sound/pci/emu10k1/emuproc.c
560
outl(regptr, emu->port + iobase + PTR);
sound/pci/emu10k1/emuproc.c
561
outl(data, emu->port + iobase + DATA);
sound/pci/emu10k1/emuproc.c
568
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
579
value = snd_ptr_read(emu, iobase, i, j);
sound/pci/emu10k1/emuproc.c
590
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
597
snd_ptr_write(emu, iobase, reg, channel_id, val);
sound/pci/emu10k1/emuproc.c
610
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
612
emu->card_capabilities->ca0108_chip ? 0xa0 : 0x80, 4);
sound/pci/emu10k1/emuproc.c
65
struct snd_emu10k1 *emu = entry->private_data;
sound/pci/emu10k1/emuproc.c
651
int snd_emu10k1_proc_init(struct snd_emu10k1 *emu)
sound/pci/emu10k1/emuproc.c
655
if (emu->card_capabilities->emu_model) {
sound/pci/emu10k1/emuproc.c
656
snd_card_ro_proc_new(emu->card, "emu1010_regs",
sound/pci/emu10k1/emuproc.c
657
emu, snd_emu_proc_emu1010_reg_read);
sound/pci/emu10k1/emuproc.c
659
snd_card_rw_proc_new(emu->card, "io_regs", emu,
sound/pci/emu10k1/emuproc.c
66
const char * const *inputs = emu->audigy ?
sound/pci/emu10k1/emuproc.c
662
snd_card_rw_proc_new(emu->card, "ptr_regs00a", emu,
sound/pci/emu10k1/emuproc.c
665
snd_card_rw_proc_new(emu->card, "ptr_regs00b", emu,
sound/pci/emu10k1/emuproc.c
668
if (!emu->card_capabilities->emu_model &&
sound/pci/emu10k1/emuproc.c
669
(emu->card_capabilities->ca0151_chip || emu->card_capabilities->ca0108_chip)) {
sound/pci/emu10k1/emuproc.c
670
snd_card_rw_proc_new(emu->card, "ptr_regs20a", emu,
sound/pci/emu10k1/emuproc.c
673
snd_card_rw_proc_new(emu->card, "ptr_regs20b", emu,
sound/pci/emu10k1/emuproc.c
676
if (emu->card_capabilities->ca0108_chip)
sound/pci/emu10k1/emuproc.c
677
snd_card_rw_proc_new(emu->card, "ptr_regs20c", emu,
sound/pci/emu10k1/emuproc.c
68
const char * const *outputs = emu->audigy ?
sound/pci/emu10k1/emuproc.c
683
snd_card_ro_proc_new(emu->card, "emu10k1", emu, snd_emu10k1_proc_read);
sound/pci/emu10k1/emuproc.c
685
if (emu->card_capabilities->emu10k2_chip)
sound/pci/emu10k1/emuproc.c
686
snd_card_ro_proc_new(emu->card, "spdif-in", emu,
sound/pci/emu10k1/emuproc.c
688
if (emu->card_capabilities->ca0151_chip)
sound/pci/emu10k1/emuproc.c
689
snd_card_ro_proc_new(emu->card, "capture-rates", emu,
sound/pci/emu10k1/emuproc.c
692
snd_card_ro_proc_new(emu->card, "voices", emu,
sound/pci/emu10k1/emuproc.c
695
if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) {
sound/pci/emu10k1/emuproc.c
697
entry->private_data = emu;
sound/pci/emu10k1/emuproc.c
699
entry->size = emu->audigy ? A_TOTAL_SIZE_GPR : TOTAL_SIZE_GPR;
sound/pci/emu10k1/emuproc.c
70
unsigned short extin_mask = emu->audigy ? ~0 : emu->fx8010.extin_mask;
sound/pci/emu10k1/emuproc.c
702
if (! snd_card_proc_new(emu->card, "fx8010_tram_data", &entry)) {
sound/pci/emu10k1/emuproc.c
704
entry->private_data = emu;
sound/pci/emu10k1/emuproc.c
706
entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_DATA : TOTAL_SIZE_TANKMEM_DATA ;
sound/pci/emu10k1/emuproc.c
709
if (! snd_card_proc_new(emu->card, "fx8010_tram_addr", &entry)) {
sound/pci/emu10k1/emuproc.c
71
unsigned short extout_mask = emu->audigy ? ~0 : emu->fx8010.extout_mask;
sound/pci/emu10k1/emuproc.c
711
entry->private_data = emu;
sound/pci/emu10k1/emuproc.c
713
entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_ADDR : TOTAL_SIZE_TANKMEM_ADDR ;
sound/pci/emu10k1/emuproc.c
716
if (! snd_card_proc_new(emu->card, "fx8010_code", &entry)) {
sound/pci/emu10k1/emuproc.c
718
entry->private_data = emu;
sound/pci/emu10k1/emuproc.c
720
entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE;
sound/pci/emu10k1/emuproc.c
723
snd_card_ro_proc_new(emu->card, "fx8010_acode", emu,
sound/pci/emu10k1/emuproc.c
73
int nefx = emu->audigy ? 32 : 16;
sound/pci/emu10k1/emuproc.c
78
emu->card_capabilities->emu_model ? "E-MU D.A.S." :
sound/pci/emu10k1/emuproc.c
79
emu->card_capabilities->ecard ? "E-MU A.P.S." :
sound/pci/emu10k1/emuproc.c
80
emu->audigy ? "SB Audigy" : "SB Live!");
sound/pci/emu10k1/emuproc.c
81
snd_iprintf(buffer, "Internal TRAM (words) : 0x%x\n", emu->fx8010.itram_size);
sound/pci/emu10k1/emuproc.c
82
snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes / 2);
sound/pci/emu10k1/emuproc.c
86
ptrx = snd_emu10k1_ptr_read(emu, PTRX, idx);
sound/pci/emu10k1/emuproc.c
87
psst = snd_emu10k1_ptr_read(emu, PSST, idx);
sound/pci/emu10k1/emuproc.c
88
dsl = snd_emu10k1_ptr_read(emu, DSL, idx);
sound/pci/emu10k1/emuproc.c
89
if (emu->audigy) {
sound/pci/emu10k1/emuproc.c
90
val = snd_emu10k1_ptr_read(emu, A_FXRT1, idx);
sound/pci/emu10k1/emuproc.c
91
val1 = snd_emu10k1_ptr_read(emu, A_FXRT2, idx);
sound/pci/emu10k1/emuproc.c
92
snda = snd_emu10k1_ptr_read(emu, A_SENDAMOUNTS, idx);
sound/pci/emu10k1/io.c
100
addr_mask = ~((emu->audigy ? A_PTR_ADDRESS_MASK : PTR_ADDRESS_MASK) >> 16);
sound/pci/emu10k1/io.c
103
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
112
outl((reg << 16) | chn, emu->port + PTR);
sound/pci/emu10k1/io.c
113
outl(data, emu->port + DATA);
sound/pci/emu10k1/io.c
120
unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu,
sound/pci/emu10k1/io.c
128
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
129
outl(regptr, emu->port + PTR2);
sound/pci/emu10k1/io.c
130
return inl(emu->port + DATA2);
sound/pci/emu10k1/io.c
133
void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu,
sound/pci/emu10k1/io.c
142
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
143
outl(regptr, emu->port + PTR2);
sound/pci/emu10k1/io.c
144
outl(data, emu->port + DATA2);
sound/pci/emu10k1/io.c
147
int snd_emu10k1_spi_write(struct snd_emu10k1 * emu,
sound/pci/emu10k1/io.c
155
guard(spinlock)(&emu->spi_lock);
sound/pci/emu10k1/io.c
156
if (emu->card_capabilities->ca0108_chip)
sound/pci/emu10k1/io.c
168
tmp = snd_emu10k1_ptr20_read(emu, reg, 0);
sound/pci/emu10k1/io.c
171
snd_emu10k1_ptr20_write(emu, reg, 0, reset | data);
sound/pci/emu10k1/io.c
172
tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* write post */
sound/pci/emu10k1/io.c
173
snd_emu10k1_ptr20_write(emu, reg, 0, set | data);
sound/pci/emu10k1/io.c
178
tmp = snd_emu10k1_ptr20_read(emu, reg, 0);
sound/pci/emu10k1/io.c
188
snd_emu10k1_ptr20_write(emu, reg, 0, reset | data);
sound/pci/emu10k1/io.c
189
tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* Write post */
sound/pci/emu10k1/io.c
19
static inline bool check_ptr_reg(struct snd_emu10k1 *emu, unsigned int reg)
sound/pci/emu10k1/io.c
194
int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu,
sound/pci/emu10k1/io.c
204
dev_err(emu->card->dev, "i2c_write: invalid values.\n");
sound/pci/emu10k1/io.c
209
guard(spinlock)(&emu->i2c_lock);
sound/pci/emu10k1/io.c
21
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/io.c
214
snd_emu10k1_ptr20_write(emu, P17V_I2C_1, 0, tmp);
sound/pci/emu10k1/io.c
215
tmp = snd_emu10k1_ptr20_read(emu, P17V_I2C_1, 0); /* write post */
sound/pci/emu10k1/io.c
221
snd_emu10k1_ptr20_write(emu, P17V_I2C_ADDR, 0, tmp);
sound/pci/emu10k1/io.c
226
status = snd_emu10k1_ptr20_read(emu, P17V_I2C_ADDR, 0);
sound/pci/emu10k1/io.c
23
if (snd_BUG_ON(reg & (emu->audigy ? (0xffff0000 & ~A_PTR_ADDRESS_MASK)
sound/pci/emu10k1/io.c
232
dev_warn(emu->card->dev,
sound/pci/emu10k1/io.c
244
dev_err(emu->card->dev, "Writing to ADC failed!\n");
sound/pci/emu10k1/io.c
245
dev_err(emu->card->dev, "status=0x%x, reg=%d, value=%d\n",
sound/pci/emu10k1/io.c
254
static void snd_emu1010_fpga_write_locked(struct snd_emu10k1 *emu, u32 reg, u32 value)
sound/pci/emu10k1/io.c
261
outw(reg, emu->port + A_GPIO);
sound/pci/emu10k1/io.c
263
outw(reg | 0x80, emu->port + A_GPIO); /* High bit clocks the value into the fpga. */
sound/pci/emu10k1/io.c
265
outw(value, emu->port + A_GPIO);
sound/pci/emu10k1/io.c
267
outw(value | 0x80 , emu->port + A_GPIO); /* High bit clocks the value into the fpga. */
sound/pci/emu10k1/io.c
271
void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value)
sound/pci/emu10k1/io.c
273
if (snd_BUG_ON(!mutex_is_locked(&emu->emu1010.lock)))
sound/pci/emu10k1/io.c
275
snd_emu1010_fpga_write_locked(emu, reg, value);
sound/pci/emu10k1/io.c
278
void snd_emu1010_fpga_write_lock(struct snd_emu10k1 *emu, u32 reg, u32 value)
sound/pci/emu10k1/io.c
280
guard(snd_emu1010_fpga_lock)(emu);
sound/pci/emu10k1/io.c
281
snd_emu1010_fpga_write_locked(emu, reg, value);
sound/pci/emu10k1/io.c
284
void snd_emu1010_fpga_read(struct snd_emu10k1 *emu, u32 reg, u32 *value)
sound/pci/emu10k1/io.c
290
u32 mask = emu->card_capabilities->ca0108_chip ? 0x1f : 0x7f;
sound/pci/emu10k1/io.c
292
if (snd_BUG_ON(!mutex_is_locked(&emu->emu1010.lock)))
sound/pci/emu10k1/io.c
297
outw(reg, emu->port + A_GPIO);
sound/pci/emu10k1/io.c
299
outw(reg | 0x80, emu->port + A_GPIO); /* High bit clocks the value into the fpga. */
sound/pci/emu10k1/io.c
301
*value = ((inw(emu->port + A_GPIO) >> 8) & mask);
sound/pci/emu10k1/io.c
307
void snd_emu1010_fpga_link_dst_src_write(struct snd_emu10k1 *emu, u32 dst, u32 src)
sound/pci/emu10k1/io.c
31
unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn)
sound/pci/emu10k1/io.c
313
snd_emu1010_fpga_write(emu, EMU_HANA_DESTHI, dst >> 8);
sound/pci/emu10k1/io.c
314
snd_emu1010_fpga_write(emu, EMU_HANA_DESTLO, dst & 0x1f);
sound/pci/emu10k1/io.c
315
snd_emu1010_fpga_write(emu, EMU_HANA_SRCHI, src >> 8);
sound/pci/emu10k1/io.c
316
snd_emu1010_fpga_write(emu, EMU_HANA_SRCLO, src & 0x1f);
sound/pci/emu10k1/io.c
319
u32 snd_emu1010_fpga_link_dst_src_read(struct snd_emu10k1 *emu, u32 dst)
sound/pci/emu10k1/io.c
325
snd_emu1010_fpga_write(emu, EMU_HANA_DESTHI, dst >> 8);
sound/pci/emu10k1/io.c
326
snd_emu1010_fpga_write(emu, EMU_HANA_DESTLO, dst & 0x1f);
sound/pci/emu10k1/io.c
327
snd_emu1010_fpga_read(emu, EMU_HANA_SRCHI, &hi);
sound/pci/emu10k1/io.c
328
snd_emu1010_fpga_read(emu, EMU_HANA_SRCLO, &lo);
sound/pci/emu10k1/io.c
332
int snd_emu1010_get_raw_rate(struct snd_emu10k1 *emu, u8 src)
sound/pci/emu10k1/io.c
338
snd_emu1010_fpga_read(emu, EMU_HANA_SPDIF_MODE, &value);
sound/pci/emu10k1/io.c
359
snd_emu1010_fpga_read(emu, reg_hi, &value);
sound/pci/emu10k1/io.c
360
snd_emu1010_fpga_read(emu, reg_lo, &value2);
sound/pci/emu10k1/io.c
365
void snd_emu1010_update_clock(struct snd_emu10k1 *emu)
sound/pci/emu10k1/io.c
37
if (!check_ptr_reg(emu, regptr))
sound/pci/emu10k1/io.c
370
switch (emu->emu1010.wclock) {
sound/pci/emu10k1/io.c
381
emu, emu->emu1010.wclock & EMU_HANA_WCLOCK_SRC_MASK);
sound/pci/emu10k1/io.c
395
emu->emu1010.word_clock = clock;
sound/pci/emu10k1/io.c
40
scoped_guard(spinlock_irqsave, &emu->emu_lock) {
sound/pci/emu10k1/io.c
401
snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, leds);
sound/pci/emu10k1/io.c
404
void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu, int dock,
sound/pci/emu10k1/io.c
41
outl(regptr, emu->port + PTR);
sound/pci/emu10k1/io.c
42
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
423
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG,
sound/pci/emu10k1/io.c
428
outw(0x00, emu->port + A_GPIO);
sound/pci/emu10k1/io.c
429
write_post = inw(emu->port + A_GPIO);
sound/pci/emu10k1/io.c
431
outw(0x80, emu->port + A_GPIO);
sound/pci/emu10k1/io.c
432
write_post = inw(emu->port + A_GPIO);
sound/pci/emu10k1/io.c
443
outw(reg, emu->port + A_GPIO);
sound/pci/emu10k1/io.c
444
write_post = inw(emu->port + A_GPIO);
sound/pci/emu10k1/io.c
445
outw(reg | 0x40, emu->port + A_GPIO);
sound/pci/emu10k1/io.c
446
write_post = inw(emu->port + A_GPIO);
sound/pci/emu10k1/io.c
453
outw(0x10, emu->port + A_GPIO);
sound/pci/emu10k1/io.c
454
write_post = inw(emu->port + A_GPIO);
sound/pci/emu10k1/io.c
457
void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb)
sound/pci/emu10k1/io.c
461
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
462
enable = inl(emu->port + INTE) | intrenb;
sound/pci/emu10k1/io.c
463
outl(enable, emu->port + INTE);
sound/pci/emu10k1/io.c
466
void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb)
sound/pci/emu10k1/io.c
470
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
471
enable = inl(emu->port + INTE) & ~intrenb;
sound/pci/emu10k1/io.c
472
outl(enable, emu->port + INTE);
sound/pci/emu10k1/io.c
475
void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum)
sound/pci/emu10k1/io.c
479
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
481
outl(CLIEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
482
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
485
outl(CLIEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
486
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
489
outl(val, emu->port + DATA);
sound/pci/emu10k1/io.c
492
void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum)
sound/pci/emu10k1/io.c
496
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
498
outl(CLIEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
499
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
502
outl(CLIEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
503
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
506
outl(val, emu->port + DATA);
sound/pci/emu10k1/io.c
509
void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum)
sound/pci/emu10k1/io.c
511
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
513
outl(CLIPH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
516
outl(CLIPL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
519
outl(voicenum, emu->port + DATA);
sound/pci/emu10k1/io.c
522
void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum)
sound/pci/emu10k1/io.c
526
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
528
outl(HLIEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
529
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
532
outl(HLIEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
533
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
536
outl(val, emu->port + DATA);
sound/pci/emu10k1/io.c
539
void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum)
sound/pci/emu10k1/io.c
543
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
545
outl(HLIEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
546
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
549
outl(HLIEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
550
val = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
553
outl(val, emu->port + DATA);
sound/pci/emu10k1/io.c
556
void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum)
sound/pci/emu10k1/io.c
558
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
560
outl(HLIPH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
563
outl(HLIPL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
566
outl(voicenum, emu->port + DATA);
sound/pci/emu10k1/io.c
570
void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum)
sound/pci/emu10k1/io.c
574
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
576
outl(SOLEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
577
sol = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
580
outl(SOLEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
581
sol = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
584
outl(sol, emu->port + DATA);
sound/pci/emu10k1/io.c
587
void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum)
sound/pci/emu10k1/io.c
591
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
593
outl(SOLEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
594
sol = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
597
outl(SOLEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
598
sol = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
60
void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data)
sound/pci/emu10k1/io.c
601
outl(sol, emu->port + DATA);
sound/pci/emu10k1/io.c
605
void snd_emu10k1_voice_set_loop_stop_multiple(struct snd_emu10k1 *emu, u64 voices)
sound/pci/emu10k1/io.c
607
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
608
outl(SOLEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
609
outl(inl(emu->port + DATA) | (u32)voices, emu->port + DATA);
sound/pci/emu10k1/io.c
610
outl(SOLEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
611
outl(inl(emu->port + DATA) | (u32)(voices >> 32), emu->port + DATA);
sound/pci/emu10k1/io.c
614
void snd_emu10k1_voice_clear_loop_stop_multiple(struct snd_emu10k1 *emu, u64 voices)
sound/pci/emu10k1/io.c
616
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
617
outl(SOLEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
618
outl(inl(emu->port + DATA) & (u32)~voices, emu->port + DATA);
sound/pci/emu10k1/io.c
619
outl(SOLEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
620
outl(inl(emu->port + DATA) & (u32)(~voices >> 32), emu->port + DATA);
sound/pci/emu10k1/io.c
623
int snd_emu10k1_voice_clear_loop_stop_multiple_atomic(struct snd_emu10k1 *emu, u64 voices)
sound/pci/emu10k1/io.c
629
spin_lock_irqsave(&emu->emu_lock, flags);
sound/pci/emu10k1/io.c
631
outl(SOLEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
632
soll = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
633
outl(SOLEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
634
solh = inl(emu->port + DATA);
sound/pci/emu10k1/io.c
642
u32 wc = inl(emu->port + WC);
sound/pci/emu10k1/io.c
646
outl(SOLEL << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
647
outl(soll, emu->port + DATA);
sound/pci/emu10k1/io.c
650
cc = REG_VAL_GET(WC_CURRENTCHANNEL, inl(emu->port + WC));
sound/pci/emu10k1/io.c
66
if (!check_ptr_reg(emu, regptr))
sound/pci/emu10k1/io.c
660
outl(SOLEH << 16, emu->port + PTR);
sound/pci/emu10k1/io.c
661
outl(solh, emu->port + DATA);
sound/pci/emu10k1/io.c
663
if (REG_VAL_GET(WC_SAMPLECOUNTER, inl(emu->port + WC)) ==
sound/pci/emu10k1/io.c
672
spin_unlock_irqrestore(&emu->emu_lock, flags);
sound/pci/emu10k1/io.c
674
spin_lock_irqsave(&emu->emu_lock, flags);
sound/pci/emu10k1/io.c
677
spin_unlock_irqrestore(&emu->emu_lock, flags);
sound/pci/emu10k1/io.c
681
void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait)
sound/pci/emu10k1/io.c
686
curtime = inl(emu->port + WC) >> 6;
sound/pci/emu10k1/io.c
69
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
690
newtime = inl(emu->port + WC) >> 6;
sound/pci/emu10k1/io.c
702
struct snd_emu10k1 *emu = ac97->private_data;
sound/pci/emu10k1/io.c
704
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
705
outb(reg, emu->port + AC97ADDRESS);
sound/pci/emu10k1/io.c
706
return inw(emu->port + AC97DATA);
sound/pci/emu10k1/io.c
711
struct snd_emu10k1 *emu = ac97->private_data;
sound/pci/emu10k1/io.c
713
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/io.c
714
outb(reg, emu->port + AC97ADDRESS);
sound/pci/emu10k1/io.c
715
outw(data, emu->port + AC97DATA);
sound/pci/emu10k1/io.c
81
outl(regptr, emu->port + PTR);
sound/pci/emu10k1/io.c
82
data |= inl(emu->port + DATA) & ~mask;
sound/pci/emu10k1/io.c
84
outl(regptr, emu->port + PTR);
sound/pci/emu10k1/io.c
86
outl(data, emu->port + DATA);
sound/pci/emu10k1/io.c
91
void snd_emu10k1_ptr_write_multiple(struct snd_emu10k1 *emu, unsigned int chn, ...)
sound/pci/emu10k1/io.c
96
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/irq.c
101
snd_emu10k1_intr_disable(emu, INTE_EFXBUFENABLE);
sound/pci/emu10k1/irq.c
105
if (emu->midi.interrupt)
sound/pci/emu10k1/irq.c
106
emu->midi.interrupt(emu, status);
sound/pci/emu10k1/irq.c
108
snd_emu10k1_intr_disable(emu, INTE_MIDITXENABLE|INTE_MIDIRXENABLE);
sound/pci/emu10k1/irq.c
112
if (emu->midi2.interrupt)
sound/pci/emu10k1/irq.c
113
emu->midi2.interrupt(emu, status);
sound/pci/emu10k1/irq.c
115
snd_emu10k1_intr_disable(emu, INTE_A_MIDITXENABLE2|INTE_A_MIDIRXENABLE2);
sound/pci/emu10k1/irq.c
119
if (emu->timer)
sound/pci/emu10k1/irq.c
120
snd_timer_interrupt(emu->timer, emu->timer->sticks);
sound/pci/emu10k1/irq.c
122
snd_emu10k1_intr_disable(emu, INTE_INTERVALTIMERENB);
sound/pci/emu10k1/irq.c
126
if (emu->spdif_interrupt)
sound/pci/emu10k1/irq.c
127
emu->spdif_interrupt(emu, status);
sound/pci/emu10k1/irq.c
129
snd_emu10k1_intr_disable(emu, INTE_GPSPDIFENABLE|INTE_CDSPDIFENABLE);
sound/pci/emu10k1/irq.c
133
if (emu->dsp_interrupt)
sound/pci/emu10k1/irq.c
134
emu->dsp_interrupt(emu);
sound/pci/emu10k1/irq.c
136
snd_emu10k1_intr_disable(emu, INTE_FXDSPENABLE);
sound/pci/emu10k1/irq.c
14
struct snd_emu10k1 *emu = dev_id;
sound/pci/emu10k1/irq.c
140
if (emu->p16v_interrupt)
sound/pci/emu10k1/irq.c
141
emu->p16v_interrupt(emu);
sound/pci/emu10k1/irq.c
143
outl(0, emu->port + INTE2);
sound/pci/emu10k1/irq.c
147
if (emu->gpio_interrupt)
sound/pci/emu10k1/irq.c
148
emu->gpio_interrupt(emu);
sound/pci/emu10k1/irq.c
150
snd_emu10k1_intr_disable(emu, INTE_A_GPIOENABLE);
sound/pci/emu10k1/irq.c
155
dev_err(emu->card->dev,
sound/pci/emu10k1/irq.c
158
outl(orig_status, emu->port + IPR); /* ack all */
sound/pci/emu10k1/irq.c
19
while ((status = inl(emu->port + IPR)) != 0) {
sound/pci/emu10k1/irq.c
22
dev_info(emu->card->dev,
sound/pci/emu10k1/irq.c
27
dev_info(emu->card->dev, "emu10k1 irq routine failure\n");
sound/pci/emu10k1/irq.c
32
dev_err(emu->card->dev, "interrupt: PCI error\n");
sound/pci/emu10k1/irq.c
33
snd_emu10k1_intr_disable(emu, INTE_PCIERRORENABLE);
sound/pci/emu10k1/irq.c
37
if (emu->hwvol_interrupt)
sound/pci/emu10k1/irq.c
38
emu->hwvol_interrupt(emu, status);
sound/pci/emu10k1/irq.c
40
snd_emu10k1_intr_disable(emu, INTE_VOLINCRENABLE|INTE_VOLDECRENABLE|INTE_MUTEENABLE);
sound/pci/emu10k1/irq.c
49
val = snd_emu10k1_ptr_read(emu, CLIPL, 0);
sound/pci/emu10k1/irq.c
50
pvoice = emu->voices;
sound/pci/emu10k1/irq.c
53
val = snd_emu10k1_ptr_read(emu, CLIPH, 0);
sound/pci/emu10k1/irq.c
56
pvoice->interrupt(emu, pvoice);
sound/pci/emu10k1/irq.c
57
snd_emu10k1_voice_intr_ack(emu, voice);
sound/pci/emu10k1/irq.c
59
snd_emu10k1_voice_intr_disable(emu, voice);
sound/pci/emu10k1/irq.c
65
val = snd_emu10k1_ptr_read(emu, HLIPL, 0);
sound/pci/emu10k1/irq.c
66
pvoice = emu->voices;
sound/pci/emu10k1/irq.c
69
val = snd_emu10k1_ptr_read(emu, HLIPH, 0);
sound/pci/emu10k1/irq.c
72
pvoice->interrupt(emu, pvoice);
sound/pci/emu10k1/irq.c
73
snd_emu10k1_voice_half_loop_intr_ack(emu, voice);
sound/pci/emu10k1/irq.c
75
snd_emu10k1_voice_half_loop_intr_disable(emu, voice);
sound/pci/emu10k1/irq.c
84
if (emu->capture_interrupt)
sound/pci/emu10k1/irq.c
85
emu->capture_interrupt(emu, status);
sound/pci/emu10k1/irq.c
87
snd_emu10k1_intr_disable(emu, INTE_ADCBUFENABLE);
sound/pci/emu10k1/irq.c
91
if (emu->capture_mic_interrupt)
sound/pci/emu10k1/irq.c
92
emu->capture_mic_interrupt(emu, status);
sound/pci/emu10k1/irq.c
94
snd_emu10k1_intr_disable(emu, INTE_MICBUFENABLE);
sound/pci/emu10k1/irq.c
98
if (emu->capture_efx_interrupt)
sound/pci/emu10k1/irq.c
99
emu->capture_efx_interrupt(emu, status);
sound/pci/emu10k1/memory.c
100
struct list_head *candidate = &emu->mapped_link_head;
sound/pci/emu10k1/memory.c
103
list_for_each (pos, &emu->mapped_link_head) {
sound/pci/emu10k1/memory.c
120
size = (emu->address_mode ? MAX_ALIGN_PAGES1 : MAX_ALIGN_PAGES0) - page;
sound/pci/emu10k1/memory.c
134
static int map_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
sound/pci/emu10k1/memory.c
139
page = search_empty_map_area(emu, blk->pages, &next);
sound/pci/emu10k1/memory.c
143
dev_err(emu->card->dev, "trying to map zero (reserved) page\n");
sound/pci/emu10k1/memory.c
149
list_add_tail(&blk->mapped_order_link, &emu->mapped_order_link_head);
sound/pci/emu10k1/memory.c
153
set_ptb_entry(emu, page, emu->page_addr_table[pg]);
sound/pci/emu10k1/memory.c
165
static int unmap_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
sound/pci/emu10k1/memory.c
173
if (p != &emu->mapped_link_head) {
sound/pci/emu10k1/memory.c
180
if (p != &emu->mapped_link_head) {
sound/pci/emu10k1/memory.c
184
end_page = (emu->address_mode ? MAX_ALIGN_PAGES1 : MAX_ALIGN_PAGES0);
sound/pci/emu10k1/memory.c
193
set_silent_ptb(emu, mpage);
sound/pci/emu10k1/memory.c
206
search_empty(struct snd_emu10k1 *emu, int size)
sound/pci/emu10k1/memory.c
21
#define __set_ptb_entry(emu,page,addr) \
sound/pci/emu10k1/memory.c
214
list_for_each(p, &emu->memhdr->block) {
sound/pci/emu10k1/memory.c
22
(((__le32 *)(emu)->ptb_pages.area)[page] = \
sound/pci/emu10k1/memory.c
220
if (page + psize > emu->max_cache_pages)
sound/pci/emu10k1/memory.c
225
blk = (struct snd_emu10k1_memblk *)__snd_util_memblk_new(emu->memhdr, psize << PAGE_SHIFT, p->prev);
sound/pci/emu10k1/memory.c
23
cpu_to_le32(((addr) << (emu->address_mode)) | (page)))
sound/pci/emu10k1/memory.c
237
static int is_valid_page(struct snd_emu10k1 *emu, dma_addr_t addr)
sound/pci/emu10k1/memory.c
239
if (addr & ~emu->dma_mask) {
sound/pci/emu10k1/memory.c
24
#define __get_ptb_entry(emu, page) \
sound/pci/emu10k1/memory.c
240
dev_err_ratelimited(emu->card->dev,
sound/pci/emu10k1/memory.c
242
emu->dma_mask, (unsigned long)addr);
sound/pci/emu10k1/memory.c
246
dev_err_ratelimited(emu->card->dev, "page is not aligned\n");
sound/pci/emu10k1/memory.c
25
(le32_to_cpu(((__le32 *)(emu)->ptb_pages.area)[page]))
sound/pci/emu10k1/memory.c
258
int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
sound/pci/emu10k1/memory.c
265
guard(spinlock_irqsave)(&emu->memblk_lock);
sound/pci/emu10k1/memory.c
269
&emu->mapped_order_link_head);
sound/pci/emu10k1/memory.c
272
err = map_memblk(emu, blk);
sound/pci/emu10k1/memory.c
276
p = emu->mapped_order_link_head.next;
sound/pci/emu10k1/memory.c
277
for (; p != &emu->mapped_order_link_head; p = nextp) {
sound/pci/emu10k1/memory.c
282
size = unmap_memblk(emu, deleted);
sound/pci/emu10k1/memory.c
285
err = map_memblk(emu, blk);
sound/pci/emu10k1/memory.c
299
snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream)
sound/pci/emu10k1/memory.c
306
if (snd_BUG_ON(!emu))
sound/pci/emu10k1/memory.c
309
runtime->dma_bytes >= (emu->address_mode ? MAXPAGES1 : MAXPAGES0) * EMUPAGESIZE))
sound/pci/emu10k1/memory.c
311
hdr = emu->memhdr;
sound/pci/emu10k1/memory.c
316
blk = search_empty(emu, runtime->dma_bytes);
sound/pci/emu10k1/memory.c
327
addr = emu->silent_page.addr;
sound/pci/emu10k1/memory.c
330
if (! is_valid_page(emu, addr)) {
sound/pci/emu10k1/memory.c
331
dev_err_ratelimited(emu->card->dev,
sound/pci/emu10k1/memory.c
335
emu->page_addr_table[page] = addr;
sound/pci/emu10k1/memory.c
336
emu->page_ptr_table[page] = NULL;
sound/pci/emu10k1/memory.c
341
err = snd_emu10k1_memblk_map(emu, blk);
sound/pci/emu10k1/memory.c
353
int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk)
sound/pci/emu10k1/memory.c
355
if (snd_BUG_ON(!emu || !blk))
sound/pci/emu10k1/memory.c
357
return snd_emu10k1_synth_free(emu, blk);
sound/pci/emu10k1/memory.c
369
int snd_emu10k1_alloc_pages_maybe_wider(struct snd_emu10k1 *emu, size_t size,
sound/pci/emu10k1/memory.c
37
#define set_ptb_entry(emu,page,addr) __set_ptb_entry(emu,page,addr)
sound/pci/emu10k1/memory.c
372
if (emu->iommu_workaround) {
sound/pci/emu10k1/memory.c
385
&emu->pci->dev, size, dmab);
sound/pci/emu10k1/memory.c
39
#define set_silent_ptb(emu,page) __set_ptb_entry(emu,page,emu->silent_page.addr)
sound/pci/emu10k1/memory.c
42
static inline void set_ptb_entry(struct snd_emu10k1 *emu, int page, dma_addr_t addr)
sound/pci/emu10k1/memory.c
420
snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk)
sound/pci/emu10k1/memory.c
422
struct snd_util_memhdr *hdr = emu->memhdr;
sound/pci/emu10k1/memory.c
426
scoped_guard(spinlock_irqsave, &emu->memblk_lock) {
sound/pci/emu10k1/memory.c
428
unmap_memblk(emu, blk);
sound/pci/emu10k1/memory.c
430
synth_free_pages(emu, blk);
sound/pci/emu10k1/memory.c
464
static void __synth_free_pages(struct snd_emu10k1 *emu, int first_page,
sound/pci/emu10k1/memory.c
47
__set_ptb_entry(emu, page, addr);
sound/pci/emu10k1/memory.c
471
dmab.dev.dev = &emu->pci->dev;
sound/pci/emu10k1/memory.c
474
if (emu->page_ptr_table[page] == NULL)
sound/pci/emu10k1/memory.c
476
dmab.area = emu->page_ptr_table[page];
sound/pci/emu10k1/memory.c
477
dmab.addr = emu->page_addr_table[page];
sound/pci/emu10k1/memory.c
48
dev_dbg(emu->card->dev, "mapped page %d to entry %.8x\n", page,
sound/pci/emu10k1/memory.c
484
if (emu->iommu_workaround)
sound/pci/emu10k1/memory.c
488
emu->page_addr_table[page] = 0;
sound/pci/emu10k1/memory.c
489
emu->page_ptr_table[page] = NULL;
sound/pci/emu10k1/memory.c
49
(unsigned int)__get_ptb_entry(emu, page));
sound/pci/emu10k1/memory.c
496
static int synth_alloc_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
sound/pci/emu10k1/memory.c
502
get_single_page_range(emu->memhdr, blk, &first_page, &last_page);
sound/pci/emu10k1/memory.c
505
if (snd_emu10k1_alloc_pages_maybe_wider(emu, PAGE_SIZE,
sound/pci/emu10k1/memory.c
508
if (!is_valid_page(emu, dmab.addr)) {
sound/pci/emu10k1/memory.c
512
emu->page_addr_table[page] = dmab.addr;
sound/pci/emu10k1/memory.c
513
emu->page_ptr_table[page] = dmab.area;
sound/pci/emu10k1/memory.c
520
__synth_free_pages(emu, first_page, last_page);
sound/pci/emu10k1/memory.c
528
static int synth_free_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
sound/pci/emu10k1/memory.c
53
static inline void set_silent_ptb(struct snd_emu10k1 *emu, int page)
sound/pci/emu10k1/memory.c
532
get_single_page_range(emu->memhdr, blk, &first_page, &last_page);
sound/pci/emu10k1/memory.c
533
__synth_free_pages(emu, first_page, last_page);
sound/pci/emu10k1/memory.c
538
static inline void *offset_ptr(struct snd_emu10k1 *emu, int page, int offset)
sound/pci/emu10k1/memory.c
541
if (snd_BUG_ON(page < 0 || page >= emu->max_cache_pages))
sound/pci/emu10k1/memory.c
543
ptr = emu->page_ptr_table[page];
sound/pci/emu10k1/memory.c
545
dev_err(emu->card->dev,
sound/pci/emu10k1/memory.c
556
int snd_emu10k1_synth_memset(struct snd_emu10k1 *emu, struct snd_util_memblk *blk,
sound/pci/emu10k1/memory.c
575
ptr = offset_ptr(emu, page + p->first_page, offset);
sound/pci/emu10k1/memory.c
59
__set_ptb_entry(emu, page, emu->silent_page.addr);
sound/pci/emu10k1/memory.c
60
dev_dbg(emu->card->dev, "mapped silent page %d to entry %.8x\n",
sound/pci/emu10k1/memory.c
61
page, (unsigned int)__get_ptb_entry(emu, page));
sound/pci/emu10k1/memory.c
616
int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk,
sound/pci/emu10k1/memory.c
635
ptr = offset_ptr(emu, page + p->first_page, offset);
sound/pci/emu10k1/memory.c
95
static int search_empty_map_area(struct snd_emu10k1 *emu, int npages, struct list_head **nextp)
sound/pci/emu10k1/p16v.c
166
dev_dbg(emu->card->dev,
sound/pci/emu10k1/p16v.c
169
dev_dbg(emu->card->dev, "open:channel_id=%d, chip=%p, channel=%p\n",
sound/pci/emu10k1/p16v.c
238
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/p16v.c
240
int channel = substream->pcm->device - emu->p16v_device_offset;
sound/pci/emu10k1/p16v.c
241
u32 *table_base = (u32 *)(emu->p16v_buffer->area+(8*16*channel));
sound/pci/emu10k1/p16v.c
247
dev_dbg(emu->card->dev,
sound/pci/emu10k1/p16v.c
254
dev_dbg(emu->card->dev,
sound/pci/emu10k1/p16v.c
257
dev_dbg(emu->card->dev,
sound/pci/emu10k1/p16v.c
259
emu->p16v_buffer->addr, emu->p16v_buffer->area,
sound/pci/emu10k1/p16v.c
260
emu->p16v_buffer->bytes);
sound/pci/emu10k1/p16v.c
262
tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, channel);
sound/pci/emu10k1/p16v.c
266
snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel,
sound/pci/emu10k1/p16v.c
270
snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel,
sound/pci/emu10k1/p16v.c
274
snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel,
sound/pci/emu10k1/p16v.c
279
snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel,
sound/pci/emu10k1/p16v.c
289
snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_ADDR, channel, emu->p16v_buffer->addr+(8*16*channel));
sound/pci/emu10k1/p16v.c
290
snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19);
sound/pci/emu10k1/p16v.c
291
snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_PTR, channel, 0);
sound/pci/emu10k1/p16v.c
292
snd_emu10k1_ptr20_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr);
sound/pci/emu10k1/p16v.c
294
snd_emu10k1_ptr20_write(emu, PLAYBACK_PERIOD_SIZE, channel, 0); // buffer size in bytes
sound/pci/emu10k1/p16v.c
295
snd_emu10k1_ptr20_write(emu, PLAYBACK_POINTER, channel, 0);
sound/pci/emu10k1/p16v.c
296
snd_emu10k1_ptr20_write(emu, PLAYBACK_FIFO_END_ADDRESS, channel, 0);
sound/pci/emu10k1/p16v.c
297
snd_emu10k1_ptr20_write(emu, PLAYBACK_FIFO_POINTER, channel, 0);
sound/pci/emu10k1/p16v.c
305
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/p16v.c
307
int channel = substream->pcm->device - emu->p16v_device_offset;
sound/pci/emu10k1/p16v.c
319
snd_emu10k1_ptr_write(emu, A_I2S_CAPTURE_RATE, channel, A_I2S_CAPTURE_44100);
sound/pci/emu10k1/p16v.c
322
snd_emu10k1_ptr_write(emu, A_I2S_CAPTURE_RATE, channel, A_I2S_CAPTURE_96000);
sound/pci/emu10k1/p16v.c
325
snd_emu10k1_ptr_write(emu, A_I2S_CAPTURE_RATE, channel, A_I2S_CAPTURE_192000);
sound/pci/emu10k1/p16v.c
329
snd_emu10k1_ptr_write(emu, A_I2S_CAPTURE_RATE, channel, A_I2S_CAPTURE_48000);
sound/pci/emu10k1/p16v.c
333
snd_emu10k1_ptr20_write(emu, CAPTURE_FIFO_POINTER, channel, 0);
sound/pci/emu10k1/p16v.c
334
snd_emu10k1_ptr20_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr);
sound/pci/emu10k1/p16v.c
335
snd_emu10k1_ptr20_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_size) << 16); // buffer size in bytes
sound/pci/emu10k1/p16v.c
336
snd_emu10k1_ptr20_write(emu, CAPTURE_POINTER, channel, 0);
sound/pci/emu10k1/p16v.c
343
static void snd_p16v_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb)
sound/pci/emu10k1/p16v.c
347
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/p16v.c
348
enable = inl(emu->port + INTE2) | intrenb;
sound/pci/emu10k1/p16v.c
349
outl(enable, emu->port + INTE2);
sound/pci/emu10k1/p16v.c
352
static void snd_p16v_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb)
sound/pci/emu10k1/p16v.c
356
guard(spinlock_irqsave)(&emu->emu_lock);
sound/pci/emu10k1/p16v.c
357
disable = inl(emu->port + INTE2) & (~intrenb);
sound/pci/emu10k1/p16v.c
358
outl(disable, emu->port + INTE2);
sound/pci/emu10k1/p16v.c
361
static void snd_p16v_interrupt(struct snd_emu10k1 *emu)
sound/pci/emu10k1/p16v.c
365
while ((status = inl(emu->port + IPR2)) != 0) {
sound/pci/emu10k1/p16v.c
371
emu->pcm_p16v->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
sound/pci/emu10k1/p16v.c
377
dev_err(emu->card->dev,
sound/pci/emu10k1/p16v.c
384
emu->pcm_p16v->streams[SNDRV_PCM_STREAM_CAPTURE].substream;
sound/pci/emu10k1/p16v.c
393
outl(status, emu->port + IPR2); /* ack all */
sound/pci/emu10k1/p16v.c
401
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/p16v.c
420
if (snd_pcm_substream_chip(s) != emu ||
sound/pci/emu10k1/p16v.c
424
channel = substream->pcm->device-emu->p16v_device_offset;
sound/pci/emu10k1/p16v.c
435
snd_p16v_intr_enable(emu, inte);
sound/pci/emu10k1/p16v.c
436
snd_emu10k1_ptr20_write(emu, BASIC_INTERRUPT, 0, snd_emu10k1_ptr20_read(emu, BASIC_INTERRUPT, 0)| (basic));
sound/pci/emu10k1/p16v.c
439
snd_emu10k1_ptr20_write(emu, BASIC_INTERRUPT, 0, snd_emu10k1_ptr20_read(emu, BASIC_INTERRUPT, 0) & ~(basic));
sound/pci/emu10k1/p16v.c
440
snd_p16v_intr_disable(emu, inte);
sound/pci/emu10k1/p16v.c
453
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/p16v.c
461
snd_p16v_intr_enable(emu, inte);
sound/pci/emu10k1/p16v.c
462
snd_emu10k1_ptr20_write(emu, BASIC_INTERRUPT, 0, snd_emu10k1_ptr20_read(emu, BASIC_INTERRUPT, 0)|(0x100<<channel));
sound/pci/emu10k1/p16v.c
466
snd_emu10k1_ptr20_write(emu, BASIC_INTERRUPT, 0, snd_emu10k1_ptr20_read(emu, BASIC_INTERRUPT, 0) & ~(0x100<<channel));
sound/pci/emu10k1/p16v.c
467
snd_p16v_intr_disable(emu, inte);
sound/pci/emu10k1/p16v.c
482
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/p16v.c
485
int channel = substream->pcm->device - emu->p16v_device_offset;
sound/pci/emu10k1/p16v.c
490
ptr3 = snd_emu10k1_ptr20_read(emu, PLAYBACK_LIST_PTR, channel);
sound/pci/emu10k1/p16v.c
491
ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel);
sound/pci/emu10k1/p16v.c
492
ptr4 = snd_emu10k1_ptr20_read(emu, PLAYBACK_LIST_PTR, channel);
sound/pci/emu10k1/p16v.c
493
if (ptr3 != ptr4) ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel);
sound/pci/emu10k1/p16v.c
507
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
sound/pci/emu10k1/p16v.c
515
ptr1 = snd_emu10k1_ptr20_read(emu, CAPTURE_POINTER, channel);
sound/pci/emu10k1/p16v.c
520
dev_warn(emu->card->dev, "buffer capture limited!\n");
sound/pci/emu10k1/p16v.c
550
int snd_p16v_pcm(struct snd_emu10k1 *emu, int device)
sound/pci/emu10k1/p16v.c
558
emu->p16v_device_offset = device;
sound/pci/emu10k1/p16v.c
560
err = snd_pcm_new(emu->card, "p16v", device, 1, capture, &pcm);
sound/pci/emu10k1/p16v.c
564
pcm->private_data = emu;
sound/pci/emu10k1/p16v.c
573
emu->pcm_p16v = pcm;
sound/pci/emu10k1/p16v.c
574
emu->p16v_interrupt = snd_p16v_interrupt;
sound/pci/emu10k1/p16v.c
580
&emu->pci->dev,
sound/pci/emu10k1/p16v.c
593
&emu->pci->dev,
sound/pci/emu10k1/p16v.c
617
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/p16v.c
622
value = snd_emu10k1_ptr20_read(emu, reg, high_low);
sound/pci/emu10k1/p16v.c
636
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/p16v.c
641
oval = value = snd_emu10k1_ptr20_read(emu, reg, 0);
sound/pci/emu10k1/p16v.c
652
snd_emu10k1_ptr20_write(emu, reg, 0, value);
sound/pci/emu10k1/p16v.c
672
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/p16v.c
674
ucontrol->value.enumerated.item[0] = emu->p16v_capture_source;
sound/pci/emu10k1/p16v.c
681
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/p16v.c
690
change = (emu->p16v_capture_source != val);
sound/pci/emu10k1/p16v.c
692
emu->p16v_capture_source = val;
sound/pci/emu10k1/p16v.c
694
mask = snd_emu10k1_ptr20_read(emu, BASIC_INTERRUPT, 0) & 0xffff;
sound/pci/emu10k1/p16v.c
695
snd_emu10k1_ptr20_write(emu, BASIC_INTERRUPT, 0, source | mask);
sound/pci/emu10k1/p16v.c
711
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/p16v.c
713
ucontrol->value.enumerated.item[0] = emu->p16v_capture_channel;
sound/pci/emu10k1/p16v.c
720
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
sound/pci/emu10k1/p16v.c
728
change = (emu->p16v_capture_channel != val);
sound/pci/emu10k1/p16v.c
730
emu->p16v_capture_channel = val;
sound/pci/emu10k1/p16v.c
731
tmp = snd_emu10k1_ptr20_read(emu, CAPTURE_P16V_SOURCE, 0) & 0xfffc;
sound/pci/emu10k1/p16v.c
732
snd_emu10k1_ptr20_write(emu, CAPTURE_P16V_SOURCE, 0, tmp | val);
sound/pci/emu10k1/p16v.c
775
int snd_p16v_mixer(struct snd_emu10k1 *emu)
sound/pci/emu10k1/p16v.c
778
struct snd_card *card = emu->card;
sound/pci/emu10k1/p16v.c
781
err = snd_ctl_add(card, snd_ctl_new1(&p16v_mixer_controls[i], emu));
sound/pci/emu10k1/p16v.c
792
int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu)
sound/pci/emu10k1/p16v.c
794
emu->p16v_saved = vmalloc(array_size(NUM_CHS * 4, 0x80));
sound/pci/emu10k1/p16v.c
795
if (! emu->p16v_saved)
sound/pci/emu10k1/p16v.c
800
void snd_p16v_free_pm_buffer(struct snd_emu10k1 *emu)
sound/pci/emu10k1/p16v.c
802
vfree(emu->p16v_saved);
sound/pci/emu10k1/p16v.c
805
void snd_p16v_suspend(struct snd_emu10k1 *emu)
sound/pci/emu10k1/p16v.c
810
val = emu->p16v_saved;
sound/pci/emu10k1/p16v.c
813
*val = snd_emu10k1_ptr20_read(emu, i, ch);
sound/pci/emu10k1/p16v.c
816
void snd_p16v_resume(struct snd_emu10k1 *emu)
sound/pci/emu10k1/p16v.c
821
val = emu->p16v_saved;
sound/pci/emu10k1/p16v.c
824
snd_emu10k1_ptr20_write(emu, i, ch, *val);
sound/pci/emu10k1/timer.c
16
struct snd_emu10k1 *emu;
sound/pci/emu10k1/timer.c
19
emu = snd_timer_chip(timer);
sound/pci/emu10k1/timer.c
23
snd_emu10k1_intr_enable(emu, INTE_INTERVALTIMERENB);
sound/pci/emu10k1/timer.c
24
outw(delay & TIMER_RATE_MASK, emu->port + TIMER);
sound/pci/emu10k1/timer.c
30
struct snd_emu10k1 *emu;
sound/pci/emu10k1/timer.c
32
emu = snd_timer_chip(timer);
sound/pci/emu10k1/timer.c
33
snd_emu10k1_intr_disable(emu, INTE_INTERVALTIMERENB);
sound/pci/emu10k1/timer.c
39
struct snd_emu10k1 *emu = snd_timer_chip(timer);
sound/pci/emu10k1/timer.c
41
if (emu->card_capabilities->emu_model &&
sound/pci/emu10k1/timer.c
42
emu->emu1010.word_clock == 44100)
sound/pci/emu10k1/timer.c
51
struct snd_emu10k1 *emu = snd_timer_chip(timer);
sound/pci/emu10k1/timer.c
54
if (emu->card_capabilities->emu_model)
sound/pci/emu10k1/timer.c
55
*den = emu->emu1010.word_clock;
sound/pci/emu10k1/timer.c
70
int snd_emu10k1_timer(struct snd_emu10k1 *emu, int device)
sound/pci/emu10k1/timer.c
78
tid.card = emu->card->number;
sound/pci/emu10k1/timer.c
81
err = snd_timer_new(emu->card, "EMU10K1", &tid, &timer);
sound/pci/emu10k1/timer.c
84
timer->private_data = emu;
sound/pci/emu10k1/timer.c
87
emu->timer = timer;
sound/pci/emu10k1/voice.c
100
if (type != EMU10K1_SYNTH && emu->get_synth_voice) {
sound/pci/emu10k1/voice.c
102
result = emu->get_synth_voice(emu);
sound/pci/emu10k1/voice.c
104
voice_free(emu, &emu->voices[result]);
sound/pci/emu10k1/voice.c
110
voice_free(emu, rvoice[i] + j);
sound/pci/emu10k1/voice.c
121
int snd_emu10k1_voice_free(struct snd_emu10k1 *emu,
sound/pci/emu10k1/voice.c
128
guard(spinlock_irqsave)(&emu->voice_lock);
sound/pci/emu10k1/voice.c
131
voice_free(emu, pvoice++);
sound/pci/emu10k1/voice.c
24
static int voice_alloc(struct snd_emu10k1 *emu, int type, int number,
sound/pci/emu10k1/voice.c
30
for (i = emu->next_free_voice, j = 0; j < NUM_G; i = (i + skip) % NUM_G, j += skip) {
sound/pci/emu10k1/voice.c
43
voice = &emu->voices[i + k];
sound/pci/emu10k1/voice.c
51
voice = &emu->voices[i + k];
sound/pci/emu10k1/voice.c
58
*rvoice = &emu->voices[i];
sound/pci/emu10k1/voice.c
59
emu->next_free_voice = (i + number) % NUM_G;
sound/pci/emu10k1/voice.c
67
static void voice_free(struct snd_emu10k1 *emu,
sound/pci/emu10k1/voice.c
71
snd_emu10k1_voice_init(emu, pvoice->number);
sound/pci/emu10k1/voice.c
77
int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int count, int channels,
sound/pci/emu10k1/voice.c
89
guard(spinlock_irqsave)(&emu->voice_lock);
sound/pci/emu10k1/voice.c
91
result = voice_alloc(emu, type, count, epcm, &rvoice[got]);
sound/synth/emux/emux.c
100
emu->sflist = snd_sf_new(&sf_cb, emu->memhdr);
sound/synth/emux/emux.c
101
if (emu->sflist == NULL)
sound/synth/emux/emux.c
104
err = snd_emux_init_hwdep(emu);
sound/synth/emux/emux.c
108
snd_emux_init_voices(emu);
sound/synth/emux/emux.c
110
snd_emux_init_seq(emu, card, index);
sound/synth/emux/emux.c
112
snd_emux_init_seq_oss(emu);
sound/synth/emux/emux.c
114
snd_emux_init_virmidi(emu, card);
sound/synth/emux/emux.c
116
snd_emux_proc_init(emu, card, index);
sound/synth/emux/emux.c
124
int snd_emux_free(struct snd_emux *emu)
sound/synth/emux/emux.c
126
if (! emu)
sound/synth/emux/emux.c
129
timer_shutdown_sync(&emu->tlist);
sound/synth/emux/emux.c
131
snd_emux_proc_free(emu);
sound/synth/emux/emux.c
132
snd_emux_delete_virmidi(emu);
sound/synth/emux/emux.c
134
snd_emux_detach_seq_oss(emu);
sound/synth/emux/emux.c
136
snd_emux_detach_seq(emu);
sound/synth/emux/emux.c
137
snd_emux_delete_hwdep(emu);
sound/synth/emux/emux.c
138
snd_sf_free(emu->sflist);
sound/synth/emux/emux.c
139
kfree(emu->voices);
sound/synth/emux/emux.c
140
kfree_const(emu->name);
sound/synth/emux/emux.c
141
kfree(emu);
sound/synth/emux/emux.c
26
struct snd_emux *emu;
sound/synth/emux/emux.c
29
emu = kzalloc_obj(*emu);
sound/synth/emux/emux.c
30
if (emu == NULL)
sound/synth/emux/emux.c
33
spin_lock_init(&emu->voice_lock);
sound/synth/emux/emux.c
34
mutex_init(&emu->register_mutex);
sound/synth/emux/emux.c
36
emu->client = -1;
sound/synth/emux/emux.c
38
emu->oss_synth = NULL;
sound/synth/emux/emux.c
40
emu->max_voices = 0;
sound/synth/emux/emux.c
41
emu->use_time = 0;
sound/synth/emux/emux.c
43
timer_setup(&emu->tlist, snd_emux_timer_callback, 0);
sound/synth/emux/emux.c
44
emu->timer_active = 0;
sound/synth/emux/emux.c
46
*remu = emu;
sound/synth/emux/emux.c
58
struct snd_emux *emu = private_data;
sound/synth/emux/emux.c
59
return emu->ops.sample_new(emu, sp, hdr, buf, count);
sound/synth/emux/emux.c
66
struct snd_emux *emu = private_data;
sound/synth/emux/emux.c
67
return emu->ops.sample_free(emu, sp, hdr);
sound/synth/emux/emux.c
73
struct snd_emux *emu = private_data;
sound/synth/emux/emux.c
74
emu->ops.sample_reset(emu);
sound/synth/emux/emux.c
77
int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, char *name)
sound/synth/emux/emux.c
82
if (snd_BUG_ON(!emu->hw || emu->max_voices <= 0))
sound/synth/emux/emux.c
87
emu->card = card;
sound/synth/emux/emux.c
88
emu->name = kstrdup_const(name, GFP_KERNEL);
sound/synth/emux/emux.c
89
emu->voices = kzalloc_objs(struct snd_emux_voice, emu->max_voices);
sound/synth/emux/emux.c
90
if (emu->name == NULL || emu->voices == NULL)
sound/synth/emux/emux.c
95
sf_cb.private_data = emu;
sound/synth/emux/emux.c
98
if (emu->ops.sample_reset)
sound/synth/emux/emux_effect.c
169
struct snd_emux *emu;
sound/synth/emux/emux_effect.c
172
emu = port->emu;
sound/synth/emux/emux_effect.c
174
if (emu == NULL || fx == NULL)
sound/synth/emux/emux_effect.c
197
scoped_guard(spinlock_irqsave, &emu->voice_lock) {
sound/synth/emux/emux_effect.c
198
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_effect.c
199
struct snd_emux_voice *vp = &emu->voices[i];
sound/synth/emux/emux_hwdep.c
103
return snd_emux_hwdep_misc_mode(emu, (void __user *)arg);
sound/synth/emux/emux_hwdep.c
115
snd_emux_init_hwdep(struct snd_emux *emu)
sound/synth/emux/emux_hwdep.c
120
err = snd_hwdep_new(emu->card, SNDRV_EMUX_HWDEP_NAME, emu->hwdep_idx, &hw);
sound/synth/emux/emux_hwdep.c
123
emu->hwdep = hw;
sound/synth/emux/emux_hwdep.c
131
hw->private_data = emu;
sound/synth/emux/emux_hwdep.c
132
err = snd_card_register(emu->card);
sound/synth/emux/emux_hwdep.c
144
snd_emux_delete_hwdep(struct snd_emux *emu)
sound/synth/emux/emux_hwdep.c
146
if (emu->hwdep) {
sound/synth/emux/emux_hwdep.c
147
snd_device_free(emu->card, emu->hwdep);
sound/synth/emux/emux_hwdep.c
148
emu->hwdep = NULL;
sound/synth/emux/emux_hwdep.c
20
snd_emux_hwdep_load_patch(struct snd_emux *emu, void __user *arg)
sound/synth/emux/emux_hwdep.c
29
return snd_soundfont_load_guspatch(emu->card, emu->sflist, arg,
sound/synth/emux/emux_hwdep.c
34
err = snd_soundfont_load(emu->card, emu->sflist, arg,
sound/synth/emux/emux_hwdep.c
40
if (emu->ops.load_fx)
sound/synth/emux/emux_hwdep.c
41
return emu->ops.load_fx(emu, patch.type, patch.optarg, arg, patch.len + sizeof(patch));
sound/synth/emux/emux_hwdep.c
52
snd_emux_hwdep_misc_mode(struct snd_emux *emu, void __user *arg)
sound/synth/emux/emux_hwdep.c
64
for (i = 0; i < emu->num_ports; i++)
sound/synth/emux/emux_hwdep.c
65
emu->portptrs[i]->ctrls[info.mode] = info.value;
sound/synth/emux/emux_hwdep.c
67
if (info.port < emu->num_ports) {
sound/synth/emux/emux_hwdep.c
68
info.port = array_index_nospec(info.port, emu->num_ports);
sound/synth/emux/emux_hwdep.c
69
emu->portptrs[info.port]->ctrls[info.mode] = info.value;
sound/synth/emux/emux_hwdep.c
83
struct snd_emux *emu = hw->private_data;
sound/synth/emux/emux_hwdep.c
89
return snd_emux_hwdep_load_patch(emu, (void __user *)arg);
sound/synth/emux/emux_hwdep.c
91
snd_soundfont_remove_samples(emu->sflist);
sound/synth/emux/emux_hwdep.c
94
snd_soundfont_remove_unlocked(emu->sflist);
sound/synth/emux/emux_hwdep.c
97
if (emu->memhdr) {
sound/synth/emux/emux_hwdep.c
98
int size = snd_util_mem_avail(emu->memhdr);
sound/synth/emux/emux_nrpn.c
369
struct snd_emux *emu;
sound/synth/emux/emux_nrpn.c
374
emu = port->emu;
sound/synth/emux/emux_nrpn.c
381
if (emu->ops.sysex)
sound/synth/emux/emux_nrpn.c
382
emu->ops.sysex(emu, buf, len, parsed, chset);
sound/synth/emux/emux_oss.c
103
emu = closure;
sound/synth/emux/emux_oss.c
104
if (snd_BUG_ON(!arg || !emu))
sound/synth/emux/emux_oss.c
107
if (!snd_emux_inc_count(emu))
sound/synth/emux/emux_oss.c
114
sprintf(tmpname, "%s OSS Port", emu->name);
sound/synth/emux/emux_oss.c
115
p = snd_emux_create_port(emu, tmpname, 32,
sound/synth/emux/emux_oss.c
118
dev_err(emu->card->dev, "can't create port\n");
sound/synth/emux/emux_oss.c
119
snd_emux_dec_count(emu);
sound/synth/emux/emux_oss.c
164
struct snd_emux *emu;
sound/synth/emux/emux_oss.c
173
emu = p->emu;
sound/synth/emux/emux_oss.c
174
if (snd_BUG_ON(!emu))
sound/synth/emux/emux_oss.c
178
snd_soundfont_close_check(emu->sflist, SF_CLIENT_NO(p->chset.port));
sound/synth/emux/emux_oss.c
180
snd_emux_dec_count(emu);
sound/synth/emux/emux_oss.c
193
struct snd_emux *emu;
sound/synth/emux/emux_oss.c
203
emu = p->emu;
sound/synth/emux/emux_oss.c
204
if (snd_BUG_ON(!emu))
sound/synth/emux/emux_oss.c
208
rc = snd_soundfont_load_guspatch(emu->card, emu->sflist, buf, count);
sound/synth/emux/emux_oss.c
217
rc = snd_soundfont_load(emu->card, emu->sflist, buf,
sound/synth/emux/emux_oss.c
221
if (emu->ops.load_fx)
sound/synth/emux/emux_oss.c
222
rc = emu->ops.load_fx(emu, patch.type,
sound/synth/emux/emux_oss.c
240
struct snd_emux *emu;
sound/synth/emux/emux_oss.c
248
emu = p->emu;
sound/synth/emux/emux_oss.c
249
if (snd_BUG_ON(!emu))
sound/synth/emux/emux_oss.c
254
snd_soundfont_remove_samples(emu->sflist);
sound/synth/emux/emux_oss.c
258
if (emu->memhdr)
sound/synth/emux/emux_oss.c
259
return snd_util_mem_avail(emu->memhdr);
sound/synth/emux/emux_oss.c
29
static void emuspec_control(struct snd_emux *emu, struct snd_emux_port *port,
sound/synth/emux/emux_oss.c
292
struct snd_emux *emu;
sound/synth/emux/emux_oss.c
299
emu = p->emu;
sound/synth/emux/emux_oss.c
300
if (snd_BUG_ON(!emu))
sound/synth/emux/emux_oss.c
31
static void gusspec_control(struct snd_emux *emu, struct snd_emux_port *port,
sound/synth/emux/emux_oss.c
311
emuspec_control(emu, p, cmd, data, atomic, hop);
sound/synth/emux/emux_oss.c
313
gusspec_control(emu, p, cmd, data, atomic, hop);
sound/synth/emux/emux_oss.c
322
emuspec_control(struct snd_emux *emu, struct snd_emux_port *port, int cmd,
sound/synth/emux/emux_oss.c
33
static void fake_event(struct snd_emux *emu, struct snd_emux_port *port,
sound/synth/emux/emux_oss.c
343
snd_soundfont_remove_unlocked(emu->sflist);
sound/synth/emux/emux_oss.c
352
snd_emux_terminate_all(emu);
sound/synth/emux/emux_oss.c
363
fake_event(emu, port, voice, MIDI_CTL_ALL_NOTES_OFF, 0, atomic, hop);
sound/synth/emux/emux_oss.c
366
fake_event(emu, port, voice, MIDI_CTL_ALL_SOUNDS_OFF, 0, atomic, hop);
sound/synth/emux/emux_oss.c
404
if (emu->ops.oss_ioctl)
sound/synth/emux/emux_oss.c
405
emu->ops.oss_ioctl(emu, cmd, p1, p2);
sound/synth/emux/emux_oss.c
417
gusspec_control(struct snd_emux *emu, struct snd_emux_port *port, int cmd,
sound/synth/emux/emux_oss.c
483
fake_event(struct snd_emux *emu, struct snd_emux_port *port, int ch, int param, int val, int atomic, int hop)
sound/synth/emux/emux_oss.c
52
snd_emux_init_seq_oss(struct snd_emux *emu)
sound/synth/emux/emux_oss.c
58
if (snd_seq_device_new(emu->card, 1, SNDRV_SEQ_DEV_ID_OSS,
sound/synth/emux/emux_oss.c
62
emu->oss_synth = dev;
sound/synth/emux/emux_oss.c
63
strscpy(dev->name, emu->name);
sound/synth/emux/emux_oss.c
67
arg->nvoices = emu->max_voices;
sound/synth/emux/emux_oss.c
69
arg->private_data = emu;
sound/synth/emux/emux_oss.c
72
snd_device_register(emu->card, dev);
sound/synth/emux/emux_oss.c
80
snd_emux_detach_seq_oss(struct snd_emux *emu)
sound/synth/emux/emux_oss.c
82
if (emu->oss_synth) {
sound/synth/emux/emux_oss.c
83
snd_device_free(emu->card, emu->oss_synth);
sound/synth/emux/emux_oss.c
84
emu->oss_synth = NULL;
sound/synth/emux/emux_oss.c
98
struct snd_emux *emu;
sound/synth/emux/emux_proc.c
101
entry->private_data = emu;
sound/synth/emux/emux_proc.c
103
emu->proc = entry;
sound/synth/emux/emux_proc.c
106
void snd_emux_proc_free(struct snd_emux *emu)
sound/synth/emux/emux_proc.c
108
snd_info_free_entry(emu->proc);
sound/synth/emux/emux_proc.c
109
emu->proc = NULL;
sound/synth/emux/emux_proc.c
18
struct snd_emux *emu;
sound/synth/emux/emux_proc.c
21
emu = entry->private_data;
sound/synth/emux/emux_proc.c
22
guard(mutex)(&emu->register_mutex);
sound/synth/emux/emux_proc.c
23
if (emu->name)
sound/synth/emux/emux_proc.c
24
snd_iprintf(buf, "Device: %s\n", emu->name);
sound/synth/emux/emux_proc.c
25
snd_iprintf(buf, "Ports: %d\n", emu->num_ports);
sound/synth/emux/emux_proc.c
27
for (i = 0; i < emu->num_ports; i++)
sound/synth/emux/emux_proc.c
28
snd_iprintf(buf, " %d:%d", emu->client, emu->ports[i]);
sound/synth/emux/emux_proc.c
30
snd_iprintf(buf, "Use Counter: %d\n", emu->used);
sound/synth/emux/emux_proc.c
31
snd_iprintf(buf, "Max Voices: %d\n", emu->max_voices);
sound/synth/emux/emux_proc.c
32
snd_iprintf(buf, "Allocated Voices: %d\n", emu->num_voices);
sound/synth/emux/emux_proc.c
33
if (emu->memhdr) {
sound/synth/emux/emux_proc.c
34
snd_iprintf(buf, "Memory Size: %d\n", emu->memhdr->size);
sound/synth/emux/emux_proc.c
35
snd_iprintf(buf, "Memory Available: %d\n", snd_util_mem_avail(emu->memhdr));
sound/synth/emux/emux_proc.c
36
snd_iprintf(buf, "Allocated Blocks: %d\n", emu->memhdr->nblocks);
sound/synth/emux/emux_proc.c
40
if (emu->sflist) {
sound/synth/emux/emux_proc.c
41
guard(mutex)(&emu->sflist->presets_mutex);
sound/synth/emux/emux_proc.c
42
snd_iprintf(buf, "SoundFonts: %d\n", emu->sflist->fonts_size);
sound/synth/emux/emux_proc.c
43
snd_iprintf(buf, "Instruments: %d\n", emu->sflist->zone_counter);
sound/synth/emux/emux_proc.c
44
snd_iprintf(buf, "Samples: %d\n", emu->sflist->sample_counter);
sound/synth/emux/emux_proc.c
45
snd_iprintf(buf, "Locked Instruments: %d\n", emu->sflist->zone_locked);
sound/synth/emux/emux_proc.c
46
snd_iprintf(buf, "Locked Samples: %d\n", emu->sflist->sample_locked);
sound/synth/emux/emux_proc.c
49
if (emu->voices[0].state != SNDRV_EMUX_ST_OFF && emu->voices[0].ch >= 0) {
sound/synth/emux/emux_proc.c
50
struct snd_emux_voice *vp = &emu->voices[0];
sound/synth/emux/emux_proc.c
90
void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device)
sound/synth/emux/emux_seq.c
110
snd_emux_detach_seq(struct snd_emux *emu)
sound/synth/emux/emux_seq.c
112
if (emu->voices)
sound/synth/emux/emux_seq.c
113
snd_emux_terminate_all(emu);
sound/synth/emux/emux_seq.c
115
if (emu->client >= 0) {
sound/synth/emux/emux_seq.c
116
snd_seq_delete_kernel_client(emu->client);
sound/synth/emux/emux_seq.c
117
emu->client = -1;
sound/synth/emux/emux_seq.c
127
snd_emux_create_port(struct snd_emux *emu, char *name,
sound/synth/emux/emux_seq.c
148
p->emu = emu;
sound/synth/emux/emux_seq.c
149
p->chset.client = emu->client;
sound/synth/emux/emux_seq.c
164
p->chset.port = snd_seq_event_port_attach(emu->client, callback,
sound/synth/emux/emux_seq.c
166
emu->max_voices, name);
sound/synth/emux/emux_seq.c
258
__snd_emux_inc_count(struct snd_emux *emu)
sound/synth/emux/emux_seq.c
260
emu->used++;
sound/synth/emux/emux_seq.c
261
if (!try_module_get(emu->ops.owner))
sound/synth/emux/emux_seq.c
263
if (!try_module_get(emu->card->module)) {
sound/synth/emux/emux_seq.c
264
module_put(emu->ops.owner);
sound/synth/emux/emux_seq.c
266
emu->used--;
sound/synth/emux/emux_seq.c
272
int snd_emux_inc_count(struct snd_emux *emu)
sound/synth/emux/emux_seq.c
274
guard(mutex)(&emu->register_mutex);
sound/synth/emux/emux_seq.c
275
return __snd_emux_inc_count(emu);
sound/synth/emux/emux_seq.c
282
__snd_emux_dec_count(struct snd_emux *emu)
sound/synth/emux/emux_seq.c
284
module_put(emu->card->module);
sound/synth/emux/emux_seq.c
285
emu->used--;
sound/synth/emux/emux_seq.c
286
if (emu->used <= 0)
sound/synth/emux/emux_seq.c
287
snd_emux_terminate_all(emu);
sound/synth/emux/emux_seq.c
288
module_put(emu->ops.owner);
sound/synth/emux/emux_seq.c
291
void snd_emux_dec_count(struct snd_emux *emu)
sound/synth/emux/emux_seq.c
293
guard(mutex)(&emu->register_mutex);
sound/synth/emux/emux_seq.c
294
__snd_emux_dec_count(emu);
sound/synth/emux/emux_seq.c
304
struct snd_emux *emu;
sound/synth/emux/emux_seq.c
309
emu = p->emu;
sound/synth/emux/emux_seq.c
310
if (snd_BUG_ON(!emu))
sound/synth/emux/emux_seq.c
313
guard(mutex)(&emu->register_mutex);
sound/synth/emux/emux_seq.c
315
__snd_emux_inc_count(emu);
sound/synth/emux/emux_seq.c
326
struct snd_emux *emu;
sound/synth/emux/emux_seq.c
331
emu = p->emu;
sound/synth/emux/emux_seq.c
332
if (snd_BUG_ON(!emu))
sound/synth/emux/emux_seq.c
335
guard(mutex)(&emu->register_mutex);
sound/synth/emux/emux_seq.c
337
__snd_emux_dec_count(emu);
sound/synth/emux/emux_seq.c
345
int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card)
sound/synth/emux/emux_seq.c
349
emu->vmidi = NULL;
sound/synth/emux/emux_seq.c
350
if (emu->midi_ports <= 0)
sound/synth/emux/emux_seq.c
353
emu->vmidi = kzalloc_objs(*emu->vmidi, emu->midi_ports);
sound/synth/emux/emux_seq.c
354
if (!emu->vmidi)
sound/synth/emux/emux_seq.c
357
for (i = 0; i < emu->midi_ports; i++) {
sound/synth/emux/emux_seq.c
360
if (snd_virmidi_new(card, emu->midi_devidx + i, &rmidi) < 0)
sound/synth/emux/emux_seq.c
363
sprintf(rmidi->name, "%s Synth MIDI", emu->name);
sound/synth/emux/emux_seq.c
365
rdev->client = emu->client;
sound/synth/emux/emux_seq.c
366
rdev->port = emu->ports[i];
sound/synth/emux/emux_seq.c
371
emu->vmidi[i] = rmidi;
sound/synth/emux/emux_seq.c
376
snd_emux_delete_virmidi(emu);
sound/synth/emux/emux_seq.c
380
int snd_emux_delete_virmidi(struct snd_emux *emu)
sound/synth/emux/emux_seq.c
384
if (!emu->vmidi)
sound/synth/emux/emux_seq.c
387
for (i = 0; i < emu->midi_ports; i++) {
sound/synth/emux/emux_seq.c
388
if (emu->vmidi[i])
sound/synth/emux/emux_seq.c
389
snd_device_free(emu->card, emu->vmidi[i]);
sound/synth/emux/emux_seq.c
391
kfree(emu->vmidi);
sound/synth/emux/emux_seq.c
392
emu->vmidi = NULL;
sound/synth/emux/emux_seq.c
55
snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index)
sound/synth/emux/emux_seq.c
61
emu->client = snd_seq_create_kernel_client(card, index,
sound/synth/emux/emux_seq.c
62
"%s WaveTable", emu->name);
sound/synth/emux/emux_seq.c
63
if (emu->client < 0) {
sound/synth/emux/emux_seq.c
68
if (emu->num_ports <= 0) {
sound/synth/emux/emux_seq.c
70
emu->num_ports = 1;
sound/synth/emux/emux_seq.c
71
} else if (emu->num_ports > SNDRV_EMUX_MAX_PORTS) {
sound/synth/emux/emux_seq.c
75
emu->num_ports = SNDRV_EMUX_MAX_PORTS;
sound/synth/emux/emux_seq.c
84
for (i = 0; i < emu->num_ports; i++) {
sound/synth/emux/emux_seq.c
87
sprintf(tmpname, "%s Port %d", emu->name, i);
sound/synth/emux/emux_seq.c
88
p = snd_emux_create_port(emu, tmpname, MIDI_CHANNELS,
sound/synth/emux/emux_seq.c
97
emu->ports[i] = p->chset.port;
sound/synth/emux/emux_seq.c
98
emu->portptrs[i] = p;
sound/synth/emux/emux_synth.c
109
if (emu->ops.prepare) {
sound/synth/emux/emux_synth.c
111
if (emu->ops.prepare(vp) >= 0)
sound/synth/emux/emux_synth.c
117
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_synth.c
118
vp = &emu->voices[i];
sound/synth/emux/emux_synth.c
121
emu->ops.trigger(vp);
sound/synth/emux/emux_synth.c
146
struct snd_emux *emu;
sound/synth/emux/emux_synth.c
154
emu = port->emu;
sound/synth/emux/emux_synth.c
155
if (snd_BUG_ON(!emu || !emu->ops.release))
sound/synth/emux/emux_synth.c
158
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
159
for (ch = 0; ch < emu->max_voices; ch++) {
sound/synth/emux/emux_synth.c
160
vp = &emu->voices[ch];
sound/synth/emux/emux_synth.c
171
if (! emu->timer_active) {
sound/synth/emux/emux_synth.c
172
mod_timer(&emu->tlist, jiffies + 1);
sound/synth/emux/emux_synth.c
173
emu->timer_active = 1;
sound/synth/emux/emux_synth.c
177
emu->ops.release(vp);
sound/synth/emux/emux_synth.c
189
struct snd_emux *emu = timer_container_of(emu, t, tlist);
sound/synth/emux/emux_synth.c
193
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
194
for (ch = 0; ch < emu->max_voices; ch++) {
sound/synth/emux/emux_synth.c
195
vp = &emu->voices[ch];
sound/synth/emux/emux_synth.c
200
emu->ops.release(vp);
sound/synth/emux/emux_synth.c
206
mod_timer(&emu->tlist, jiffies + 1);
sound/synth/emux/emux_synth.c
207
emu->timer_active = 1;
sound/synth/emux/emux_synth.c
209
emu->timer_active = 0;
sound/synth/emux/emux_synth.c
219
struct snd_emux *emu;
sound/synth/emux/emux_synth.c
227
emu = port->emu;
sound/synth/emux/emux_synth.c
228
if (snd_BUG_ON(!emu || !emu->ops.update))
sound/synth/emux/emux_synth.c
231
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
232
for (ch = 0; ch < emu->max_voices; ch++) {
sound/synth/emux/emux_synth.c
233
vp = &emu->voices[ch];
sound/synth/emux/emux_synth.c
237
update_voice(emu, vp, SNDRV_EMUX_UPDATE_VOLUME);
sound/synth/emux/emux_synth.c
249
struct snd_emux *emu;
sound/synth/emux/emux_synth.c
256
emu = port->emu;
sound/synth/emux/emux_synth.c
257
if (snd_BUG_ON(!emu || !emu->ops.update))
sound/synth/emux/emux_synth.c
26
static int get_zone(struct snd_emux *emu, struct snd_emux_port *port,
sound/synth/emux/emux_synth.c
260
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
261
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_synth.c
262
vp = &emu->voices[i];
sound/synth/emux/emux_synth.c
264
update_voice(emu, vp, update);
sound/synth/emux/emux_synth.c
274
struct snd_emux *emu;
sound/synth/emux/emux_synth.c
281
emu = port->emu;
sound/synth/emux/emux_synth.c
282
if (snd_BUG_ON(!emu || !emu->ops.update))
sound/synth/emux/emux_synth.c
285
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
286
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_synth.c
287
vp = &emu->voices[i];
sound/synth/emux/emux_synth.c
289
update_voice(emu, vp, update);
sound/synth/emux/emux_synth.c
30
static void terminate_note1(struct snd_emux *emu, int note,
sound/synth/emux/emux_synth.c
32
static void exclusive_note_off(struct snd_emux *emu, struct snd_emux_port *port,
sound/synth/emux/emux_synth.c
34
static void terminate_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int free);
sound/synth/emux/emux_synth.c
35
static void update_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int update);
sound/synth/emux/emux_synth.c
352
terminate_note1(struct snd_emux *emu, int note, struct snd_midi_channel *chan, int free)
sound/synth/emux/emux_synth.c
357
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
358
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_synth.c
359
vp = &emu->voices[i];
sound/synth/emux/emux_synth.c
362
terminate_voice(emu, vp, free);
sound/synth/emux/emux_synth.c
373
struct snd_emux *emu;
sound/synth/emux/emux_synth.c
380
emu = port->emu;
sound/synth/emux/emux_synth.c
381
if (snd_BUG_ON(!emu || !emu->ops.terminate))
sound/synth/emux/emux_synth.c
384
terminate_note1(emu, note, chan, 1);
sound/synth/emux/emux_synth.c
392
snd_emux_terminate_all(struct snd_emux *emu)
sound/synth/emux/emux_synth.c
397
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
398
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_synth.c
399
vp = &emu->voices[i];
sound/synth/emux/emux_synth.c
401
terminate_voice(emu, vp, 0);
sound/synth/emux/emux_synth.c
403
if (emu->ops.free_voice)
sound/synth/emux/emux_synth.c
404
emu->ops.free_voice(vp);
sound/synth/emux/emux_synth.c
405
if (emu->ops.reset)
sound/synth/emux/emux_synth.c
406
emu->ops.reset(emu, i);
sound/synth/emux/emux_synth.c
411
emu->use_time = 0;
sound/synth/emux/emux_synth.c
423
struct snd_emux *emu;
sound/synth/emux/emux_synth.c
428
emu = port->emu;
sound/synth/emux/emux_synth.c
429
if (snd_BUG_ON(!emu || !emu->ops.terminate))
sound/synth/emux/emux_synth.c
432
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
433
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_synth.c
434
vp = &emu->voices[i];
sound/synth/emux/emux_synth.c
437
terminate_voice(emu, vp, 0);
sound/synth/emux/emux_synth.c
439
if (emu->ops.free_voice)
sound/synth/emux/emux_synth.c
440
emu->ops.free_voice(vp);
sound/synth/emux/emux_synth.c
441
if (emu->ops.reset)
sound/synth/emux/emux_synth.c
442
emu->ops.reset(emu, i);
sound/synth/emux/emux_synth.c
453
exclusive_note_off(struct snd_emux *emu, struct snd_emux_port *port, int exclass)
sound/synth/emux/emux_synth.c
458
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
459
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_synth.c
460
vp = &emu->voices[i];
sound/synth/emux/emux_synth.c
463
terminate_voice(emu, vp, 0);
sound/synth/emux/emux_synth.c
473
terminate_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int free)
sound/synth/emux/emux_synth.c
475
emu->ops.terminate(vp);
sound/synth/emux/emux_synth.c
476
vp->time = emu->use_time++;
sound/synth/emux/emux_synth.c
48
struct snd_emux *emu;
sound/synth/emux/emux_synth.c
482
if (free && emu->ops.free_voice)
sound/synth/emux/emux_synth.c
483
emu->ops.free_voice(vp);
sound/synth/emux/emux_synth.c
491
update_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int update)
sound/synth/emux/emux_synth.c
506
emu->ops.update(vp, update);
sound/synth/emux/emux_synth.c
58
emu = port->emu;
sound/synth/emux/emux_synth.c
59
if (snd_BUG_ON(!emu || !emu->ops.get_voice || !emu->ops.trigger))
sound/synth/emux/emux_synth.c
63
nvoices = get_zone(emu, port, &note, vel, chan, table);
sound/synth/emux/emux_synth.c
635
if (vp->emu->linear_panning) {
sound/synth/emux/emux_synth.c
71
exclusive_note_off(emu, port, zp->v.exclusiveClass);
sound/synth/emux/emux_synth.c
76
terminate_note1(emu, key, chan, 0);
sound/synth/emux/emux_synth.c
79
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
828
if (vp->emu->ops.get_pitch_shift)
sound/synth/emux/emux_synth.c
829
offset += vp->emu->ops.get_pitch_shift(vp->emu);
sound/synth/emux/emux_synth.c
870
get_zone(struct snd_emux *emu, struct snd_emux_port *port,
sound/synth/emux/emux_synth.c
88
vp = emu->ops.get_voice(emu, port);
sound/synth/emux/emux_synth.c
887
return snd_soundfont_search_zone(emu->sflist, notep, vel, preset, bank,
sound/synth/emux/emux_synth.c
895
snd_emux_init_voices(struct snd_emux *emu)
sound/synth/emux/emux_synth.c
900
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
901
for (i = 0; i < emu->max_voices; i++) {
sound/synth/emux/emux_synth.c
902
vp = &emu->voices[i];
sound/synth/emux/emux_synth.c
908
vp->emu = emu;
sound/synth/emux/emux_synth.c
909
vp->hw = emu->hw;
sound/synth/emux/emux_synth.c
915
void snd_emux_lock_voice(struct snd_emux *emu, int voice)
sound/synth/emux/emux_synth.c
917
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
918
if (emu->voices[voice].state == SNDRV_EMUX_ST_OFF)
sound/synth/emux/emux_synth.c
919
emu->voices[voice].state = SNDRV_EMUX_ST_LOCKED;
sound/synth/emux/emux_synth.c
92
emu->ops.terminate(vp);
sound/synth/emux/emux_synth.c
921
dev_warn(emu->card->dev,
sound/synth/emux/emux_synth.c
923
voice, emu->voices[voice].state);
sound/synth/emux/emux_synth.c
930
void snd_emux_unlock_voice(struct snd_emux *emu, int voice)
sound/synth/emux/emux_synth.c
932
guard(spinlock_irqsave)(&emu->voice_lock);
sound/synth/emux/emux_synth.c
933
if (emu->voices[voice].state == SNDRV_EMUX_ST_LOCKED)
sound/synth/emux/emux_synth.c
934
emu->voices[voice].state = SNDRV_EMUX_ST_OFF;
sound/synth/emux/emux_synth.c
936
dev_warn(emu->card->dev,
sound/synth/emux/emux_synth.c
938
voice, emu->voices[voice].state);
sound/synth/emux/emux_synth.c
94
vp->time = emu->use_time++;
sound/synth/emux/emux_voice.h
18
int snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index);
sound/synth/emux/emux_voice.h
19
void snd_emux_detach_seq(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
20
struct snd_emux_port *snd_emux_create_port(struct snd_emux *emu, char *name,
sound/synth/emux/emux_voice.h
26
int snd_emux_inc_count(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
27
void snd_emux_dec_count(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
28
int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card);
sound/synth/emux/emux_voice.h
29
int snd_emux_delete_virmidi(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
32
void snd_emux_init_voices(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
68
void snd_emux_init_seq_oss(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
69
void snd_emux_detach_seq_oss(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
73
void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device);
sound/synth/emux/emux_voice.h
74
void snd_emux_proc_free(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
76
static inline void snd_emux_proc_init(struct snd_emux *emu,
sound/synth/emux/emux_voice.h
78
static inline void snd_emux_proc_free(struct snd_emux *emu) {}
sound/synth/emux/emux_voice.h
84
int snd_emux_init_hwdep(struct snd_emux *emu);
sound/synth/emux/emux_voice.h
85
void snd_emux_delete_hwdep(struct snd_emux *emu);