Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
21fdddea
Commit
21fdddea
authored
Apr 09, 2006
by
James Courtier-Dutton
Committed by
Jaroslav Kysela
Jun 22, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ALSA] emu10k1: Add support for Audigy4 (not Pro)
Signed-off-by:
James Courtier-Dutton
<
James@superbug.co.uk
>
parent
6129daaa
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
21 deletions
+107
-21
include/sound/emu10k1.h
include/sound/emu10k1.h
+2
-0
sound/pci/ac97/ac97_codec.c
sound/pci/ac97/ac97_codec.c
+2
-2
sound/pci/ac97/ac97_patch.c
sound/pci/ac97/ac97_patch.c
+2
-2
sound/pci/emu10k1/emu10k1_main.c
sound/pci/emu10k1/emu10k1_main.c
+47
-9
sound/pci/emu10k1/emumixer.c
sound/pci/emu10k1/emumixer.c
+52
-2
sound/pci/emu10k1/tina2.h
sound/pci/emu10k1/tina2.h
+2
-6
No files found.
include/sound/emu10k1.h
View file @
21fdddea
...
@@ -245,6 +245,7 @@
...
@@ -245,6 +245,7 @@
#define A_IOCFG_GPOUT0 0x0044
/* analog/digital */
#define A_IOCFG_GPOUT0 0x0044
/* analog/digital */
#define A_IOCFG_DISABLE_ANALOG 0x0040
/* = 'enable' for Audigy2 (chiprev=4) */
#define A_IOCFG_DISABLE_ANALOG 0x0040
/* = 'enable' for Audigy2 (chiprev=4) */
#define A_IOCFG_ENABLE_DIGITAL 0x0004
#define A_IOCFG_ENABLE_DIGITAL 0x0004
#define A_IOCFG_ENABLE_DIGITAL_AUDIGY4 0x0080
#define A_IOCFG_UNKNOWN_20 0x0020
#define A_IOCFG_UNKNOWN_20 0x0020
#define A_IOCFG_DISABLE_AC97_FRONT 0x0080
/* turn off ac97 front -> front (10k2.1) */
#define A_IOCFG_DISABLE_AC97_FRONT 0x0080
/* turn off ac97 front -> front (10k2.1) */
#define A_IOCFG_GPOUT1 0x0002
/* IR? drive's internal bypass (?) */
#define A_IOCFG_GPOUT1 0x0002
/* IR? drive's internal bypass (?) */
...
@@ -1065,6 +1066,7 @@ struct snd_emu_chip_details {
...
@@ -1065,6 +1066,7 @@ struct snd_emu_chip_details {
unsigned
char
emu1212m
;
/* EMU 1212m card */
unsigned
char
emu1212m
;
/* EMU 1212m card */
unsigned
char
spi_dac
;
/* SPI interface for DAC */
unsigned
char
spi_dac
;
/* SPI interface for DAC */
unsigned
char
i2c_adc
;
/* I2C interface for ADC */
unsigned
char
i2c_adc
;
/* I2C interface for ADC */
unsigned
char
adc_1361t
;
/* Use Philips 1361T ADC */
const
char
*
driver
;
const
char
*
driver
;
const
char
*
name
;
const
char
*
name
;
const
char
*
id
;
/* for backward compatibility - can be NULL if not needed */
const
char
*
id
;
/* for backward compatibility - can be NULL if not needed */
...
...
sound/pci/ac97/ac97_codec.c
View file @
21fdddea
...
@@ -563,7 +563,7 @@ AC97_SINGLE("PC Speaker Playback Volume", AC97_PC_BEEP, 1, 15, 1)
...
@@ -563,7 +563,7 @@ AC97_SINGLE("PC Speaker Playback Volume", AC97_PC_BEEP, 1, 15, 1)
};
};
static
const
struct
snd_kcontrol_new
snd_ac97_controls_mic_boost
=
static
const
struct
snd_kcontrol_new
snd_ac97_controls_mic_boost
=
AC97_SINGLE
(
"Mic Boost (+20dB)"
,
AC97_MIC
,
6
,
1
,
0
);
AC97_SINGLE
(
"Mic Boost (+20dB)
Capture Switch
"
,
AC97_MIC
,
6
,
1
,
0
);
static
const
char
*
std_rec_sel
[]
=
{
"Mic"
,
"CD"
,
"Video"
,
"Aux"
,
"Line"
,
"Mix"
,
"Mix Mono"
,
"Phone"
};
static
const
char
*
std_rec_sel
[]
=
{
"Mic"
,
"CD"
,
"Video"
,
"Aux"
,
"Line"
,
"Mix"
,
"Mix Mono"
,
"Phone"
};
...
@@ -605,7 +605,7 @@ AC97_SINGLE("Simulated Stereo Enhancement", AC97_GENERAL_PURPOSE, 14, 1, 0),
...
@@ -605,7 +605,7 @@ AC97_SINGLE("Simulated Stereo Enhancement", AC97_GENERAL_PURPOSE, 14, 1, 0),
AC97_SINGLE
(
"3D Control - Switch"
,
AC97_GENERAL_PURPOSE
,
13
,
1
,
0
),
AC97_SINGLE
(
"3D Control - Switch"
,
AC97_GENERAL_PURPOSE
,
13
,
1
,
0
),
AC97_SINGLE
(
"Loudness (bass boost)"
,
AC97_GENERAL_PURPOSE
,
12
,
1
,
0
),
AC97_SINGLE
(
"Loudness (bass boost)"
,
AC97_GENERAL_PURPOSE
,
12
,
1
,
0
),
AC97_ENUM
(
"Mono Output Select"
,
std_enum
[
2
]),
AC97_ENUM
(
"Mono Output Select"
,
std_enum
[
2
]),
AC97_ENUM
(
"Mic Select"
,
std_enum
[
3
]),
AC97_ENUM
(
"Mic Select
Capture Switch
"
,
std_enum
[
3
]),
AC97_SINGLE
(
"ADC/DAC Loopback"
,
AC97_GENERAL_PURPOSE
,
7
,
1
,
0
)
AC97_SINGLE
(
"ADC/DAC Loopback"
,
AC97_GENERAL_PURPOSE
,
7
,
1
,
0
)
};
};
...
...
sound/pci/ac97/ac97_patch.c
View file @
21fdddea
...
@@ -563,7 +563,7 @@ AC97_SINGLE("Mic 1 to Phone Switch", AC97_MIC, 14, 1, 1),
...
@@ -563,7 +563,7 @@ AC97_SINGLE("Mic 1 to Phone Switch", AC97_MIC, 14, 1, 1),
AC97_SINGLE
(
"Mic 2 to Phone Switch"
,
AC97_MIC
,
13
,
1
,
1
),
AC97_SINGLE
(
"Mic 2 to Phone Switch"
,
AC97_MIC
,
13
,
1
,
1
),
AC97_ENUM
(
"Mic Select Source"
,
wm9711_enum
[
7
]),
AC97_ENUM
(
"Mic Select Source"
,
wm9711_enum
[
7
]),
AC97_SINGLE
(
"Mic 1 Volume"
,
AC97_MIC
,
8
,
32
,
1
),
AC97_SINGLE
(
"Mic 1 Volume"
,
AC97_MIC
,
8
,
32
,
1
),
AC97_SINGLE
(
"Mic 20dB Boost Switch"
,
AC97_MIC
,
7
,
1
,
0
),
AC97_SINGLE
(
"Mic 20dB Boost
Capture
Switch"
,
AC97_MIC
,
7
,
1
,
0
),
AC97_SINGLE
(
"Master ZC Switch"
,
AC97_MASTER
,
7
,
1
,
0
),
AC97_SINGLE
(
"Master ZC Switch"
,
AC97_MASTER
,
7
,
1
,
0
),
AC97_SINGLE
(
"Headphone ZC Switch"
,
AC97_HEADPHONE
,
7
,
1
,
0
),
AC97_SINGLE
(
"Headphone ZC Switch"
,
AC97_HEADPHONE
,
7
,
1
,
0
),
...
@@ -653,7 +653,7 @@ AC97_SINGLE("Mic 1 Volume", AC97_MIC, 8, 31, 1),
...
@@ -653,7 +653,7 @@ AC97_SINGLE("Mic 1 Volume", AC97_MIC, 8, 31, 1),
AC97_SINGLE
(
"Mic 2 Volume"
,
AC97_MIC
,
0
,
31
,
1
),
AC97_SINGLE
(
"Mic 2 Volume"
,
AC97_MIC
,
0
,
31
,
1
),
AC97_SINGLE
(
"Mic 1 to Mono Switch"
,
AC97_LINE
,
7
,
1
,
1
),
AC97_SINGLE
(
"Mic 1 to Mono Switch"
,
AC97_LINE
,
7
,
1
,
1
),
AC97_SINGLE
(
"Mic 2 to Mono Switch"
,
AC97_LINE
,
6
,
1
,
1
),
AC97_SINGLE
(
"Mic 2 to Mono Switch"
,
AC97_LINE
,
6
,
1
,
1
),
AC97_SINGLE
(
"Mic Boost (+20dB) Switch"
,
AC97_LINE
,
5
,
1
,
0
),
AC97_SINGLE
(
"Mic Boost (+20dB)
Capture
Switch"
,
AC97_LINE
,
5
,
1
,
0
),
AC97_ENUM
(
"Mic to Headphone Mux"
,
wm9713_enum
[
0
]),
AC97_ENUM
(
"Mic to Headphone Mux"
,
wm9713_enum
[
0
]),
AC97_SINGLE
(
"Mic Headphone Mixer Volume"
,
AC97_LINE
,
0
,
7
,
1
),
AC97_SINGLE
(
"Mic Headphone Mixer Volume"
,
AC97_LINE
,
0
,
7
,
1
),
...
...
sound/pci/emu10k1/emu10k1_main.c
View file @
21fdddea
...
@@ -777,14 +777,6 @@ static int snd_emu10k1_dev_free(struct snd_device *device)
...
@@ -777,14 +777,6 @@ static int snd_emu10k1_dev_free(struct snd_device *device)
static
struct
snd_emu_chip_details
emu_chip_details
[]
=
{
static
struct
snd_emu_chip_details
emu_chip_details
[]
=
{
/* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/
/* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/
/* Audigy4 SB0400 */
{.
vendor
=
0x1102
,
.
device
=
0x0008
,
.
subsystem
=
0x10211102
,
.
driver
=
"Audigy2"
,
.
name
=
"Audigy 4 [SB0400]"
,
.
id
=
"Audigy2"
,
.
emu10k2_chip
=
1
,
.
ca0108_chip
=
1
,
.
spk71
=
1
,
.
ac97_chip
=
1
}
,
/* Tested by James@superbug.co.uk 3rd July 2005 */
/* Tested by James@superbug.co.uk 3rd July 2005 */
/* DSP: CA0108-IAT
/* DSP: CA0108-IAT
* DAC: CS4382-KQ
* DAC: CS4382-KQ
...
@@ -799,13 +791,59 @@ static struct snd_emu_chip_details emu_chip_details[] = {
...
@@ -799,13 +791,59 @@ static struct snd_emu_chip_details emu_chip_details[] = {
.
ca0108_chip
=
1
,
.
ca0108_chip
=
1
,
.
spk71
=
1
,
.
spk71
=
1
,
.
ac97_chip
=
1
}
,
.
ac97_chip
=
1
}
,
/* Audigy4 (Not PRO) SB0610 */
/* Tested by James@superbug.co.uk 4th April 2006 */
/* A_IOCFG bits
* Output
* 0: ?
* 1: ?
* 2: ?
* 3: 0 - Digital Out, 1 - Line in
* 4: ?
* 5: ?
* 6: ?
* 7: ?
* Input
* 8: ?
* 9: ?
* A: Green jack sense (Front)
* B: ?
* C: Black jack sense (Rear/Side Right)
* D: Yellow jack sense (Center/LFE/Side Left)
* E: ?
* F: ?
*
* Digital Out/Line in switch using A_IOCFG bit 3 (0x08)
* 0 - Digital Out
* 1 - Line in
*/
/* Mic input not tested.
* Analog CD input not tested
* Digital Out not tested.
* Line in working.
* Audio output 5.1 working. Side outputs not working.
*/
/* DSP: CA10300-IAT LF
* DAC: Cirrus Logic CS4382-KQZ
* ADC: Philips 1361T
* AC97: Sigmatel STAC9750
* CA0151: None
*/
{.
vendor
=
0x1102
,
.
device
=
0x0008
,
.
subsystem
=
0x10211102
,
.
driver
=
"Audigy2"
,
.
name
=
"Audigy 4 [SB0610]"
,
.
id
=
"Audigy2"
,
.
emu10k2_chip
=
1
,
.
ca0108_chip
=
1
,
.
spk71
=
1
,
.
adc_1361t
=
1
,
/* 24 bit capture instead of 16bit */
.
ac97_chip
=
1
}
,
/* Audigy 2 ZS Notebook Cardbus card.*/
/* Audigy 2 ZS Notebook Cardbus card.*/
/* Tested by James@superbug.co.uk 22th December 2005 */
/* Tested by James@superbug.co.uk 22th December 2005 */
/* Audio output 7.1/Headphones working.
/* Audio output 7.1/Headphones working.
* Digital output working. (AC3 not checked, only PCM)
* Digital output working. (AC3 not checked, only PCM)
* Audio inputs not tested.
* Audio inputs not tested.
*/
*/
/* DSP: Tin
y
2
/* DSP: Tin
a
2
* DAC: Wolfson WM8768/WM8568
* DAC: Wolfson WM8768/WM8568
* ADC: Wolfson WM8775
* ADC: Wolfson WM8775
* AC97: None
* AC97: None
...
...
sound/pci/emu10k1/emumixer.c
View file @
21fdddea
...
@@ -777,6 +777,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
...
@@ -777,6 +777,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
};
};
static
char
*
audigy_remove_ctls
[]
=
{
static
char
*
audigy_remove_ctls
[]
=
{
/* Master/PCM controls on ac97 of Audigy has no effect */
/* Master/PCM controls on ac97 of Audigy has no effect */
/* On the Audigy2 the AC97 playback is piped into
* the Philips ADC for 24bit capture */
"PCM Playback Switch"
,
"PCM Playback Switch"
,
"PCM Playback Volume"
,
"PCM Playback Volume"
,
"Master Mono Playback Switch"
,
"Master Mono Playback Switch"
,
...
@@ -804,6 +806,47 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
...
@@ -804,6 +806,47 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
"AMic Playback Volume"
,
"Mic Playback Volume"
,
"AMic Playback Volume"
,
"Mic Playback Volume"
,
NULL
NULL
};
};
static
char
*
audigy_remove_ctls_1361t_adc
[]
=
{
/* On the Audigy2 the AC97 playback is piped into
* the Philips ADC for 24bit capture */
"PCM Playback Switch"
,
"PCM Playback Volume"
,
"Master Mono Playback Switch"
,
"Master Mono Playback Volume"
,
"Capture Source"
,
"Capture Switch"
,
"Capture Volume"
,
"Mic Capture Volume"
,
"Headphone Playback Switch"
,
"Headphone Playback Volume"
,
"3D Control - Center"
,
"3D Control - Depth"
,
"3D Control - Switch"
,
"Line2 Playback Volume"
,
"Line2 Capture Volume"
,
NULL
};
static
char
*
audigy_rename_ctls_1361t_adc
[]
=
{
"Master Playback Switch"
,
"Master Capture Switch"
,
"Master Playback Volume"
,
"Master Capture Volume"
,
"Wave Master Playback Volume"
,
"Master Playback Volume"
,
"PC Speaker Playback Switch"
,
"PC Speaker Capture Switch"
,
"PC Speaker Playback Volume"
,
"PC Speaker Capture Volume"
,
"Phone Playback Switch"
,
"Phone Capture Switch"
,
"Phone Playback Volume"
,
"Phone Capture Volume"
,
"Mic Playback Switch"
,
"Mic Capture Switch"
,
"Mic Playback Volume"
,
"Mic Capture Volume"
,
"Line Playback Switch"
,
"Line Capture Switch"
,
"Line Playback Volume"
,
"Line Capture Volume"
,
"CD Playback Switch"
,
"CD Capture Switch"
,
"CD Playback Volume"
,
"CD Capture Volume"
,
"Aux Playback Switch"
,
"Aux Capture Switch"
,
"Aux Playback Volume"
,
"Aux Capture Volume"
,
"Video Playback Switch"
,
"Video Capture Switch"
,
"Video Playback Volume"
,
"Video Capture Volume"
,
NULL
};
if
(
emu
->
card_capabilities
->
ac97_chip
)
{
if
(
emu
->
card_capabilities
->
ac97_chip
)
{
struct
snd_ac97_bus
*
pbus
;
struct
snd_ac97_bus
*
pbus
;
...
@@ -834,7 +877,10 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
...
@@ -834,7 +877,10 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
snd_ac97_write_cache
(
emu
->
ac97
,
AC97_MASTER
,
0x0000
);
snd_ac97_write_cache
(
emu
->
ac97
,
AC97_MASTER
,
0x0000
);
/* set capture source to mic */
/* set capture source to mic */
snd_ac97_write_cache
(
emu
->
ac97
,
AC97_REC_SEL
,
0x0000
);
snd_ac97_write_cache
(
emu
->
ac97
,
AC97_REC_SEL
,
0x0000
);
c
=
audigy_remove_ctls
;
if
(
emu
->
card_capabilities
->
adc_1361t
)
c
=
audigy_remove_ctls_1361t_adc
;
else
c
=
audigy_remove_ctls
;
}
else
{
}
else
{
/*
/*
* Credits for cards based on STAC9758:
* Credits for cards based on STAC9758:
...
@@ -863,11 +909,15 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
...
@@ -863,11 +909,15 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
}
}
if
(
emu
->
audigy
)
if
(
emu
->
audigy
)
c
=
audigy_rename_ctls
;
if
(
emu
->
card_capabilities
->
adc_1361t
)
c
=
audigy_rename_ctls_1361t_adc
;
else
c
=
audigy_rename_ctls
;
else
else
c
=
emu10k1_rename_ctls
;
c
=
emu10k1_rename_ctls
;
for
(;
*
c
;
c
+=
2
)
for
(;
*
c
;
c
+=
2
)
rename_ctl
(
card
,
c
[
0
],
c
[
1
]);
rename_ctl
(
card
,
c
[
0
],
c
[
1
]);
if
(
emu
->
card_capabilities
->
subsystem
==
0x20071102
)
{
/* Audigy 4 Pro */
if
(
emu
->
card_capabilities
->
subsystem
==
0x20071102
)
{
/* Audigy 4 Pro */
rename_ctl
(
card
,
"Line2 Capture Volume"
,
"Line1/Mic Capture Volume"
);
rename_ctl
(
card
,
"Line2 Capture Volume"
,
"Line1/Mic Capture Volume"
);
rename_ctl
(
card
,
"Analog Mix Capture Volume"
,
"Line2 Capture Volume"
);
rename_ctl
(
card
,
"Analog Mix Capture Volume"
,
"Line2 Capture Volume"
);
...
...
sound/pci/emu10k1/tina2.h
View file @
21fdddea
/*
/*
* Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
* Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
* Driver p16v chips
* Driver tina2 chips
* Version: 0.21
* Version: 0.1
*
*
* This code was initally based on code from ALSA's emu10k1x.c which is:
* Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment