sound fixes for 2.6.31
Linus,
please pull the last sound update bits for v2.6.31 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus
A big chunk is the addition for PM support to X-Fi driver. The rest are spotty, mostly trivial fixes.
Thanks!
Takashi
===
Barry Song (1):
ASoC: Blackfin: update the bf5xx_i2s_resume parameters
Clemens Ladisch (1):
sound: seq_midi_event: fix decoding of (N)RPN events
Cliff Cai (1):
ASoC: Blackfin: keep better track of SPORT configuration state
Mariusz Kozlowski (1):
sound: fix check for return value in snd_pcm_hw_refine
Simon Arlott (1):
ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
Takashi Iwai (7):
ALSA: ctxfi - Allow unknown PCI SSIDs
ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
ALSA: hda - Add quirk for Sony VAIO Z21MN
ALSA: hda - Fix check of input source type for realtek codecs
ALSA: hda - Add digital-mic support to ALC262 auto model
ALSA: hda - Make jack-plug notification selectable
Wai Yew CHAY (1):
ALSA: ctxfi - Add PM support
--- sound/core/pcm_native.c | 2 +- sound/core/seq/seq_midi_event.c | 8 +- sound/pci/ctxfi/ctatc.c | 206 ++++++++++++++++++++++++++++---------- sound/pci/ctxfi/ctatc.h | 7 ++ sound/pci/ctxfi/cthardware.h | 7 ++ sound/pci/ctxfi/cthw20k1.c | 83 +++++++++++++--- sound/pci/ctxfi/cthw20k2.c | 65 ++++++++++--- sound/pci/ctxfi/ctmixer.c | 92 ++++++++++++------ sound/pci/ctxfi/ctmixer.h | 3 + sound/pci/ctxfi/ctpcm.c | 4 + sound/pci/ctxfi/xfi.c | 22 ++++ sound/pci/hda/Kconfig | 9 ++- sound/pci/hda/patch_conexant.c | 4 +- sound/pci/hda/patch_realtek.c | 109 +++++++++++---------- sound/pci/hda/patch_sigmatel.c | 10 +- sound/pci/via82xx.c | 6 +- sound/soc/blackfin/bf5xx-i2s.c | 10 ++- 17 files changed, 464 insertions(+), 183 deletions(-)
sound/core/pcm_native.c +1 -1
@@ -320,7 +320,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream, snd_mask_max(¶ms->masks[SNDRV_PCM_HW_PARAM_CHANNELS])) { changed = substream->ops->ioctl (substream,SNDRV_PCM_IOCTL1_FIFO_SIZE , params); -if (params <0 ) +if (changed <0 )return changed; } }
sound/core/seq/seq_midi_event.c +4 -4
@@ -504,10 +504,10 @@ static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf,if (dev->nostat && count <12 )return -ENOMEM ; cmd =MIDI_CMD_CONTROL |(ev->data.control.channel &0x0f ); - bytes[0 ] = ev->data.control.param &0x007f ; - bytes[1 ] = (ev->data.control.param &0x3f80 ) >>7 ; - bytes[2 ] = ev->data.control.value &0x007f ; - bytes[3 ] = (ev->data.control.value &0x3f80 ) >>7 ; + bytes[0 ] = (ev->data.control.param &0x3f80 ) >>7 ; + bytes[1 ] = ev->data.control.param &0x007f ; + bytes[2 ] = (ev->data.control.value &0x3f80 ) >>7 ; + bytes[3 ] = ev->data.control.value &0x007f ;if (cmd != dev->lastcmd && !dev->nostat) {if (count <9 )return -ENOMEM ;
sound/pci/ctxfi/ctatc.c +152 -54
333 lines not on this page · raw message
sound/pci/ctxfi/ctatc.h +7 -0
@@ -136,6 +136,13 @@ struct ct_atc {unsigned char n_pcm;struct ct_timer *timer; + +#ifdef CONFIG_PM +int (*suspend)(struct ct_atc *atc,pm_message_t state); +int (*resume)(struct ct_atc *atc); +#define NUM_PCMS (NUM_CTALSADEVS - 1) +struct snd_pcm *pcms[NUM_PCMS ]; +#endif };
sound/pci/ctxfi/cthardware.h +7 -0
@@ -30,13 +30,16 @@ enum CHIPTYP {enum CTCARDS {/* 20k1 models */ CTSB055X , +CT20K1_MODEL_FIRST =CTSB055X ,CTSB073X ,CTUAA ,CT20K1_UNKNOWN ,/* 20k2 models */ CTSB0760 , +CT20K2_MODEL_FIRST =CTSB0760 ,CTHENDRIX ,CTSB0880 , +CT20K2_UNKNOWN ,NUM_CTCARDS /* This should always be the last */ };
@@ -61,6 +64,10 @@ struct hw {int (*card_init)(struct hw *hw,struct card_conf *info);int (*card_stop)(struct hw *hw);int (*pll_init)(struct hw *hw,unsigned int rsr); +#ifdef CONFIG_PM +int (*suspend)(struct hw *hw,pm_message_t state); +int (*resume)(struct hw *hw,struct card_conf *info); +#endif int (*is_adc_source_selected)(struct hw *hw,enum ADCSRC source);int (*select_adc_source)(struct hw *hw,enum ADCSRC source);int (*have_digit_io_switch)(struct hw *hw);
sound/pci/ctxfi/cthw20k1.c +66 -17
122 lines not on this page · raw message
sound/pci/ctxfi/cthw20k2.c +52 -13
97 lines not on this page · raw message
sound/pci/ctxfi/ctmixer.c +63 -29
116 lines not on this page · raw message
sound/pci/ctxfi/ctmixer.h +3 -0
@@ -56,6 +56,9 @@ struct ct_mixer { enum MIXER_PORT_T type, struct rsc *rsc);int (*set_input_right)(struct ct_mixer *mixer,enum MIXER_PORT_T type,struct rsc *rsc); +#ifdef CONFIG_PM +int (*resume)(struct ct_mixer *mixer); +#endif }; int ct_alsa_mix_create(struct ct_atc *atc,
sound/pci/ctxfi/ctpcm.c +4 -0
@@ -422,5 +422,9 @@ int ct_alsa_pcm_create(struct ct_atc *atc,snd_pcm_lib_preallocate_pages_for_all (pcm,SNDRV_DMA_TYPE_DEV_SG ,snd_dma_pci_data (atc->pci),128 *1024 ,128 *1024 ); +#ifdef CONFIG_PM + atc->pcms[device] = pcm; +#endif +return 0 ; }
sound/pci/ctxfi/xfi.c +22 -0
@@ -121,11 +121,33 @@ static void __devexit ct_card_remove(struct pci_dev *pci)pci_set_drvdata (pci,NULL ); } +#ifdef CONFIG_PM +static int ct_card_suspend (struct pci_dev *pci,pm_message_t state) +{ +struct snd_card *card =pci_get_drvdata (pci); +struct ct_atc *atc = card->private_data; + +return atc->suspend (atc, state); +} + +static int ct_card_resume (struct pci_dev *pci) +{ +struct snd_card *card =pci_get_drvdata (pci); +struct ct_atc *atc = card->private_data; + +return atc->resume (atc); +} +#endif +static struct pci_driver ct_driver = { .name ="SB-XFi" , .id_table = ct_pci_dev_ids, .probe = ct_card_probe, .remove =__devexit_p (ct_card_remove), +#ifdef CONFIG_PM + .suspend = ct_card_suspend, + .resume = ct_card_resume, +#endif };static int __init ct_card_init (void )
sound/pci/hda/Kconfig +8 -1
@@ -2,7 +2,6 @@ menuconfig SND_HDA_INTEL tristate "Intel HD Audio" select SND_PCM select SND_VMASTER - select SND_JACK if INPUT=y || INPUT=SND help Say Y here to include support for Intel "High Definition Audio" (Azalia) and its compatible devices.
@@ -39,6 +38,14 @@ config SND_HDA_INPUT_BEEP Say Y here to build a digital beep interface for HD-audio driver. This interface is used to generate digital beeps. +config SND_HDA_INPUT_JACK + bool "Support jack plugging notification via input layer" + depends on INPUT=y || INPUT=SND_HDA_INTEL + select SND_JACK + help + Say Y here to enable the jack plugging notification via + input layer. + config SND_HDA_CODEC_REALTEK bool "Build Realtek HD-audio codec support" default y
sound/pci/hda/patch_conexant.c +2 -2
@@ -349,7 +349,7 @@ static int conexant_mux_enum_put(struct snd_kcontrol *kcontrol, &spec->cur_mux[adc_idx]); } -#ifdef CONFIG_SND_JACK +#ifdef CONFIG_SND_HDA_INPUT_JACK static void conexant_free_jack_priv (struct snd_jack *jack) {struct conexant_jack *jacks = jack->private_data;
@@ -463,7 +463,7 @@ static int conexant_init(struct hda_codec *codec)static void conexant_free (struct hda_codec *codec) { -#ifdef CONFIG_SND_JACK +#ifdef CONFIG_SND_HDA_INPUT_JACK struct conexant_spec *spec = codec->spec;if (spec->jacks.list) {struct conexant_jack *jacks = spec->jacks.list;
sound/pci/hda/patch_realtek.c +56 -53
199 lines not on this page · raw message
sound/pci/hda/patch_sigmatel.c +5 -5
@@ -639,7 +639,7 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol,static unsigned int stac92xx_vref_set (struct hda_codec *codec,hda_nid_t nid,unsigned int new_vref) { -unsigned int error; +int error;unsigned int pincfg; pincfg =snd_hda_codec_read (codec, nid,0 ,AC_VERB_GET_PIN_WIDGET_CONTROL ,0 );
@@ -2703,7 +2703,7 @@ static int stac92xx_dc_bias_put(struct snd_kcontrol *kcontrol, {struct hda_codec *codec =snd_kcontrol_chip (kcontrol);unsigned int new_vref =0 ; -unsigned int error; +int error;hda_nid_t nid = kcontrol->private_value;if (ucontrol->value.enumerated.item[0 ] ==0 )
@@ -4035,7 +4035,7 @@ static void stac_gpio_set(struct hda_codec *codec, unsigned int mask, AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */ } -#ifdef CONFIG_SND_JACK +#ifdef CONFIG_SND_HDA_INPUT_JACK static void stac92xx_free_jack_priv (struct snd_jack *jack) {struct sigmatel_jack *jacks = jack->private_data;
@@ -4047,7 +4047,7 @@ static void stac92xx_free_jack_priv(struct snd_jack *jack)static int stac92xx_add_jack (struct hda_codec *codec,hda_nid_t nid,int type) { -#ifdef CONFIG_SND_JACK +#ifdef CONFIG_SND_HDA_INPUT_JACK struct sigmatel_spec *spec = codec->spec;struct sigmatel_jack *jack;int def_conf =snd_hda_codec_get_pincfg (codec, nid);
@@ -4336,7 +4336,7 @@ static int stac92xx_init(struct hda_codec *codec)static void stac92xx_free_jacks (struct hda_codec *codec) { -#ifdef CONFIG_SND_JACK +#ifdef CONFIG_SND_HDA_INPUT_JACK /* free jack instances manually when clearing/reconfiguring */ struct sigmatel_spec *spec = codec->spec;if (!codec->bus->shutdown && spec->jacks.list) {
sound/pci/via82xx.c +5 -1
@@ -85,6 +85,7 @@ static int joystick;static int ac97_clock =48000 ;static char *ac97_quirk;static int dxs_support; +static int nodelay;module_param (index, int,0444 );MODULE_PARM_DESC (index,"Index value for VIA 82xx bridge." );
@@ -102,6 +103,8 @@ module_param(ac97_quirk, charp, 0444);MODULE_PARM_DESC (ac97_quirk,"AC'97 workaround for strange hardware." );module_param (dxs_support, int,0444 );MODULE_PARM_DESC (dxs_support,"Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)" ); +module_param (nodelay, int,0444 ); +MODULE_PARM_DESC (nodelay,"Disable 500ms init delay" );/* just for backward compatibility */ static int enable;
@@ -549,7 +552,8 @@ static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)int err; err =snd_via82xx_codec_ready (chip, ac97->num);/* here we need to wait fairly for long time.. */ -msleep (500 ); +if (!nodelay) +msleep (500 ); } static void snd_via82xx_codec_write(struct snd_ac97 *ac97,
sound/soc/blackfin/bf5xx-i2s.c +7 -3
@@ -50,6 +50,7 @@ struct bf5xx_i2s_port {u16 tcr2;u16 rcr2;int counter; +int configured; };static struct bf5xx_i2s_port bf5xx_i2s;
@@ -168,7 +169,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,break ; } -if (bf5xx_i2s.counter ==1 ) { +if (!bf5xx_i2s.configured) {/* * TX and RX are not independent,they are enabled at the * same time, even if only one side is running. So, we
@@ -177,6 +178,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,* * CPU DAI:slave mode. */ + bf5xx_i2s.configured =1 ; ret =sport_config_rx (sport_handle, bf5xx_i2s.rcr1, bf5xx_i2s.rcr2,0 ,0 );if (ret) {
@@ -200,6 +202,9 @@ static void bf5xx_i2s_shutdown(struct snd_pcm_substream *substream, {pr_debug ("%s enter\n" , __func__); bf5xx_i2s.counter--; +/* No active stream, SPORT is allowed to be configured again. */ +if (!bf5xx_i2s.counter) + bf5xx_i2s.configured =0 ; } static int bf5xx_i2s_probe(struct platform_device *pdev,
@@ -244,8 +249,7 @@ static int bf5xx_i2s_suspend(struct snd_soc_dai *dai)return 0 ; } -static int bf5xx_i2s_resume (struct platform_device *pdev, -struct snd_soc_dai *dai) +static int bf5xx_i2s_resume (struct snd_soc_dai *dai) {int ret; struct sport_device *sport =