sound updates for 3.2-rc1
Subsystems (4)
Linus,
please pull sound updates for v3.2-rc1 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-linus
The topmost commit is 6bcbf64ace40d6833622d85701218a8bb7a4f207
All small commits and no big dangerous thing is found.
Thanks!
Takashi
===
Adrian Knoth (3):
ALSA: hdspm - Fix MADI channel format in the status ioctl
ALSA: hdsp - Correct HDSP_VERSION_BIT constant, thus partly fixing RPM detection
ALSA: hdspm - Enable all firmware ranges for PCI MADI/AES cards
Alexander Stein (1):
ALSA: hda_hwdep: Fix possible buffer overflow
Axel Lin (5):
ASoC: wm8940: Fix mask for setting BCLKDIV
ASoC: tlv320aic23: Clear TLV320AIC23_MS_MASTER bit for slave mode
ASoC: tlv320aic3x: Clear BIT_CLK_MASTER and WORD_CLK_MASTER bits for for slave mode
ASoC: wm8711: Fix wrong mask for setting input audio data bit length select
ASoC: Leave input audio data bit length settings untouched in wm8711_set_dai_fmt
Charles Chin (3):
ALSA: hda - Disable power-widget control for IDT 92HD83/93 as default
ALSA: hda - Add support for 92HD65 / 92HD66 family of codecs
ALSA: hda/sigmatel - Automatically retrieve digital I/O widgets
Dan Carpenter (1):
ALSA: hwdep: silence integer overflow warning
Hong Xu (1):
ASoC: WM8904: Set `invert' bit for Capture Switch
Konstantin Ozerkov (1):
ALSA: intel8x0: Improve performance in virtual environment
Mark Brown (4):
ASoC: Fix return value of wm5100_gpio_direction_out()
ASoC: Ensure WM8962 PLL registers are reset
ASoC: Ensure the WM8962 oscillator and PLLs start up disabled
ASoC: Ensure we always delay for WM8962 FLL when starting from SYSCLK
Takashi Iwai (5):
ALSA: intel8x0 - Fix inclusion of kvm_para.h
ALSA: hda - Check NO_PRESENCE pincfg default bit
ALSA: hda/realtek - Don't create alt-stream for capture when unnecessary
ALSA: hda - Remove unused variables
ALSA: hda/realtek - Skip invalid digital out pins
--- sound/core/hwdep.c | 9 +++++- sound/pci/hda/hda_hwdep.c | 2 - sound/pci/hda/hda_local.h | 4 ++ sound/pci/hda/patch_hdmi.c | 5 +-- sound/pci/hda/patch_realtek.c | 23 ++++++++------ sound/pci/hda/patch_sigmatel.c | 67 +++++++++++++++++++++++---------------- sound/pci/hda/patch_via.c | 5 --- sound/pci/intel8x0.c | 29 ++++++++++++++++- sound/pci/rme9652/hdsp.c | 2 +- sound/pci/rme9652/hdspm.c | 42 +++++++++++-------------- sound/soc/codecs/tlv320aic23.c | 1 + sound/soc/codecs/tlv320aic3x.c | 1 + sound/soc/codecs/wm5100.c | 12 +++++-- sound/soc/codecs/wm8711.c | 4 +- sound/soc/codecs/wm8904.c | 2 +- sound/soc/codecs/wm8940.c | 2 +- sound/soc/codecs/wm8962.c | 28 +++++++++++----- 17 files changed, 144 insertions(+), 94 deletions(-)
sound/core/hwdep.c +8 -1
@@ -272,7 +272,14 @@ static int snd_hwdep_control_ioctl(struct snd_card *card,if (get_user (device, (int __user *)arg))return -EFAULT ;mutex_lock (®ister_mutex); - device = device <0 ?0 : device +1 ; + +if (device <0 ) + device =0 ; +else if (device <SNDRV_MINOR_HWDEPS ) + device++; +else + device =SNDRV_MINOR_HWDEPS ; +while (device <SNDRV_MINOR_HWDEPS ) {if (snd_hwdep_search (card, device))break ;
sound/pci/hda/hda_hwdep.c +0 -2
@@ -756,8 +756,6 @@ static int get_line_from_fw(char *buf, int size, struct firmware *fw) }if (!fw->size)return 0 ; -if (size < fw->size) - size = fw->size;for (len =0 ; len < fw->size; len++) {if (!*p)
sound/pci/hda/hda_local.h +4 -0
@@ -442,6 +442,8 @@ struct auto_pin_cfg { (cfg & AC_DEFCFG_SEQUENCE)#define get_defcfg_device (cfg) \ ((cfg & AC_DEFCFG_DEVICE) >> AC_DEFCFG_DEVICE_SHIFT) +#define get_defcfg_misc (cfg) \ + ((cfg & AC_DEFCFG_MISC) >> AC_DEFCFG_MISC_SHIFT)/* bit-flags for snd_hda_parse_pin_def_config() behavior */ #define HDA_PINCFG_NO_HP_FIXUP (1 << 0)/* no HP-split */
@@ -509,6 +511,8 @@ int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid);static inline bool is_jack_detectable (struct hda_codec *codec,hda_nid_t nid) {return (snd_hda_query_pin_caps (codec, nid) &AC_PINCAP_PRES_DETECT ) && + !(get_defcfg_misc (snd_hda_codec_get_pincfg (codec, nid) & +AC_DEFCFG_MISC_NO_PRESENCE )) && (get_wcaps (codec, nid) &AC_WCAP_UNSOL_CAP ); }
sound/pci/hda/patch_hdmi.c +1 -4
@@ -1006,7 +1006,6 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)unsigned int caps, config;int pin_idx;struct hdmi_spec_per_pin *per_pin; -struct hdmi_eld *eld;int err; caps =snd_hda_param_read (codec, pin_nid,AC_PAR_PIN_CAP );
@@ -1023,7 +1022,6 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) pin_idx = spec->num_pins; per_pin = &spec->pins[pin_idx]; - eld = &per_pin->sink_eld; per_pin->pin_nid = pin_nid;
@@ -1576,7 +1574,7 @@ static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo, struct snd_pcm_substream *substream) {int chs; -unsigned int dataDCC1, dataDCC2, channel_id; +unsigned int dataDCC2, channel_id;int i;struct hdmi_spec *spec = codec->spec; struct hda_spdif_out *spdif =
@@ -1586,7 +1584,6 @@ static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo, chs = substream->runtime->channels; - dataDCC1 =AC_DIG1_ENABLE |AC_DIG1_COPYRIGHT ; dataDCC2 =0x2 ;/* turn off SPDIF once; otherwise the IEC958 bits won't be updated */
sound/pci/hda/patch_realtek.c +13 -10
@@ -1604,27 +1604,29 @@ static void alc_auto_init_digital(struct hda_codec *codec)static void alc_auto_parse_digital (struct hda_codec *codec) {struct alc_spec *spec = codec->spec; -int i, err; +int i, err, nums;hda_nid_t dig_nid;/* support multiple SPDIFs; the secondary is set up as a slave */ + nums =0 ;for (i =0 ; i < spec->autocfg.dig_outs; i++) {hda_nid_t conn[4 ]; err =snd_hda_get_connections (codec, spec->autocfg.dig_out_pins[i], conn,ARRAY_SIZE (conn)); -if (err <0 ) +if (err <=0 )continue ; dig_nid = conn[0 ];/* assume the first element is audio-out */ -if (!i) { +if (!nums) { spec->multiout.dig_out_nid = dig_nid; spec->dig_out_type = spec->autocfg.dig_out_type[0 ]; }else { spec->multiout.slave_dig_outs = spec->slave_dig_outs; -if (i >=ARRAY_SIZE (spec->slave_dig_outs) -1 ) +if (nums >=ARRAY_SIZE (spec->slave_dig_outs) -1 )break ; - spec->slave_dig_outs[i -1 ] = dig_nid; + spec->slave_dig_outs[nums -1 ] = dig_nid; } + nums++; }if (spec->autocfg.dig_in_pin) {
@@ -2270,6 +2272,7 @@ static int alc_build_pcms(struct hda_codec *codec)struct alc_spec *spec = codec->spec;struct hda_pcm *info = spec->pcm_rec;const struct hda_pcm_stream *p; +bool have_multi_adcs;int i; codec->num_pcms =1 ;
@@ -2348,8 +2351,11 @@ static int alc_build_pcms(struct hda_codec *codec)/* If the use of more than one ADC is requested for the current * model, configure a second analog capture-only PCM. */ + have_multi_adcs = (spec->num_adc_nids >1 ) && + !spec->dyn_adc_switch && !spec->auto_mic && + (!spec->input_mux || spec->input_mux->num_items >1 );/* Additional Analaog capture for index #2 */ -if (spec->alt_dac_nid || spec->num_adc_nids >1 ) { +if (spec->alt_dac_nid || have_multi_adcs) { codec->num_pcms =3 ; info = spec->pcm_rec +2 ; info->name = spec->stream_name_analog;
@@ -2365,7 +2371,7 @@ static int alc_build_pcms(struct hda_codec *codec) alc_pcm_null_stream; info->stream[SNDRV_PCM_STREAM_PLAYBACK ].nid =0 ; } -if (spec->num_adc_nids >1 ) { +if (have_multi_adcs) { p = spec->stream_analog_alt_capture;if (!p) p = &alc_pcm_analog_alt_capture;
@@ -2657,7 +2663,6 @@ static int alc_auto_fill_adc_caps(struct hda_codec *codec)hda_nid_t *adc_nids = spec->private_adc_nids;hda_nid_t *cap_nids = spec->private_capsrc_nids;int max_nums =ARRAY_SIZE (spec->private_adc_nids); -bool indep_capsrc = false;int i, nums =0 ; nid = codec->start_nid;
@@ -2679,13 +2684,11 @@ static int alc_auto_fill_adc_caps(struct hda_codec *codec)break ;if (type ==AC_WID_AUD_SEL ) { cap_nids[nums] = src; - indep_capsrc = true;break ; } n =snd_hda_get_conn_list (codec, src, &list);if (n >1 ) { cap_nids[nums] = src; - indep_capsrc = true;break ; }else if (n !=1 )break ;
sound/pci/hda/patch_sigmatel.c +39 -28
142 lines not on this page · raw message
sound/pci/hda/patch_via.c +0 -5
@@ -3700,13 +3700,8 @@ static const struct hda_verb vt1812_init_verbs[] = {static void set_widgets_power_state_vt1812 (struct hda_codec *codec) {struct via_spec *spec = codec->spec; -int imux_is_smixer = -snd_hda_codec_read (codec,0x13 ,0 ,AC_VERB_GET_CONNECT_SEL ,0x00 ) ==3 ;unsigned int parm;unsigned int present; -/* MUX10 (1eh) = stereo mixer */ - imux_is_smixer = -snd_hda_codec_read (codec,0x1e ,0 ,AC_VERB_GET_CONNECT_SEL ,0x00 ) ==5 ;/* inputs */ /* PW 5/6/7 (29h/2ah/2bh) */ parm =AC_PWRST_D3 ;
sound/pci/intel8x0.c +27 -2
@@ -42,6 +42,12 @@#include <asm/pgtable.h> #include <asm/cacheflush.h> +#ifdef CONFIG_KVM_GUEST +#include <linux/kvm_para.h> +#else +#define kvm_para_available () (0) +#endif +MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>" );MODULE_DESCRIPTION ("Intel 82801AA,82901AB,i810,i820,i830,i840,i845,MX440; SiS 7012; Ali 5455" );MODULE_LICENSE ("GPL" );
@@ -77,6 +83,7 @@ static int buggy_semaphore;static int buggy_irq =-1 ;/* auto-check */ static int xbox;static int spdif_aclink =-1 ; +static int inside_vm =-1 ;module_param (index, int,0444 );MODULE_PARM_DESC (index,"Index value for Intel i8x0 soundcard." );
@@ -94,6 +101,8 @@ module_param(xbox, bool, 0444);MODULE_PARM_DESC (xbox,"Set to 1 for Xbox, if you have problems with the AC'97 codec detection." );module_param (spdif_aclink, int,0444 );MODULE_PARM_DESC (spdif_aclink,"S/PDIF over AC-link." ); +module_param (inside_vm, bool,0444 ); +MODULE_PARM_DESC (inside_vm,"KVM/Parallels optimization." );/* just for backward compatibility */ static int enable;
@@ -400,6 +409,7 @@ struct intel8x0 { unsigned buggy_irq: 1; /* workaround for buggy mobos */ unsigned xbox: 1; /* workaround for Xbox AC'97 detection */ unsigned buggy_semaphore: 1; /* workaround for buggy codec semaphore */ + unsigned inside_vm: 1; /* enable VM optimization */int spdif_idx;/* SPDIF BAR index; *_SPBAR or -1 if use PCMOUT */ unsigned int sdm_saved;/* SDM reg value */
@@ -1065,8 +1075,11 @@ static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *subsudelay (10 );continue ; } -if (civ ==igetbyte (chip, ichdev->reg_offset +ICH_REG_OFF_CIV ) && - ptr1 ==igetword (chip, ichdev->reg_offset + ichdev->roff_picb)) +if (civ !=igetbyte (chip, ichdev->reg_offset +ICH_REG_OFF_CIV )) +continue ; +if (chip->inside_vm) +break ; +if (ptr1 ==igetword (chip, ichdev->reg_offset + ichdev->roff_picb))break ; }while (timeout--); ptr = ichdev->last_pos;
@@ -2984,6 +2997,10 @@ static int __devinit snd_intel8x0_create(struct snd_card *card,if (xbox) chip->xbox =1 ; + chip->inside_vm = inside_vm; +if (inside_vm) +printk (KERN_INFO "intel8x0: enable KVM optimization\n" ); +if (pci->vendor ==PCI_VENDOR_ID_INTEL && pci->device ==PCI_DEVICE_ID_INTEL_440MX ) chip->fix_nocache =1 ;/* enable workaround */
@@ -3226,6 +3243,14 @@ static int __devinit snd_intel8x0_probe(struct pci_dev *pci, buggy_irq =0 ; } +if (inside_vm <0 ) { +/* detect KVM and Parallels virtual environments */ + inside_vm =kvm_para_available (); +#if defined(__i386__) || defined(__x86_64__) + inside_vm = inside_vm ||boot_cpu_has (X86_FEATURE_HYPERVISOR ); +#endif + } +if ((err =snd_intel8x0_create (card, pci, pci_id->driver_data, &chip)) <0 ) {snd_card_free (card);
sound/pci/rme9652/hdsp.c +1 -1
@@ -151,7 +151,7 @@ MODULE_FIRMWARE("digiface_firmware_rev11.bin");#define HDSP_PROGRAM 0x020#define HDSP_CONFIG_MODE_0 0x040#define HDSP_CONFIG_MODE_1 0x080 -#define HDSP_VERSION_BIT 0x100 +#define HDSP_VERSION_BIT (0x100 | HDSP_S_LOAD)#define HDSP_BIGENDIAN_MODE 0x200#define HDSP_RD_MULTIPLE 0x400#define HDSP_9652_ENABLE_MIXER 0x800
sound/pci/rme9652/hdspm.c +18 -24
71 lines not on this page · raw message
sound/soc/codecs/tlv320aic23.c +1 -0
@@ -430,6 +430,7 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai, iface_reg |=TLV320AIC23_MS_MASTER ;break ;case SND_SOC_DAIFMT_CBS_CFS : + iface_reg &= ~TLV320AIC23_MS_MASTER ;break ;default :return -EINVAL ;
sound/soc/codecs/tlv320aic3x.c +1 -0
@@ -1023,6 +1023,7 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai,break ;case SND_SOC_DAIFMT_CBS_CFS : aic3x->master =0 ; + iface_areg &= ~(BIT_CLK_MASTER |WORD_CLK_MASTER );break ;default :return -EINVAL ;
sound/soc/codecs/wm5100.c +8 -4
@@ -2361,13 +2361,17 @@ static int wm5100_gpio_direction_out(struct gpio_chip *chip, {struct wm5100_priv *wm5100 =gpio_to_wm5100 (chip);struct snd_soc_codec *codec = wm5100->codec; -int val; +int val, ret; val = (1 <<WM5100_GP1_FN_SHIFT ) | (!!value <<WM5100_GP1_LVL_SHIFT ); -return snd_soc_update_bits (codec,WM5100_GPIO_CTRL_1 + offset, -WM5100_GP1_FN_MASK |WM5100_GP1_DIR | -WM5100_GP1_LVL , val); + ret =snd_soc_update_bits (codec,WM5100_GPIO_CTRL_1 + offset, +WM5100_GP1_FN_MASK |WM5100_GP1_DIR | +WM5100_GP1_LVL , val); +if (ret <0 ) +return ret; +else +return 0 ; }static int wm5100_gpio_get (struct gpio_chip *chip,unsigned offset)
sound/soc/codecs/wm8711.c +2 -2
@@ -151,7 +151,7 @@ static int wm8711_hw_params(struct snd_pcm_substream *substream, {struct snd_soc_codec *codec = dai->codec;struct wm8711_priv *wm8711 =snd_soc_codec_get_drvdata (codec); -u16 iface =snd_soc_read (codec,WM8711_IFACE ) &0xfffc ; +u16 iface =snd_soc_read (codec,WM8711_IFACE ) &0xfff3 ;int i =get_coeff (wm8711->sysclk,params_rate (params));u16 srate = (coeff_div[i].sr <<2 ) | (coeff_div[i].bosr <<1 ) | coeff_div[i].usb;
@@ -232,7 +232,7 @@ static int wm8711_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) {struct snd_soc_codec *codec = codec_dai->codec; -u16 iface =0 ; +u16 iface =snd_soc_read (codec,WM8711_IFACE ) &0x000c ;/* set master/slave audio interface */ switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) {
sound/soc/codecs/wm8904.c +1 -1
@@ -867,7 +867,7 @@ SOC_ENUM("Right Capture Mode", rin_mode),SOC_DOUBLE_R ("Capture Volume" ,WM8904_ANALOGUE_LEFT_INPUT_0 ,WM8904_ANALOGUE_RIGHT_INPUT_0 ,0 ,31 ,0 ),SOC_DOUBLE_R ("Capture Switch" ,WM8904_ANALOGUE_LEFT_INPUT_0 , -WM8904_ANALOGUE_RIGHT_INPUT_0 ,7 ,1 ,0 ), +WM8904_ANALOGUE_RIGHT_INPUT_0 ,7 ,1 ,1 ),SOC_SINGLE ("High Pass Filter Switch" ,WM8904_ADC_DIGITAL_0 ,4 ,1 ,0 ), SOC_ENUM("High Pass Filter Mode", hpf_mode),
sound/soc/codecs/wm8940.c +1 -1
@@ -621,7 +621,7 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,switch (div_id) {case WM8940_BCLKDIV : - reg =snd_soc_read (codec,WM8940_CLOCK ) &0xFFEF3 ; + reg =snd_soc_read (codec,WM8940_CLOCK ) &0xFFE3 ; ret =snd_soc_write (codec,WM8940_CLOCK , reg | (div <<2 ));break ;case WM8940_MCLKDIV :
sound/soc/codecs/wm8962.c +19 -9
@@ -1961,7 +1961,13 @@ static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int restatic int wm8962_reset (struct snd_soc_codec *codec) { -return snd_soc_write (codec,WM8962_SOFTWARE_RESET ,0x6243 ); +int ret; + + ret =snd_soc_write (codec,WM8962_SOFTWARE_RESET ,0x6243 ); +if (ret !=0 ) +return ret; + +return snd_soc_write (codec,WM8962_PLL_SOFTWARE_RESET ,0 ); } static const DECLARE_TLV_DB_SCALE(inpga_tlv, -2325, 75, 0);
@@ -2360,15 +2366,14 @@ static int sysclk_event(struct snd_soc_dapm_widget *w,snd_soc_update_bits (codec,WM8962_FLL_CONTROL_1 ,WM8962_FLL_ENA ,WM8962_FLL_ENA ); -if (wm8962->irq) { - timeout =msecs_to_jiffies (5 ); - timeout =wait_for_completion_timeout (&wm8962->fll_lock, - timeout); -if (timeout ==0 ) -dev_err (codec->dev, -"Timed out starting FLL\n" ); - } + timeout =msecs_to_jiffies (5 ); + timeout =wait_for_completion_timeout (&wm8962->fll_lock, + timeout); + +if (wm8962->irq && timeout ==0 ) +dev_err (codec->dev, +"Timed out starting FLL\n" ); }break ;
@@ -4029,6 +4034,11 @@ static int wm8962_probe(struct snd_soc_codec *codec)snd_soc_update_bits (codec,WM8962_CLOCKING2 ,WM8962_CLKREG_OVD ,WM8962_CLKREG_OVD ); +/* Ensure that the oscillator and PLLs are disabled */ +snd_soc_update_bits (codec,WM8962_PLL2 , +WM8962_OSC_ENA |WM8962_PLL2_ENA |WM8962_PLL3_ENA , +0 ); +regulator_bulk_disable (ARRAY_SIZE (wm8962->supplies), wm8962->supplies);if (pdata) {