ALSA fixes for 2.6.29-rc4
Subsystems (4)
Linus,
please pull the following ALSA fixes for v2.6.29-rc4 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus
Included are a few trivial regression fixes, a few machine quirks and updates/fixes for Intel HDMI support.
Thanks!
Takashi
===
Arnd Bergmann (1):
sound: Remove OSSlib stuff from linux/soundcard.h
Eero Nurkkala (1):
ASoC: TLV320AIC3X: Fix kcontrol's private value use in put callback
Herton Ronaldo Krzesinski (1):
ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model
Jarkko Nikula (1):
ASoC: WM8990: Fix kcontrol's private value use in put callback
Lopez Cruz, Misael (1):
ASoC: Update SDP3430 machine driver for snd_soc_card
Mackenzie Morgan (1):
ALSA: hda - Add quirk for Asus z37e (1043:8284)
Mark Brown (1):
ASoC: Only register AC97 bus if it's not done already
Takashi Iwai (4):
ALSA: mtpav - Fix initial value for input hwport
ALSA: hda - Register (new) devices at reconfig
ALSA: hda - Add missing terminator in slave dig-out array
ALSA: hda - Add snd_hda_multi_out_dig_cleanup()
Wu Fengguang (4):
ALSA: hda - allow multi-channel HDMI audio playback when ELD is not present
ALSA: hda - enable HDMI audio pin out at module loading time
ALSA: hda - compute checksum in HDMI audio infoframe
ALSA: hda - add id for Intel IbexPeak integrated HDMI codec
--- include/linux/soundcard.h | 74 ++++++++++++--------------------------- sound/drivers/mtpav.c | 3 +- sound/pci/hda/hda_codec.c | 10 +++++ sound/pci/hda/hda_hwdep.c | 2 +- sound/pci/hda/hda_local.h | 2 + sound/pci/hda/patch_analog.c | 15 ++++++-- sound/pci/hda/patch_intelhdmi.c | 61 ++++++++++++++++++-------------- sound/pci/hda/patch_realtek.c | 1 + sound/pci/hda/patch_sigmatel.c | 13 ++++++- sound/soc/codecs/tlv320aic3x.c | 11 ++++-- sound/soc/codecs/wm8990.c | 4 ++- sound/soc/omap/sdp3430.c | 4 +- sound/soc/soc-core.c | 5 ++- 13 files changed, 112 insertions(+), 93 deletions(-)
include/linux/soundcard.h +23 -51
@@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table {*/ #define LOCL_STARTAUDIO 1 -#if (!defined(__KERNEL__) && !defined(KERNEL ) && !defined(INKERNEL ) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS ) +#if !defined(__KERNEL__) || defined(USE_SEQ_MACROS )/* * Some convenience macros to simplify programming of the * /dev/sequencer interface * -* These macros define the API which should be used when possible. +* This is a legacy interface for applications written against +* the OSSlib-3.8 style interface. It is no longer possible +* to actually link against OSSlib with this header, but we +* still provide these macros for programs using them. +* +* If you want to use OSSlib, it is recommended that you get +* the GPL version of OSS-4.x and build against that version +* of the header. +* +* We redefine the extern keyword so that make headers_check +* does not complain about SEQ_USE_EXTBUF. */ #define SEQ_DECLAREBUF () SEQ_USE_EXTBUF()void seqbuf_dump (void );/* This function must be provided by programs */ -extern int OSS_init (int seqfd,int buflen); -extern void OSS_seqbuf_dump (int fd,unsigned char *buf,int buflen); -extern void OSS_seq_advbuf (int len,int fd,unsigned char *buf,int buflen); -extern void OSS_seq_needbuf (int len,int fd,unsigned char *buf,int buflen); -extern void OSS_patch_caching (int dev,int chn,int patch, -int fd,unsigned char *buf,int buflen); -extern void OSS_drum_caching (int dev,int chn,int patch, -int fd,unsigned char *buf,int buflen); -extern void OSS_write_patch (int fd,unsigned char *buf,int len); -extern int OSS_write_patch2 (int fd,unsigned char *buf,int len); -#define SEQ_PM_DEFINES int __foo_bar___ -#ifdef OSSLIB -# define SEQ_USE_EXTBUF () \ - extern unsigned char *_seqbuf; \ - extern int _seqbuflen;extern int _seqbufptr -# define SEQ_DEFINEBUF (len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len -# define _SEQ_ADVBUF (len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen) -# define _SEQ_NEEDBUF (len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen) -# define SEQ_DUMPBUF () OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen) - -# define SEQ_LOAD_GMINSTR (dev, instr) \ - OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen) -# define SEQ_LOAD_GMDRUM (dev, drum) \ - OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen) -#else /* !OSSLIB */ - -# define SEQ_LOAD_GMINSTR (dev, instr) -# define SEQ_LOAD_GMDRUM (dev, drum) - -# define SEQ_USE_EXTBUF () \ - extern unsigned char _seqbuf[]; \ - extern int _seqbuflen;extern int _seqbufptr + +#define SEQ_LOAD_GMINSTR (dev, instr) +#define SEQ_LOAD_GMDRUM (dev, drum) + +#define _SEQ_EXTERN extern +#define SEQ_USE_EXTBUF () \ + _SEQ_EXTERN unsigned char _seqbuf[]; \ + _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr#ifndef USE_SIMPLE_MACROS /* Sample seqbuf_dump() implementation:
@@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);*/ #define _SEQ_NEEDBUF (len)/* empty */ #endif -#endif /* !OSSLIB */ #define SEQ_VOLUME_MODE (dev, mode) {_SEQ_NEEDBUF(8);\ _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
@@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)#define SEQ_SET_PATCH SEQ_PGM_CHANGE -#ifdef OSSLIB -# define SEQ_PGM_CHANGE (dev, chn, patch) \ - {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \ - _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);} -#else -# define SEQ_PGM_CHANGE (dev, chn, patch) \ +#define SEQ_PGM_CHANGE (dev, chn, patch) \ _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) -#endif #define SEQ_CONTROL (dev, chn, controller, value) \ _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
@@ -1300,19 +1279,12 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);/* * Patch loading. */ -#ifdef OSSLIB -# define SEQ_WRPATCH (patchx, len) \ - OSS_write_patch(seqfd, (char*)(patchx), len) -# define SEQ_WRPATCH2 (patchx, len) \ - OSS_write_patch2(seqfd, (char*)(patchx), len) -#else -# define SEQ_WRPATCH (patchx, len) \ +#define SEQ_WRPATCH (patchx, len) \ {if (_seqbufptr) SEQ_DUMPBUF();\ if (write(seqfd, (char*)(patchx), len)==-1) \ perror("Write patch: /dev/sequencer");} -# define SEQ_WRPATCH2 (patchx, len) \ +#define SEQ_WRPATCH2 (patchx, len) \ (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) -#endif #endif #endif
sound/drivers/mtpav.c +2 -1
@@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) mtp_card->card = card; mtp_card->irq =-1 ; mtp_card->share_irq =0 ; - mtp_card->inmidiport =0xffffffff ; mtp_card->inmidistate =0 ; mtp_card->outmidihwport =0xffffffff ;init_timer (&mtp_card->timer);
@@ -719,6 +718,8 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)if (err <0 ) goto __error; + mtp_card->inmidiport = mtp_card->num_ports +MTPAV_PIDX_BROADCAST ; + err =snd_mtpav_get_ISA (mtp_card);if (err <0 ) goto __error;
sound/pci/hda/hda_codec.c +10 -0
@@ -3088,6 +3088,16 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec, }EXPORT_SYMBOL_HDA (snd_hda_multi_out_dig_prepare); +int snd_hda_multi_out_dig_cleanup (struct hda_codec *codec, +struct hda_multi_out *mout) +{ +mutex_lock (&codec->spdif_mutex); +cleanup_dig_out_stream (codec, mout->dig_out_nid); +mutex_unlock (&codec->spdif_mutex); +return 0 ; +} +EXPORT_SYMBOL_HDA (snd_hda_multi_out_dig_cleanup); +/* * release the digital out */
sound/pci/hda/hda_hwdep.c +1 -1
@@ -175,7 +175,7 @@ static int reconfig_codec(struct hda_codec *codec) err =snd_hda_codec_build_controls (codec);if (err <0 )return err; -return 0 ; +return snd_card_register (codec->bus->card); }/*
sound/pci/hda/hda_local.h +2 -0
@@ -251,6 +251,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,unsigned int stream_tag, unsigned int format, struct snd_pcm_substream *substream); +int snd_hda_multi_out_dig_cleanup (struct hda_codec *codec, +struct hda_multi_out *mout); int snd_hda_multi_out_analog_open(struct hda_codec *codec, struct hda_multi_out *mout, struct snd_pcm_substream *substream,
sound/pci/hda/patch_analog.c +12 -3
@@ -275,6 +275,14 @@ static int ad198x_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, format, substream); } +static int ad198x_dig_playback_pcm_cleanup (struct hda_pcm_stream *hinfo, +struct hda_codec *codec, +struct snd_pcm_substream *substream) +{ +struct ad198x_spec *spec = codec->spec; +return snd_hda_multi_out_dig_cleanup (codec, &spec->multiout); +} +/* * Analog capture */
@@ -333,7 +341,8 @@ static struct hda_pcm_stream ad198x_pcm_digital_playback = { .ops = { .open = ad198x_dig_playback_pcm_open, .close = ad198x_dig_playback_pcm_close, - .prepare = ad198x_dig_playback_pcm_prepare + .prepare = ad198x_dig_playback_pcm_prepare, + .cleanup = ad198x_dig_playback_pcm_cleanup }, };
@@ -1885,8 +1894,8 @@ static hda_nid_t ad1988_capsrc_nids[3] = {#define AD1988_SPDIF_OUT_HDMI 0x0b#define AD1988_SPDIF_IN 0x07 -static hda_nid_t ad1989b_slave_dig_outs[2 ] = { -AD1988_SPDIF_OUT ,AD1988_SPDIF_OUT_HDMI +static hda_nid_t ad1989b_slave_dig_outs[] = { +AD1988_SPDIF_OUT ,AD1988_SPDIF_OUT_HDMI ,0 };static struct hda_input_mux ad1988_6stack_capture_source = {
sound/pci/hda/patch_intelhdmi.c +34 -27
138 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +1 -0
@@ -8478,6 +8478,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {SND_PCI_QUIRK (0x103c ,0x2a66 ,"HP Acacia" ,ALC888_3ST_HP ),SND_PCI_QUIRK (0x1043 ,0x1873 ,"Asus M90V" ,ALC888_ASUS_M90V ),SND_PCI_QUIRK (0x1043 ,0x8249 ,"Asus M2A-VM HDMI" , ALC883_3ST_6ch_DIG), +SND_PCI_QUIRK (0x1043 ,0x8284 ,"Asus Z37E" ,ALC883_6ST_DIG ),SND_PCI_QUIRK (0x1043 ,0x82fe ,"Asus P5Q-EM HDMI" ,ALC1200_ASUS_P5Q ),SND_PCI_QUIRK (0x1043 ,0x835f ,"Asus Eee 1601" ,ALC888_ASUS_EEE1601 ), SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
sound/pci/hda/patch_sigmatel.c +11 -2
@@ -1799,7 +1799,7 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {SND_PCI_QUIRK (PCI_VENDOR_ID_HP ,0x30f2 ,"HP dv5" ,STAC_HP_M4 ),SND_PCI_QUIRK (PCI_VENDOR_ID_HP ,0x30f4 , -"HP dv7" ,STAC_HP_M4 ), +"HP dv7" ,STAC_HP_DV5 ),SND_PCI_QUIRK (PCI_VENDOR_ID_HP ,0x30f7 ,"HP dv4" ,STAC_HP_DV5 ), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc,
@@ -2442,6 +2442,14 @@ static int stac92xx_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, stream_tag, format, substream); } +static int stac92xx_dig_playback_pcm_cleanup (struct hda_pcm_stream *hinfo, +struct hda_codec *codec, +struct snd_pcm_substream *substream) +{ +struct sigmatel_spec *spec = codec->spec; +return snd_hda_multi_out_dig_cleanup (codec, &spec->multiout); +} +/* * Analog capture callbacks
@@ -2486,7 +2494,8 @@ static struct hda_pcm_stream stac92xx_pcm_digital_playback = { .ops = { .open = stac92xx_dig_playback_pcm_open, .close = stac92xx_dig_playback_pcm_close, - .prepare = stac92xx_dig_playback_pcm_prepare + .prepare = stac92xx_dig_playback_pcm_prepare, + .cleanup = stac92xx_dig_playback_pcm_cleanup }, };
sound/soc/codecs/tlv320aic3x.c +7 -4
@@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {struct snd_soc_dapm_widget *widget =snd_kcontrol_chip (kcontrol); -int reg = kcontrol->private_value &0xff ; -int shift = (kcontrol->private_value >>8 ) &0x0f ; -int mask = (kcontrol->private_value >>16 ) &0xff ; -int invert = (kcontrol->private_value >>24 ) &0x01 ; +struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; +unsigned int reg = mc->reg; +unsigned int shift = mc->shift; +int max = mc->max; +unsigned int mask = (1 <<fls (max)) -1 ; +unsigned int invert = mc->invert;unsigned short val, val_mask;int ret;struct snd_soc_dapm_path *path;
sound/soc/codecs/wm8990.c +3 -1
@@ -176,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {struct snd_soc_codec *codec =snd_kcontrol_chip (kcontrol); -int reg = kcontrol->private_value &0xff ; +struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; +int reg = mc->reg;int ret;u16 val;
sound/soc/omap/sdp3430.c +2 -2
@@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = { };/* Audio machine driver */ -static struct snd_soc_machine snd_soc_machine_sdp3430 = { +static struct snd_soc_card snd_soc_sdp3430 = { .name ="SDP3430" , .platform = &omap_soc_platform, .dai_link = &sdp3430_dai,
@@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = {/* Audio subsystem */ static struct snd_soc_device sdp3430_snd_devdata = { - .machine = &snd_soc_machine_sdp3430, + .card = &snd_soc_sdp3430, .codec_dev = &soc_codec_dev_twl4030, };
sound/soc/soc-core.c +4 -1
@@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev)mutex_lock (&codec->mutex);#ifdef CONFIG_SND_SOC_AC97_BUS -if (ac97) { +/* Only instantiate AC97 if not already done by the adaptor +* for the generic AC97 subsystem. +*/ +if (ac97 &&strcmp (codec->name,"AC97" ) !=0 ) { ret =soc_ac97_dev_register (codec);if (ret <0 ) {printk (KERN_ERR "asoc: AC97 device register failed\n" );