Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f1cf9a66
Commit
f1cf9a66
authored
Mar 08, 2010
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/hda' into for-linus
parents
6679ee18
2abbf439
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1141 additions
and
904 deletions
+1141
-904
sound/pci/hda/Kconfig
sound/pci/hda/Kconfig
+1
-1
sound/pci/hda/Makefile
sound/pci/hda/Makefile
+2
-2
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.c
+38
-31
sound/pci/hda/hda_eld.c
sound/pci/hda/hda_eld.c
+6
-0
sound/pci/hda/hda_intel.c
sound/pci/hda/hda_intel.c
+7
-2
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_hdmi.c
+849
-0
sound/pci/hda/patch_intelhdmi.c
sound/pci/hda/patch_intelhdmi.c
+13
-808
sound/pci/hda/patch_nvhdmi.c
sound/pci/hda/patch_nvhdmi.c
+216
-59
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_realtek.c
+9
-1
No files found.
sound/pci/hda/Kconfig
View file @
f1cf9a66
...
...
@@ -157,7 +157,7 @@ config SND_HDA_CODEC_INTELHDMI
config SND_HDA_ELD
def_bool y
depends on SND_HDA_CODEC_INTELHDMI
depends on SND_HDA_CODEC_INTELHDMI
|| SND_HDA_CODEC_NVHDMI
config SND_HDA_CODEC_CIRRUS
bool "Build Cirrus Logic codec support"
...
...
sound/pci/hda/Makefile
View file @
f1cf9a66
...
...
@@ -3,7 +3,7 @@ snd-hda-intel-objs := hda_intel.o
snd-hda-codec-y
:=
hda_codec.o
snd-hda-codec-$(CONFIG_SND_HDA_GENERIC)
+=
hda_generic.o
snd-hda-codec-$(CONFIG_PROC_FS)
+=
hda_proc.o
#
snd-hda-codec-$(CONFIG_SND_HDA_ELD) += hda_eld.o
snd-hda-codec-$(CONFIG_SND_HDA_ELD)
+=
hda_eld.o
snd-hda-codec-$(CONFIG_SND_HDA_HWDEP)
+=
hda_hwdep.o
snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP)
+=
hda_beep.o
...
...
@@ -18,7 +18,7 @@ snd-hda-codec-ca0110-objs := patch_ca0110.o
snd-hda-codec-conexant-objs
:=
patch_conexant.o
snd-hda-codec-via-objs
:=
patch_via.o
snd-hda-codec-nvhdmi-objs
:=
patch_nvhdmi.o
snd-hda-codec-intelhdmi-objs
:=
patch_intelhdmi.o
hda_eld.o
snd-hda-codec-intelhdmi-objs
:=
patch_intelhdmi.o
# common driver
obj-$(CONFIG_SND_HDA_INTEL)
:=
snd-hda-codec.o
...
...
sound/pci/hda/hda_codec.c
View file @
f1cf9a66
...
...
@@ -978,7 +978,8 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
*
* Returns 0 if successful, or a negative error code.
*/
int
/*__devinit*/
snd_hda_codec_new
(
struct
hda_bus
*
bus
,
unsigned
int
codec_addr
,
int
/*__devinit*/
snd_hda_codec_new
(
struct
hda_bus
*
bus
,
unsigned
int
codec_addr
,
struct
hda_codec
**
codecp
)
{
struct
hda_codec
*
codec
;
...
...
@@ -1186,7 +1187,7 @@ EXPORT_SYMBOL_HDA(snd_hda_codec_cleanup_stream);
*/
/* FIXME: more better hash key? */
#define HDA_HASH_KEY(nid,
dir,
idx) (u32)((nid) + ((idx) << 16) + ((dir) << 24))
#define HDA_HASH_KEY(nid,
dir,
idx) (u32)((nid) + ((idx) << 16) + ((dir) << 24))
#define HDA_HASH_PINCAP_KEY(nid) (u32)((nid) + (0x02 << 24))
#define HDA_HASH_PARPCM_KEY(nid) (u32)((nid) + (0x03 << 24))
#define HDA_HASH_PARSTR_KEY(nid) (u32)((nid) + (0x04 << 24))
...
...
@@ -1356,7 +1357,8 @@ u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid)
if
(
!
codec
->
no_trigger_sense
)
{
pincap
=
snd_hda_query_pin_caps
(
codec
,
nid
);
if
(
pincap
&
AC_PINCAP_TRIG_REQ
)
/* need trigger? */
snd_hda_codec_read
(
codec
,
nid
,
0
,
AC_VERB_SET_PIN_SENSE
,
0
);
snd_hda_codec_read
(
codec
,
nid
,
0
,
AC_VERB_SET_PIN_SENSE
,
0
);
}
return
snd_hda_codec_read
(
codec
,
nid
,
0
,
AC_VERB_GET_PIN_SENSE
,
0
);
...
...
@@ -2439,27 +2441,27 @@ static struct snd_kcontrol_new dig_mixes[] = {
{
.
access
=
SNDRV_CTL_ELEM_ACCESS_READ
,
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
PLAYBACK
,
CON_MASK
),
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
PLAYBACK
,
CON_MASK
),
.
info
=
snd_hda_spdif_mask_info
,
.
get
=
snd_hda_spdif_cmask_get
,
},
{
.
access
=
SNDRV_CTL_ELEM_ACCESS_READ
,
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
PLAYBACK
,
PRO_MASK
),
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
PLAYBACK
,
PRO_MASK
),
.
info
=
snd_hda_spdif_mask_info
,
.
get
=
snd_hda_spdif_pmask_get
,
},
{
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
PLAYBACK
,
DEFAULT
),
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
PLAYBACK
,
DEFAULT
),
.
info
=
snd_hda_spdif_mask_info
,
.
get
=
snd_hda_spdif_default_get
,
.
put
=
snd_hda_spdif_default_put
,
},
{
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
PLAYBACK
,
SWITCH
),
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
PLAYBACK
,
SWITCH
),
.
info
=
snd_hda_spdif_out_switch_info
,
.
get
=
snd_hda_spdif_out_switch_get
,
.
put
=
snd_hda_spdif_out_switch_put
,
...
...
@@ -2610,7 +2612,7 @@ static int snd_hda_spdif_in_status_get(struct snd_kcontrol *kcontrol,
static
struct
snd_kcontrol_new
dig_in_ctls
[]
=
{
{
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
CAPTURE
,
SWITCH
),
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
CAPTURE
,
SWITCH
),
.
info
=
snd_hda_spdif_in_switch_info
,
.
get
=
snd_hda_spdif_in_switch_get
,
.
put
=
snd_hda_spdif_in_switch_put
,
...
...
@@ -2618,7 +2620,7 @@ static struct snd_kcontrol_new dig_in_ctls[] = {
{
.
access
=
SNDRV_CTL_ELEM_ACCESS_READ
,
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
CAPTURE
,
DEFAULT
),
.
name
=
SNDRV_CTL_NAME_IEC958
(
""
,
CAPTURE
,
DEFAULT
),
.
info
=
snd_hda_spdif_mask_info
,
.
get
=
snd_hda_spdif_in_status_get
,
},
...
...
@@ -2979,8 +2981,12 @@ unsigned int snd_hda_calc_stream_format(unsigned int rate,
val
|=
channels
-
1
;
switch
(
snd_pcm_format_width
(
format
))
{
case
8
:
val
|=
0x00
;
break
;
case
16
:
val
|=
0x10
;
break
;
case
8
:
val
|=
0x00
;
break
;
case
16
:
val
|=
0x10
;
break
;
case
20
:
case
24
:
case
32
:
...
...
@@ -3298,7 +3304,8 @@ static int get_empty_pcm_device(struct hda_bus *bus, int type)
if
(
!
test_and_set_bit
(
audio_idx
[
type
][
i
],
bus
->
pcm_dev_bits
))
return
audio_idx
[
type
][
i
];
snd_printk
(
KERN_WARNING
"Too many %s devices
\n
"
,
snd_hda_pcm_type_name
[
type
]);
snd_printk
(
KERN_WARNING
"Too many %s devices
\n
"
,
snd_hda_pcm_type_name
[
type
]);
return
-
EAGAIN
;
}
...
...
@@ -4089,7 +4096,7 @@ static int is_in_nid_list(hda_nid_t nid, hda_nid_t *list)
/*
* Sort an associated group of pins according to their sequence numbers.
*/
static
void
sort_pins_by_sequence
(
hda_nid_t
*
pins
,
short
*
sequences
,
static
void
sort_pins_by_sequence
(
hda_nid_t
*
pins
,
short
*
sequences
,
int
num_pins
)
{
int
i
,
j
;
...
...
@@ -4186,9 +4193,9 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
case
AC_JACK_SPEAKER
:
seq
=
get_defcfg_sequence
(
def_conf
);
assoc
=
get_defcfg_association
(
def_conf
);
if
(
!
assoc
)
if
(
!
assoc
)
continue
;
if
(
!
assoc_speaker
)
if
(
!
assoc_speaker
)
assoc_speaker
=
assoc
;
else
if
(
assoc_speaker
!=
assoc
)
continue
;
...
...
sound/pci/hda/hda_eld.c
View file @
f1cf9a66
...
...
@@ -331,6 +331,7 @@ int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid)
return
snd_hda_codec_read
(
codec
,
nid
,
0
,
AC_VERB_GET_HDMI_DIP_SIZE
,
AC_DIPSIZE_ELD_BUF
);
}
EXPORT_SYMBOL_HDA
(
snd_hdmi_get_eld_size
);
int
snd_hdmi_get_eld
(
struct
hdmi_eld
*
eld
,
struct
hda_codec
*
codec
,
hda_nid_t
nid
)
...
...
@@ -366,6 +367,7 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld,
kfree
(
buf
);
return
ret
;
}
EXPORT_SYMBOL_HDA
(
snd_hdmi_get_eld
);
static
void
hdmi_show_short_audio_desc
(
struct
cea_sad
*
a
)
{
...
...
@@ -404,6 +406,7 @@ void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen)
}
buf
[
j
]
=
'\0'
;
/* necessary when j == 0 */
}
EXPORT_SYMBOL_HDA
(
snd_print_channel_allocation
);
void
snd_hdmi_show_eld
(
struct
hdmi_eld
*
e
)
{
...
...
@@ -422,6 +425,7 @@ void snd_hdmi_show_eld(struct hdmi_eld *e)
for
(
i
=
0
;
i
<
e
->
sad_count
;
i
++
)
hdmi_show_short_audio_desc
(
e
->
sad
+
i
);
}
EXPORT_SYMBOL_HDA
(
snd_hdmi_show_eld
);
#ifdef CONFIG_PROC_FS
...
...
@@ -580,6 +584,7 @@ int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld,
return
0
;
}
EXPORT_SYMBOL_HDA
(
snd_hda_eld_proc_new
);
void
snd_hda_eld_proc_free
(
struct
hda_codec
*
codec
,
struct
hdmi_eld
*
eld
)
{
...
...
@@ -588,5 +593,6 @@ void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld)
eld
->
proc_entry
=
NULL
;
}
}
EXPORT_SYMBOL_HDA
(
snd_hda_eld_proc_free
);
#endif
/* CONFIG_PROC_FS */
sound/pci/hda/hda_intel.c
View file @
f1cf9a66
...
...
@@ -267,7 +267,8 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
#define RIRB_INT_MASK 0x05
/* STATESTS int mask: S3,SD2,SD1,SD0 */
#define AZX_MAX_CODECS 4
#define AZX_MAX_CODECS 8
#define AZX_DEFAULT_CODECS 4
#define STATESTS_INT_MASK ((1 << AZX_MAX_CODECS) - 1)
/* SD_CTL bits */
...
...
@@ -1367,6 +1368,7 @@ static void azx_bus_reset(struct hda_bus *bus)
/* number of codec slots for each chipset: 0 = default slots (i.e. 4) */
static
unsigned
int
azx_max_codecs
[
AZX_NUM_DRIVERS
]
__devinitdata
=
{
[
AZX_DRIVER_NVIDIA
]
=
8
,
[
AZX_DRIVER_TERA
]
=
1
,
};
...
...
@@ -1399,7 +1401,7 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model)
codecs
=
0
;
max_slots
=
azx_max_codecs
[
chip
->
driver_type
];
if
(
!
max_slots
)
max_slots
=
AZX_
MAX
_CODECS
;
max_slots
=
AZX_
DEFAULT
_CODECS
;
/* First try to probe all given codec slots */
for
(
c
=
0
;
c
<
max_slots
;
c
++
)
{
...
...
@@ -2263,10 +2265,12 @@ static int azx_dev_free(struct snd_device *device)
static
struct
snd_pci_quirk
position_fix_list
[]
__devinitdata
=
{
SND_PCI_QUIRK
(
0x1028
,
0x01cc
,
"Dell D820"
,
POS_FIX_LPIB
),
SND_PCI_QUIRK
(
0x1028
,
0x01de
,
"Dell Precision 390"
,
POS_FIX_LPIB
),
SND_PCI_QUIRK
(
0x1028
,
0x01f6
,
"Dell Latitude 131L"
,
POS_FIX_LPIB
),
SND_PCI_QUIRK
(
0x103c
,
0x306d
,
"HP dv3"
,
POS_FIX_LPIB
),
SND_PCI_QUIRK
(
0x1106
,
0x3288
,
"ASUS M2V-MX SE"
,
POS_FIX_LPIB
),
SND_PCI_QUIRK
(
0x1043
,
0x813d
,
"ASUS P5AD2"
,
POS_FIX_LPIB
),
SND_PCI_QUIRK
(
0x1462
,
0x1002
,
"MSI Wind U115"
,
POS_FIX_LPIB
),
SND_PCI_QUIRK
(
0x1565
,
0x820f
,
"Biostar Microtech"
,
POS_FIX_LPIB
),
{}
};
...
...
@@ -2354,6 +2358,7 @@ static void __devinit check_probe_mask(struct azx *chip, int dev)
static
struct
snd_pci_quirk
msi_black_list
[]
__devinitdata
=
{
SND_PCI_QUIRK
(
0x1043
,
0x81f2
,
"ASUS"
,
0
),
/* Athlon64 X2 + nvidia */
SND_PCI_QUIRK
(
0x1043
,
0x81f6
,
"ASUS"
,
0
),
/* nvidia */
SND_PCI_QUIRK
(
0x1849
,
0x0888
,
"ASRock"
,
0
),
/* Athlon64 X2 + nvidia */
{}
};
...
...
sound/pci/hda/patch_hdmi.c
0 → 100644
View file @
f1cf9a66
This diff is collapsed.
Click to expand it.
sound/pci/hda/patch_intelhdmi.c
View file @
f1cf9a66
This diff is collapsed.
Click to expand it.
sound/pci/hda/patch_nvhdmi.c
View file @
f1cf9a66
This diff is collapsed.
Click to expand it.
sound/pci/hda/patch_realtek.c
View file @
f1cf9a66
...
...
@@ -4915,7 +4915,7 @@ static void fixup_automic_adc(struct hda_codec *codec)
static
void
fixup_single_adc
(
struct
hda_codec
*
codec
)
{
struct
alc_spec
*
spec
=
codec
->
spec
;
hda_nid_t
pin
;
hda_nid_t
pin
=
0
;
int
i
;
/* search for the input pin; there must be only one */
...
...
@@ -13561,6 +13561,8 @@ static void alc269_lifebook_unsol_event(struct hda_codec *codec,
static
void
alc269_quanta_fl1_setup
(
struct
hda_codec
*
codec
)
{
struct
alc_spec
*
spec
=
codec
->
spec
;
spec
->
autocfg
.
hp_pins
[
0
]
=
0x15
;
spec
->
autocfg
.
speaker_pins
[
0
]
=
0x14
;
spec
->
ext_mic
.
pin
=
0x18
;
spec
->
ext_mic
.
mux_idx
=
0
;
spec
->
int_mic
.
pin
=
0x19
;
...
...
@@ -13656,6 +13658,8 @@ static void alc269_laptop_unsol_event(struct hda_codec *codec,
static
void
alc269_laptop_dmic_setup
(
struct
hda_codec
*
codec
)
{
struct
alc_spec
*
spec
=
codec
->
spec
;
spec
->
autocfg
.
hp_pins
[
0
]
=
0x15
;
spec
->
autocfg
.
speaker_pins
[
0
]
=
0x14
;
spec
->
ext_mic
.
pin
=
0x18
;
spec
->
ext_mic
.
mux_idx
=
0
;
spec
->
int_mic
.
pin
=
0x12
;
...
...
@@ -13666,6 +13670,8 @@ static void alc269_laptop_dmic_setup(struct hda_codec *codec)
static
void
alc269vb_laptop_dmic_setup
(
struct
hda_codec
*
codec
)
{
struct
alc_spec
*
spec
=
codec
->
spec
;
spec
->
autocfg
.
hp_pins
[
0
]
=
0x15
;
spec
->
autocfg
.
speaker_pins
[
0
]
=
0x14
;
spec
->
ext_mic
.
pin
=
0x18
;
spec
->
ext_mic
.
mux_idx
=
0
;
spec
->
int_mic
.
pin
=
0x12
;
...
...
@@ -13676,6 +13682,8 @@ static void alc269vb_laptop_dmic_setup(struct hda_codec *codec)
static
void
alc269_laptop_amic_setup
(
struct
hda_codec
*
codec
)
{
struct
alc_spec
*
spec
=
codec
->
spec
;
spec
->
autocfg
.
hp_pins
[
0
]
=
0x15
;
spec
->
autocfg
.
speaker_pins
[
0
]
=
0x14
;
spec
->
ext_mic
.
pin
=
0x18
;
spec
->
ext_mic
.
mux_idx
=
0
;
spec
->
int_mic
.
pin
=
0x19
;
...
...
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