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
7c589750
Commit
7c589750
authored
Mar 02, 2012
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/hda' into topic/hda
Speaker-Out renames are merged. Conflicts: sound/pci/hda/patch_realtek.c
parents
07cafff2
e49a3434
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
79 additions
and
35 deletions
+79
-35
sound/pci/azt3328.c
sound/pci/azt3328.c
+1
-2
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.c
+8
-4
sound/pci/hda/hda_codec.h
sound/pci/hda/hda_codec.h
+3
-0
sound/pci/hda/patch_cirrus.c
sound/pci/hda/patch_cirrus.c
+2
-2
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_conexant.c
+22
-2
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_realtek.c
+11
-3
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_sigmatel.c
+1
-1
sound/soc/codecs/ak4642.c
sound/soc/codecs/ak4642.c
+16
-15
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8962.c
+1
-1
sound/soc/imx/imx-ssi.c
sound/soc/imx/imx-ssi.c
+1
-1
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+9
-3
sound/usb/caiaq/audio.c
sound/usb/caiaq/audio.c
+4
-1
No files found.
sound/pci/azt3328.c
View file @
7c589750
...
...
@@ -2684,9 +2684,8 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
err
=
snd_opl3_hwdep_new
(
opl3
,
0
,
1
,
NULL
);
if
(
err
<
0
)
goto
out_err
;
}
opl3
->
private_data
=
chip
;
}
sprintf
(
card
->
longname
,
"%s at 0x%lx, irq %i"
,
card
->
shortname
,
chip
->
ctrl_io
,
chip
->
irq
);
...
...
sound/pci/hda/hda_codec.c
View file @
7c589750
...
...
@@ -1759,6 +1759,10 @@ static void put_vol_mute(struct hda_codec *codec, struct hda_amp_info *info,
parm
=
ch
?
AC_AMP_SET_RIGHT
:
AC_AMP_SET_LEFT
;
parm
|=
direction
==
HDA_OUTPUT
?
AC_AMP_SET_OUTPUT
:
AC_AMP_SET_INPUT
;
parm
|=
index
<<
AC_AMP_SET_INDEX_SHIFT
;
if
((
val
&
HDA_AMP_MUTE
)
&&
!
(
info
->
amp_caps
&
AC_AMPCAP_MUTE
)
&&
(
info
->
amp_caps
&
AC_AMPCAP_MIN_MUTE
))
;
/* set the zero value as a fake mute */
else
parm
|=
val
;
snd_hda_codec_write
(
codec
,
nid
,
0
,
AC_VERB_SET_AMP_GAIN_MUTE
,
parm
);
info
->
vol
[
ch
]
=
val
;
...
...
@@ -2026,7 +2030,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag,
val1
=
-
((
caps
&
AC_AMPCAP_OFFSET
)
>>
AC_AMPCAP_OFFSET_SHIFT
);
val1
+=
ofs
;
val1
=
((
int
)
val1
)
*
((
int
)
val2
);
if
(
min_mute
)
if
(
min_mute
||
(
caps
&
AC_AMPCAP_MIN_MUTE
)
)
val2
|=
TLV_DB_SCALE_MUTE
;
if
(
put_user
(
SNDRV_CTL_TLVT_DB_SCALE
,
_tlv
))
return
-
EFAULT
;
...
...
@@ -5123,7 +5127,7 @@ static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid,
const
char
*
pfx
=
""
,
*
sfx
=
""
;
/* handle as a speaker if it's a fixed line-out */
if
(
!
strcmp
(
name
,
"Line
-
Out"
)
&&
attr
==
INPUT_PIN_ATTR_INT
)
if
(
!
strcmp
(
name
,
"Line
Out"
)
&&
attr
==
INPUT_PIN_ATTR_INT
)
name
=
"Speaker"
;
/* check the location */
switch
(
attr
)
{
...
...
@@ -5182,7 +5186,7 @@ int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid,
switch
(
get_defcfg_device
(
def_conf
))
{
case
AC_JACK_LINE_OUT
:
return
fill_audio_out_name
(
codec
,
nid
,
cfg
,
"Line
-
Out"
,
return
fill_audio_out_name
(
codec
,
nid
,
cfg
,
"Line
Out"
,
label
,
maxlen
,
indexp
);
case
AC_JACK_SPEAKER
:
return
fill_audio_out_name
(
codec
,
nid
,
cfg
,
"Speaker"
,
...
...
sound/pci/hda/hda_codec.h
View file @
7c589750
...
...
@@ -298,6 +298,9 @@ enum {
#define AC_AMPCAP_MUTE (1<<31)
/* mute capable */
#define AC_AMPCAP_MUTE_SHIFT 31
/* driver-specific amp-caps: using bits 24-30 */
#define AC_AMPCAP_MIN_MUTE (1 << 30)
/* min-volume = mute */
/* Connection list */
#define AC_CLIST_LENGTH (0x7f<<0)
#define AC_CLIST_LONG (1<<7)
...
...
sound/pci/hda/patch_cirrus.c
View file @
7c589750
...
...
@@ -609,7 +609,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx,
"Front Speaker"
,
"Surround Speaker"
,
"Bass Speaker"
};
static
const
char
*
const
line_outs
[]
=
{
"Front Line
-Out"
,
"Surround Line-Out"
,
"Bass Line-
Out"
"Front Line
Out"
,
"Surround Line Out"
,
"Bass Line
Out"
};
fix_volume_caps
(
codec
,
dac
);
...
...
@@ -635,7 +635,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx,
if
(
num_ctls
>
1
)
name
=
line_outs
[
idx
];
else
name
=
"Line
-
Out"
;
name
=
"Line
Out"
;
break
;
}
...
...
sound/pci/hda/patch_conexant.c
View file @
7c589750
...
...
@@ -3470,7 +3470,7 @@ static int cx_automute_mode_info(struct snd_kcontrol *kcontrol,
"Disabled"
,
"Enabled"
};
static
const
char
*
const
texts3
[]
=
{
"Disabled"
,
"Speaker Only"
,
"Line
-
Out+Speaker"
"Disabled"
,
"Speaker Only"
,
"Line
Out+Speaker"
};
const
char
*
const
*
texts
;
...
...
@@ -4112,7 +4112,8 @@ static int cx_auto_add_volume_idx(struct hda_codec *codec, const char *basename,
err
=
snd_hda_ctl_add
(
codec
,
nid
,
kctl
);
if
(
err
<
0
)
return
err
;
if
(
!
(
query_amp_caps
(
codec
,
nid
,
hda_dir
)
&
AC_AMPCAP_MUTE
))
if
(
!
(
query_amp_caps
(
codec
,
nid
,
hda_dir
)
&
(
AC_AMPCAP_MUTE
|
AC_AMPCAP_MIN_MUTE
)))
break
;
}
return
0
;
...
...
@@ -4413,6 +4414,22 @@ static const struct snd_pci_quirk cxt_fixups[] = {
{}
};
/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
* can be created (bko#42825)
*/
static
void
add_cx5051_fake_mutes
(
struct
hda_codec
*
codec
)
{
static
hda_nid_t
out_nids
[]
=
{
0x10
,
0x11
,
0
};
hda_nid_t
*
p
;
for
(
p
=
out_nids
;
*
p
;
p
++
)
snd_hda_override_amp_caps
(
codec
,
*
p
,
HDA_OUTPUT
,
AC_AMPCAP_MIN_MUTE
|
query_amp_caps
(
codec
,
*
p
,
HDA_OUTPUT
));
}
static
int
patch_conexant_auto
(
struct
hda_codec
*
codec
)
{
struct
conexant_spec
*
spec
;
...
...
@@ -4431,6 +4448,9 @@ static int patch_conexant_auto(struct hda_codec *codec)
case
0x14f15045
:
spec
->
single_adc_amp
=
1
;
break
;
case
0x14f15051
:
add_cx5051_fake_mutes
(
codec
);
break
;
}
apply_pin_fixup
(
codec
,
cxt_fixups
,
cxt_pincfg_tbl
);
...
...
sound/pci/hda/patch_realtek.c
View file @
7c589750
...
...
@@ -841,7 +841,7 @@ static int alc_automute_mode_info(struct snd_kcontrol *kcontrol,
"Disabled"
,
"Enabled"
};
static
const
char
*
const
texts3
[]
=
{
"Disabled"
,
"Speaker Only"
,
"Line
-
Out+Speaker"
"Disabled"
,
"Speaker Only"
,
"Line
Out+Speaker"
};
const
char
*
const
*
texts
;
...
...
@@ -1856,7 +1856,7 @@ DEFINE_CAPMIX_NOSRC(3);
*/
static
const
char
*
const
alc_slave_pfxs
[]
=
{
"Front"
,
"Surround"
,
"Center"
,
"LFE"
,
"Side"
,
"Headphone"
,
"Speaker"
,
"Mono"
,
"Line
-
Out"
,
"Headphone"
,
"Speaker"
,
"Mono"
,
"Line
Out"
,
"CLFE"
,
"Bass Speaker"
,
"PCM"
,
NULL
,
};
...
...
@@ -4147,7 +4147,7 @@ static void alc_auto_init_input_src(struct hda_codec *codec)
else
nums
=
spec
->
num_adc_nids
;
for
(
c
=
0
;
c
<
nums
;
c
++
)
alc_mux_select
(
codec
,
0
,
spec
->
cur_mux
[
c
],
true
);
alc_mux_select
(
codec
,
c
,
spec
->
cur_mux
[
c
],
true
);
}
/* add mic boosts if needed */
...
...
@@ -5082,12 +5082,20 @@ static void alc889_fixup_dac_route(struct hda_codec *codec,
const
struct
alc_fixup
*
fix
,
int
action
)
{
if
(
action
==
ALC_FIXUP_ACT_PRE_PROBE
)
{
/* fake the connections during parsing the tree */
hda_nid_t
conn1
[
2
]
=
{
0x0c
,
0x0d
};
hda_nid_t
conn2
[
2
]
=
{
0x0e
,
0x0f
};
snd_hda_override_conn_list
(
codec
,
0x14
,
2
,
conn1
);
snd_hda_override_conn_list
(
codec
,
0x15
,
2
,
conn1
);
snd_hda_override_conn_list
(
codec
,
0x18
,
2
,
conn2
);
snd_hda_override_conn_list
(
codec
,
0x1a
,
2
,
conn2
);
}
else
if
(
action
==
ALC_FIXUP_ACT_PROBE
)
{
/* restore the connections */
hda_nid_t
conn
[
5
]
=
{
0x0c
,
0x0d
,
0x0e
,
0x0f
,
0x26
};
snd_hda_override_conn_list
(
codec
,
0x14
,
5
,
conn
);
snd_hda_override_conn_list
(
codec
,
0x15
,
5
,
conn
);
snd_hda_override_conn_list
(
codec
,
0x18
,
5
,
conn
);
snd_hda_override_conn_list
(
codec
,
0x1a
,
5
,
conn
);
}
}
...
...
sound/pci/hda/patch_sigmatel.c
View file @
7c589750
...
...
@@ -4638,7 +4638,7 @@ static void stac92xx_hp_detect(struct hda_codec *codec)
unsigned
int
val
=
AC_PINCTL_OUT_EN
|
AC_PINCTL_HP_EN
;
if
(
no_hp_sensing
(
spec
,
i
))
continue
;
if
(
presence
)
if
(
1
/*presence*/
)
stac92xx_set_pinctl
(
codec
,
cfg
->
hp_pins
[
i
],
val
);
#if 0 /* FIXME */
/* Resetting the pinctl like below may lead to (a sort of) regressions
...
...
sound/soc/codecs/ak4642.c
View file @
7c589750
...
...
@@ -146,13 +146,10 @@ static const struct snd_kcontrol_new ak4642_snd_controls[] = {
SOC_DOUBLE_R_TLV
(
"Digital Playback Volume"
,
L_DVC
,
R_DVC
,
0
,
0xFF
,
1
,
out_tlv
),
SOC_SINGLE
(
"Headphone Switch"
,
PW_MGMT2
,
6
,
1
,
0
),
};
static
const
struct
snd_kcontrol_new
ak4642_hpout_mixer_controls
[]
=
{
SOC_DAPM_SINGLE
(
"DACH"
,
MD_CTL4
,
0
,
1
,
0
),
};
static
const
struct
snd_kcontrol_new
ak4642_headphone_control
=
SOC_DAPM_SINGLE
(
"Switch"
,
PW_MGMT2
,
6
,
1
,
0
);
static
const
struct
snd_kcontrol_new
ak4642_lout_mixer_controls
[]
=
{
SOC_DAPM_SINGLE
(
"DACL"
,
SG_SL1
,
4
,
1
,
0
),
...
...
@@ -165,13 +162,12 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = {
SND_SOC_DAPM_OUTPUT
(
"HPOUTR"
),
SND_SOC_DAPM_OUTPUT
(
"LINEOUT"
),
SND_SOC_DAPM_MIXER
(
"HPOUTL Mixer"
,
PW_MGMT2
,
5
,
0
,
&
ak4642_hpout_mixer_controls
[
0
],
ARRAY_SIZE
(
ak4642_hpout_mixer_controls
)),
SND_SOC_DAPM_PGA
(
"HPL Out"
,
PW_MGMT2
,
5
,
0
,
NULL
,
0
),
SND_SOC_DAPM_PGA
(
"HPR Out"
,
PW_MGMT2
,
4
,
0
,
NULL
,
0
),
SND_SOC_DAPM_SWITCH
(
"Headphone Enable"
,
SND_SOC_NOPM
,
0
,
0
,
&
ak4642_headphone_control
),
SND_SOC_DAPM_MIXER
(
"HPOUTR Mixer"
,
PW_MGMT2
,
4
,
0
,
&
ak4642_hpout_mixer_controls
[
0
],
ARRAY_SIZE
(
ak4642_hpout_mixer_controls
)),
SND_SOC_DAPM_PGA
(
"DACH"
,
MD_CTL4
,
0
,
0
,
NULL
,
0
),
SND_SOC_DAPM_MIXER
(
"LINEOUT Mixer"
,
PW_MGMT1
,
3
,
0
,
&
ak4642_lout_mixer_controls
[
0
],
...
...
@@ -184,12 +180,17 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = {
static
const
struct
snd_soc_dapm_route
ak4642_intercon
[]
=
{
/* Outputs */
{
"HPOUTL"
,
NULL
,
"HP
OUTL Mixer
"
},
{
"HPOUTR"
,
NULL
,
"HP
OUTR Mixer
"
},
{
"HPOUTL"
,
NULL
,
"HP
L Out
"
},
{
"HPOUTR"
,
NULL
,
"HP
R Out
"
},
{
"LINEOUT"
,
NULL
,
"LINEOUT Mixer"
},
{
"HPOUTL Mixer"
,
"DACH"
,
"DAC"
},
{
"HPOUTR Mixer"
,
"DACH"
,
"DAC"
},
{
"HPL Out"
,
NULL
,
"Headphone Enable"
},
{
"HPR Out"
,
NULL
,
"Headphone Enable"
},
{
"Headphone Enable"
,
"Switch"
,
"DACH"
},
{
"DACH"
,
NULL
,
"DAC"
},
{
"LINEOUT Mixer"
,
"DACL"
,
"DAC"
},
};
...
...
sound/soc/codecs/wm8962.c
View file @
7c589750
...
...
@@ -2564,7 +2564,7 @@ static int dsp2_event(struct snd_soc_dapm_widget *w,
return
0
;
}
static
const
char
*
st_text
[]
=
{
"None"
,
"
Right"
,
"Lef
t"
};
static
const
char
*
st_text
[]
=
{
"None"
,
"
Left"
,
"Righ
t"
};
static
const
struct
soc_enum
str_enum
=
SOC_ENUM_SINGLE
(
WM8962_DAC_DSP_MIXING_1
,
2
,
3
,
st_text
);
...
...
sound/soc/imx/imx-ssi.c
View file @
7c589750
...
...
@@ -112,7 +112,7 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
break
;
case
SND_SOC_DAIFMT_DSP_A
:
/* data on rising edge of bclk, frame high 1clk before data */
strcr
|=
SSI_STCR_TFSL
|
SSI_STCR_TEFS
;
strcr
|=
SSI_STCR_TFSL
|
SSI_STCR_T
XBIT0
|
SSI_STCR_T
EFS
;
break
;
}
...
...
sound/soc/soc-dapm.c
View file @
7c589750
...
...
@@ -3068,9 +3068,13 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm)
* standby.
*/
if
(
powerdown
)
{
snd_soc_dapm_set_bias_level
(
dapm
,
SND_SOC_BIAS_PREPARE
);
if
(
dapm
->
bias_level
==
SND_SOC_BIAS_ON
)
snd_soc_dapm_set_bias_level
(
dapm
,
SND_SOC_BIAS_PREPARE
);
dapm_seq_run
(
dapm
,
&
down_list
,
0
,
false
);
snd_soc_dapm_set_bias_level
(
dapm
,
SND_SOC_BIAS_STANDBY
);
if
(
dapm
->
bias_level
==
SND_SOC_BIAS_PREPARE
)
snd_soc_dapm_set_bias_level
(
dapm
,
SND_SOC_BIAS_STANDBY
);
}
}
...
...
@@ -3083,7 +3087,9 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card)
list_for_each_entry
(
codec
,
&
card
->
codec_dev_list
,
list
)
{
soc_dapm_shutdown_codec
(
&
codec
->
dapm
);
snd_soc_dapm_set_bias_level
(
&
codec
->
dapm
,
SND_SOC_BIAS_OFF
);
if
(
codec
->
dapm
.
bias_level
==
SND_SOC_BIAS_STANDBY
)
snd_soc_dapm_set_bias_level
(
&
codec
->
dapm
,
SND_SOC_BIAS_OFF
);
}
}
...
...
sound/usb/caiaq/audio.c
View file @
7c589750
...
...
@@ -311,8 +311,10 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub)
spin_lock
(
&
dev
->
spinlock
);
if
(
dev
->
input_panic
||
dev
->
output_panic
)
if
(
dev
->
input_panic
||
dev
->
output_panic
)
{
ptr
=
SNDRV_PCM_POS_XRUN
;
goto
unlock
;
}
if
(
sub
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
ptr
=
bytes_to_frames
(
sub
->
runtime
,
...
...
@@ -321,6 +323,7 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub)
ptr
=
bytes_to_frames
(
sub
->
runtime
,
dev
->
audio_in_buf_pos
[
index
]);
unlock:
spin_unlock
(
&
dev
->
spinlock
);
return
ptr
;
}
...
...
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