Commit af8f9372 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Set function_id only on FG nodes
  ALSA: MAINTAINERS - Update SOUND
  ALSA: emu10k1 - off by 1 in snd_emu10k1_wait()
  ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
  ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
  ASoC: Fix include build error in s3c2412-i2s.c
  ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
  ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
  ASoC: Fix jive_wm8750.c build problems
  ASoC: pxa-ssp: allow setting of dai format 0
  ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
  ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
  ALSA: Intel8x0: Add hp_only quirk for SSID 0x1028016a (Dell Inspiron 8600)
  ALSA: Intel8x0: Remove conflicting quirk for SSID 0x103c0934
  ALSA: hda_intel.c - Consolidate bitfields
parents 091ccb00 d6aa764e
......@@ -5235,7 +5235,12 @@ M: perex@perex.cz
P: Takashi Iwai
M: tiwai@suse.de
L: alsa-devel@alsa-project.org (subscribers-only)
W: http://www.alsa-project.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: Documentation/sound/
F: include/sound/
F: sound/
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
......
......@@ -490,7 +490,7 @@ void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait)
if (newtime != curtime)
break;
}
if (count >= 16384)
if (count > 16384)
break;
curtime = newtime;
}
......
......@@ -642,19 +642,21 @@ static int get_codec_name(struct hda_codec *codec)
*/
static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec)
{
int i, total_nodes;
int i, total_nodes, function_id;
hda_nid_t nid;
total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid);
for (i = 0; i < total_nodes; i++, nid++) {
codec->function_id = snd_hda_param_read(codec, nid,
function_id = snd_hda_param_read(codec, nid,
AC_PAR_FUNCTION_TYPE) & 0xff;
switch (codec->function_id) {
switch (function_id) {
case AC_GRP_AUDIO_FUNCTION:
codec->afg = nid;
codec->function_id = function_id;
break;
case AC_GRP_MODEM_FUNCTION:
codec->mfg = nid;
codec->function_id = function_id;
break;
default:
break;
......
......@@ -312,7 +312,6 @@ struct azx_dev {
unsigned int period_bytes; /* size of the period in bytes */
unsigned int frags; /* number for period in the play buffer */
unsigned int fifo_size; /* FIFO size */
unsigned int start_flag: 1; /* stream full start flag */
unsigned long start_jiffies; /* start + minimum jiffies */
unsigned long min_jiffies; /* minimum jiffies before position is valid */
......@@ -333,6 +332,7 @@ struct azx_dev {
unsigned int opened :1;
unsigned int running :1;
unsigned int irq_pending :1;
unsigned int start_flag: 1; /* stream full start flag */
/*
* For VIA:
* A flag to ensure DMA position is 0
......
......@@ -3977,6 +3977,14 @@ static int patch_ad1884a(struct hda_codec *codec)
spec->input_mux = &ad1884a_laptop_capture_source;
codec->patch_ops.unsol_event = ad1884a_hp_unsol_event;
codec->patch_ops.init = ad1884a_hp_init;
/* set the upper-limit for mixer amp to 0dB for avoiding the
* possible damage by overloading
*/
snd_hda_override_amp_caps(codec, 0x20, HDA_INPUT,
(0x17 << AC_AMPCAP_OFFSET_SHIFT) |
(0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
(0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
(1 << AC_AMPCAP_MUTE_SHIFT));
break;
case AD1884A_MOBILE:
spec->mixers[0] = ad1884a_mobile_mixers;
......
......@@ -3076,6 +3076,11 @@ static int create_multi_out_ctls(struct hda_codec *codec, int num_outs,
unsigned int wid_caps;
for (i = 0; i < num_outs && i < ARRAY_SIZE(chname); i++) {
if (type == AUTO_PIN_HP_OUT && !spec->hp_detect) {
wid_caps = get_wcaps(codec, pins[i]);
if (wid_caps & AC_WCAP_UNSOL_CAP)
spec->hp_detect = 1;
}
nid = dac_nids[i];
if (!nid)
continue;
......@@ -3119,11 +3124,6 @@ static int create_multi_out_ctls(struct hda_codec *codec, int num_outs,
err = create_controls_idx(codec, name, idx, nid, 3);
if (err < 0)
return err;
if (type == AUTO_PIN_HP_OUT && !spec->hp_detect) {
wid_caps = get_wcaps(codec, pins[i]);
if (wid_caps & AC_WCAP_UNSOL_CAP)
spec->hp_detect = 1;
}
}
}
return 0;
......
......@@ -1852,6 +1852,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
.name = "Dell Unknown", /* STAC9750/51 */
.type = AC97_TUNE_HP_ONLY
},
{
.subvendor = 0x1028,
.subdevice = 0x016a,
.name = "Dell Inspiron 8600", /* STAC9750/51 */
.type = AC97_TUNE_HP_ONLY
},
{
.subvendor = 0x1028,
.subdevice = 0x0186,
......@@ -1894,12 +1900,6 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
.name = "HP nc6000",
.type = AC97_TUNE_MUTE_LED
},
{
.subvendor = 0x103c,
.subdevice = 0x0934,
.name = "HP nx8220",
.type = AC97_TUNE_MUTE_LED
},
{
.subvendor = 0x103c,
.subdevice = 0x129d,
......
......@@ -283,7 +283,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
break;
case SND_SOC_DAIFMT_DSP_B:
regs->srgr2 |= FPER(wlen * channels - 1);
regs->srgr1 |= FWID(wlen * channels - 2);
regs->srgr1 |= FWID(0);
break;
}
......@@ -302,6 +302,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
{
struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data);
struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs;
unsigned int temp_fmt = fmt;
if (mcbsp_data->configured)
return 0;
......@@ -328,6 +329,8 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
/* 0-bit data delay */
regs->rcr2 |= RDATDLY(0);
regs->xcr2 |= XDATDLY(0);
/* Invert FS polarity configuration */
temp_fmt ^= SND_SOC_DAIFMT_NB_IF;
break;
default:
/* Unsupported data format */
......@@ -351,7 +354,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
}
/* Set bit clock (CLKX/CLKR) and FS polarities */
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_NB_NF:
/*
* Normal BCLK + FS.
......
......@@ -62,7 +62,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream,
/* Set codec DAI configuration */
err = snd_soc_dai_set_fmt(codec_dai,
SND_SOC_DAIFMT_DSP_B |
SND_SOC_DAIFMT_NB_IF |
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM);
if (err < 0) {
printk(KERN_ERR "can't set codec DAI configuration\n");
......@@ -72,7 +72,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream,
/* Set cpu DAI configuration */
err = snd_soc_dai_set_fmt(cpu_dai,
SND_SOC_DAIFMT_DSP_B |
SND_SOC_DAIFMT_NB_IF |
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM);
if (err < 0) {
printk(KERN_ERR "can't set cpu DAI configuration\n");
......
......@@ -806,6 +806,7 @@ static int pxa_ssp_probe(struct platform_device *pdev,
goto err_priv;
}
priv->dai_fmt = (unsigned int) -1;
dai->private_data = priv;
return 0;
......
......@@ -69,8 +69,8 @@ static int jive_hw_params(struct snd_pcm_substream *substream,
break;
}
s3c_i2sv2_calc_rate(&div, NULL, params_rate(params),
s3c2412_get_iisclk());
s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params),
s3c2412_get_iisclk());
/* set codec DAI configuration */
ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
......@@ -145,8 +145,9 @@ static struct snd_soc_dai_link jive_dai = {
};
/* jive audio machine driver */
static struct snd_soc_machine snd_soc_machine_jive = {
static struct snd_soc_card snd_soc_machine_jive = {
.name = "Jive",
.platform = &s3c24xx_soc_platform,
.dai_link = &jive_dai,
.num_links = 1,
};
......@@ -157,9 +158,8 @@ static struct wm8750_setup_data jive_wm8750_setup = {
/* jive audio subsystem */
static struct snd_soc_device jive_snd_devdata = {
.machine = &snd_soc_machine_jive,
.platform = &s3c24xx_soc_platform,
.codec_dev = &soc_codec_dev_wm8750_spi,
.card = &snd_soc_machine_jive,
.codec_dev = &soc_codec_dev_wm8750,
.codec_data = &jive_wm8750_setup,
};
......
......@@ -473,9 +473,9 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
/* default table of all avaialable root fs divisors */
static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 };
int s3c2412_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
unsigned int *fstab,
unsigned int rate, struct clk *clk)
int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
unsigned int *fstab,
unsigned int rate, struct clk *clk)
{
unsigned long clkrate = clk_get_rate(clk);
unsigned int div;
......@@ -531,7 +531,7 @@ int s3c2412_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
return 0;
}
EXPORT_SYMBOL_GPL(s3c2412_iis_calc_rate);
EXPORT_SYMBOL_GPL(s3c_i2sv2_iis_calc_rate);
int s3c_i2sv2_probe(struct platform_device *pdev,
struct snd_soc_dai *dai,
......@@ -624,10 +624,12 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
int s3c_i2sv2_register_dai(struct snd_soc_dai *dai)
{
dai->ops.trigger = s3c2412_i2s_trigger;
dai->ops.hw_params = s3c2412_i2s_hw_params;
dai->ops.set_fmt = s3c2412_i2s_set_fmt;
dai->ops.set_clkdiv = s3c2412_i2s_set_clkdiv;
struct snd_soc_dai_ops *ops = dai->ops;
ops->trigger = s3c2412_i2s_trigger;
ops->hw_params = s3c2412_i2s_hw_params;
ops->set_fmt = s3c2412_i2s_set_fmt;
ops->set_clkdiv = s3c2412_i2s_set_clkdiv;
dai->suspend = s3c2412_i2s_suspend;
dai->resume = s3c2412_i2s_resume;
......
......@@ -33,8 +33,8 @@
#include <plat/regs-s3c2412-iis.h>
#include <plat/regs-gpio.h>
#include <plat/audio.h>
#include <mach/regs-gpio.h>
#include <mach/dma.h>
#include "s3c24xx-pcm.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment