History

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: ASoC: Only register AC97 bus if it's not done already ALSA: hda - Add snd_hda_multi_out_dig_cleanup() ALSA: hda - Add missing terminator in slave dig-out array ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model ALSA: hda - Register (new) devices at reconfig ALSA: mtpav - Fix initial value for input hwport ALSA: hda - add id for Intel IbexPeak integrated HDMI codec ALSA: hda - compute checksum in HDMI audio infoframe ALSA: hda - enable HDMI audio pin out at module loading time ALSA: hda - allow multi-channel HDMI audio playback when ELD is not present ASoC: Update SDP3430 machine driver for snd_soc_card ALSA: hda - Add quirk for Asus z37e (1043:8284) sound: Remove OSSlib stuff from linux/soundcard.h ASoC: WM8990: Fix kcontrol's private value use in put callback ASoC: TLV320AIC3X: Fix kcontrol's private value use in put callback

Linus Torvalds committed 17 years ago

Commit b51ebdc2 parents fb5ae64 99cbb8613 files · +112 −93Browse files

Unified · Split

13 files
  1. include/linux/soundcard.h +23 −51
  2. sound/drivers/mtpav.c +2 −1
  3. sound/pci/hda/hda_codec.c +10 −0
  4. sound/pci/hda/hda_hwdep.c +1 −1
  5. sound/pci/hda/hda_local.h +2 −0
  6. sound/pci/hda/patch_analog.c +12 −3
  7. sound/pci/hda/patch_intelhdmi.c +34 −27
  8. sound/pci/hda/patch_realtek.c +1 −0
  9. sound/pci/hda/patch_sigmatel.c +11 −2
  10. sound/soc/codecs/tlv320aic3x.c +7 −4
  11. sound/soc/codecs/wm8990.c +3 −1
  12. sound/soc/omap/sdp3430.c +2 −2
  13. sound/soc/soc-core.c +4 −1
include/linux/soundcard.h+23−51
@@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table { · 1044 unmodified lines
10451045 */
10461046 #define LOCL_STARTAUDIO 1
10471047
1048−#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
1048+#if !defined(__KERNEL__) || defined(USE_SEQ_MACROS)
10491049 /*
10501050 * Some convenience macros to simplify programming of the
10511051 * /dev/sequencer interface
10521052 *
1053− * These macros define the API which should be used when possible.
1053+ * This is a legacy interface for applications written against
1054+ * the OSSlib-3.8 style interface. It is no longer possible
1055+ * to actually link against OSSlib with this header, but we
1056+ * still provide these macros for programs using them.
1057+ *
1058+ * If you want to use OSSlib, it is recommended that you get
1059+ * the GPL version of OSS-4.x and build against that version
1060+ * of the header.
1061+ *
1062+ * We redefine the extern keyword so that make headers_check
1063+ * does not complain about SEQ_USE_EXTBUF.
10541064 */
10551065 #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
10561066
10571067 void seqbuf_dump(void); /* This function must be provided by programs */
10581068
1059−extern int OSS_init(int seqfd, int buflen);
1060−extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen);
1061−extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen);
1062−extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen);
1063−extern void OSS_patch_caching(int dev, int chn, int patch,
1064− int fd, unsigned char *buf, int buflen);
1065−extern void OSS_drum_caching(int dev, int chn, int patch,
1066− int fd, unsigned char *buf, int buflen);
1067−extern void OSS_write_patch(int fd, unsigned char *buf, int len);
1068−extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
1069−
10701069 #define SEQ_PM_DEFINES int __foo_bar___
1071−#ifdef OSSLIB
1072−# define SEQ_USE_EXTBUF() \
1073− extern unsigned char *_seqbuf; \
1074− extern int _seqbuflen;extern int _seqbufptr
1075−# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
1076−# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
1077−# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
1078−# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
1079−
1080−# define SEQ_LOAD_GMINSTR(dev, instr) \
1081− OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
1082−# define SEQ_LOAD_GMDRUM(dev, drum) \
1083− OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
1084−#else /* !OSSLIB */
1085−
1086−# define SEQ_LOAD_GMINSTR(dev, instr)
1087−# define SEQ_LOAD_GMDRUM(dev, drum)
1088−
1089−# define SEQ_USE_EXTBUF() \
1090− extern unsigned char _seqbuf[]; \
1091− extern int _seqbuflen;extern int _seqbufptr
1070+
1071+#define SEQ_LOAD_GMINSTR(dev, instr)
1072+#define SEQ_LOAD_GMDRUM(dev, drum)
1073+
1074+#define _SEQ_EXTERN extern
1075+#define SEQ_USE_EXTBUF() \
1076+ _SEQ_EXTERN unsigned char _seqbuf[]; \
1077+ _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr
10921078
10931079 #ifndef USE_SIMPLE_MACROS
10941080 /* Sample seqbuf_dump() implementation:
@@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); · 36 unmodified lines
11311117 */
11321118 #define _SEQ_NEEDBUF(len) /* empty */
11331119 #endif
1134−#endif /* !OSSLIB */
11351120
11361121 #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
11371122 _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
@@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); · 77 unmodified lines
12151200 _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
12161201
12171202 #define SEQ_SET_PATCH SEQ_PGM_CHANGE
1218−#ifdef OSSLIB
1219−# define SEQ_PGM_CHANGE(dev, chn, patch) \
1220− {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \
1221− _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
1222−#else
1223−# define SEQ_PGM_CHANGE(dev, chn, patch) \
1203+#define SEQ_PGM_CHANGE(dev, chn, patch) \
12241204 _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
1225−#endif
12261205
12271206 #define SEQ_CONTROL(dev, chn, controller, value) \
12281207 _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); · 71 unmodified lines
13001279 /*
13011280 * Patch loading.
13021281 */
1303−#ifdef OSSLIB
1304−# define SEQ_WRPATCH(patchx, len) \
1305− OSS_write_patch(seqfd, (char*)(patchx), len)
1306−# define SEQ_WRPATCH2(patchx, len) \
1307− OSS_write_patch2(seqfd, (char*)(patchx), len)
1308−#else
1309−# define SEQ_WRPATCH(patchx, len) \
1282+#define SEQ_WRPATCH(patchx, len) \
13101283 {if (_seqbufptr) SEQ_DUMPBUF();\
13111284 if (write(seqfd, (char*)(patchx), len)==-1) \
13121285 perror("Write patch: /dev/sequencer");}
1313−# define SEQ_WRPATCH2(patchx, len) \
1286+#define SEQ_WRPATCH2(patchx, len) \
13141287 (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
1315−#endif
13161288
13171289 #endif
13181290 #endif
sound/drivers/mtpav.c+2−1
@@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) · 705 unmodified lines
706706 mtp_card->card = card;
707707 mtp_card->irq = -1;
708708 mtp_card->share_irq = 0;
709− mtp_card->inmidiport = 0xffffffff;
710709 mtp_card->inmidistate = 0;
711710 mtp_card->outmidihwport = 0xffffffff;
712711 init_timer(&mtp_card->timer);
@@ -719,6 +718,8 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) · 6 unmodified lines
719718 if (err < 0)
720719 goto __error;
721720
721+ mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;
722+
722723 err = snd_mtpav_get_ISA(mtp_card);
723724 if (err < 0)
724725 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, · 3087 unmodified lines
30883088 }
30893089 EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare);
30903090
3091+int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
3092+ struct hda_multi_out *mout)
3093+{
3094+ mutex_lock(&codec->spdif_mutex);
3095+ cleanup_dig_out_stream(codec, mout->dig_out_nid);
3096+ mutex_unlock(&codec->spdif_mutex);
3097+ return 0;
3098+}
3099+EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_cleanup);
3100+
30913101 /*
30923102 * release the digital out
30933103 */
sound/pci/hda/hda_hwdep.c+1−1
@@ -175,7 +175,7 @@ static int reconfig_codec(struct hda_codec *codec) · 174 unmodified lines
175175 err = snd_hda_codec_build_controls(codec);
176176 if (err < 0)
177177 return err;
178− return 0;
178+ return snd_card_register(codec->bus->card);
179179 }
180180
181181 /*
sound/pci/hda/hda_local.h+2−0
@@ -251,6 +251,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec, · 250 unmodified lines
251251 unsigned int stream_tag,
252252 unsigned int format,
253253 struct snd_pcm_substream *substream);
254+int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
255+ struct hda_multi_out *mout);
254256 int snd_hda_multi_out_analog_open(struct hda_codec *codec,
255257 struct hda_multi_out *mout,
256258 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, · 274 unmodified lines
275275 format, substream);
276276 }
277277
278+static int ad198x_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
279+ struct hda_codec *codec,
280+ struct snd_pcm_substream *substream)
281+{
282+ struct ad198x_spec *spec = codec->spec;
283+ return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout);
284+}
285+
278286 /*
279287 * Analog capture
280288 */
@@ -333,7 +341,8 @@ static struct hda_pcm_stream ad198x_pcm_digital_playback = { · 52 unmodified lines
333341 .ops = {
334342 .open = ad198x_dig_playback_pcm_open,
335343 .close = ad198x_dig_playback_pcm_close,
336− .prepare = ad198x_dig_playback_pcm_prepare
344+ .prepare = ad198x_dig_playback_pcm_prepare,
345+ .cleanup = ad198x_dig_playback_pcm_cleanup
337346 },
338347 };
339348
@@ -1885,8 +1894,8 @@ static hda_nid_t ad1988_capsrc_nids[3] = { · 1545 unmodified lines
18851894 #define AD1988_SPDIF_OUT_HDMI 0x0b
18861895 #define AD1988_SPDIF_IN 0x07
18871896
1888−static hda_nid_t ad1989b_slave_dig_outs[2] = {
1889− AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI
1897+static hda_nid_t ad1989b_slave_dig_outs[] = {
1898+ AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI, 0
18901899 };
18911900
18921901 static struct hda_input_mux ad1988_6stack_capture_source = {
sound/pci/hda/patch_intelhdmi.c+34−27
@@ -49,11 +49,6 @@ static struct hda_verb pinout_enable_verb[] = { · 48 unmodified lines
4949 {} /* terminator */
5050 };
5151
52−static struct hda_verb pinout_disable_verb[] = {
53− {PIN_NID, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00},
54− {}
55−};
56−
5752 static struct hda_verb unsolicited_response_verb[] = {
5853 {PIN_NID, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN |
5954 INTEL_HDMI_EVENT_TAG},
@@ -248,10 +243,6 @@ static void hdmi_write_dip_byte(struct hda_codec *codec, hda_nid_t nid, · 188 unmodified lines
248243
249244 static void hdmi_enable_output(struct hda_codec *codec)
250245 {
251− /* Enable Audio InfoFrame Transmission */
252− hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
253− snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT,
254− AC_DIPXMIT_BEST);
255246 /* Unmute */
256247 if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP)
257248 snd_hda_codec_write(codec, PIN_NID, 0,
@@ -260,17 +251,24 @@ static void hdmi_enable_output(struct hda_codec *codec) · 2 unmodified lines
260251 snd_hda_sequence_write(codec, pinout_enable_verb);
261252 }
262253
263−static void hdmi_disable_output(struct hda_codec *codec)
254+/*
255+ * Enable Audio InfoFrame Transmission
256+ */
257+static void hdmi_start_infoframe_trans(struct hda_codec *codec)
264258 {
265− snd_hda_sequence_write(codec, pinout_disable_verb);
266− if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP)
267− snd_hda_codec_write(codec, PIN_NID, 0,
268− AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
259+ hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
260+ snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT,
261+ AC_DIPXMIT_BEST);
262+}
269263
270− /*
271− * FIXME: noises may arise when playing music after reloading the
272− * kernel module, until the next X restart or monitor repower.
273− */
264+/*
265+ * Disable Audio InfoFrame Transmission
266+ */
267+static void hdmi_stop_infoframe_trans(struct hda_codec *codec)
268+{
269+ hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
270+ snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT,
271+ AC_DIPXMIT_DISABLE);
274272 }
275273
276274 static int hdmi_get_channel_count(struct hda_codec *codec)
@@ -368,11 +366,16 @@ static void hdmi_fill_audio_infoframe(struct hda_codec *codec, · 91 unmodified lines
368366 struct hdmi_audio_infoframe *ai)
369367 {
370368 u8 *params = (u8 *)ai;
369+ u8 sum = 0;
371370 int i;
372371
373372 hdmi_debug_dip_size(codec);
374373 hdmi_clear_dip_buffers(codec); /* be paranoid */
375374
375+ for (i = 0; i < sizeof(ai); i++)
376+ sum += params[i];
377+ ai->checksum = - sum;
378+
376379 hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
377380 for (i = 0; i < sizeof(ai); i++)
378381 hdmi_write_dip_byte(codec, PIN_NID, params[i]);
@@ -419,13 +422,17 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec, · 40 unmodified lines
419422 /*
420423 * CA defaults to 0 for basic stereo audio
421424 */
422− if (!eld->eld_ver)
423− return 0;
424− if (!eld->spk_alloc)
425− return 0;
426425 if (channels <= 2)
427426 return 0;
428427
428+ /*
429+ * HDMI sink's ELD info cannot always be retrieved for now, e.g.
430+ * in console or for audio devices. Assume the highest speakers
431+ * configuration, to _not_ prohibit multi-channel audio playback.
432+ */
433+ if (!eld->spk_alloc)
434+ eld->spk_alloc = 0xffff;
435+
429436 /*
430437 * expand ELD's speaker allocation mask
431438 *
@@ -485,6 +492,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, · 53 unmodified lines
485492 hdmi_setup_channel_mapping(codec, &ai);
486493
487494 hdmi_fill_audio_infoframe(codec, &ai);
495+ hdmi_start_infoframe_trans(codec);
488496 }
489497
490498
@@ -562,7 +570,7 @@ static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo, · 71 unmodified lines
562570 {
563571 struct intel_hdmi_spec *spec = codec->spec;
564572
565− hdmi_disable_output(codec);
573+ hdmi_stop_infoframe_trans(codec);
566574
567575 return snd_hda_multi_out_dig_close(codec, &spec->multiout);
568576 }
@@ -582,8 +590,6 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, · 13 unmodified lines
582590
583591 hdmi_setup_audio_infoframe(codec, substream);
584592
585− hdmi_enable_output(codec);
586−
587593 return 0;
588594 }
589595
@@ -628,8 +634,7 @@ static int intel_hdmi_build_controls(struct hda_codec *codec) · 38 unmodified lines
628634
629635 static int intel_hdmi_init(struct hda_codec *codec)
630636 {
631− /* disable audio output as early as possible */
632− hdmi_disable_output(codec);
637+ hdmi_enable_output(codec);
633638
634639 snd_hda_sequence_write(codec, unsolicited_response_verb);
635640
@@ -679,6 +684,7 @@ static struct hda_codec_preset snd_hda_preset_intelhdmi[] = { · 43 unmodified lines
679684 { .id = 0x80862801, .name = "G45 DEVBLC", .patch = patch_intel_hdmi },
680685 { .id = 0x80862802, .name = "G45 DEVCTG", .patch = patch_intel_hdmi },
681686 { .id = 0x80862803, .name = "G45 DEVELK", .patch = patch_intel_hdmi },
687+ { .id = 0x80862804, .name = "G45 DEVIBX", .patch = patch_intel_hdmi },
682688 { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_intel_hdmi },
683689 {} /* terminator */
684690 };
@@ -687,6 +693,7 @@ MODULE_ALIAS("snd-hda-codec-id:808629fb"); · 2 unmodified lines
687693 MODULE_ALIAS("snd-hda-codec-id:80862801");
688694 MODULE_ALIAS("snd-hda-codec-id:80862802");
689695 MODULE_ALIAS("snd-hda-codec-id:80862803");
696+MODULE_ALIAS("snd-hda-codec-id:80862804");
690697 MODULE_ALIAS("snd-hda-codec-id:10951392");
691698
692699 MODULE_LICENSE("GPL");
sound/pci/hda/patch_realtek.c+1−0
@@ -8478,6 +8478,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { · 8477 unmodified lines
84788478 SND_PCI_QUIRK(0x103c, 0x2a66, "HP Acacia", ALC888_3ST_HP),
84798479 SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V),
84808480 SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG),
8481+ SND_PCI_QUIRK(0x1043, 0x8284, "Asus Z37E", ALC883_6ST_DIG),
84818482 SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q),
84828483 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601),
84838484 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[] = { · 1798 unmodified lines
17991799 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2,
18001800 "HP dv5", STAC_HP_M4),
18011801 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4,
1802− "HP dv7", STAC_HP_M4),
1802+ "HP dv7", STAC_HP_DV5),
18031803 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f7,
18041804 "HP dv4", STAC_HP_DV5),
18051805 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc,
@@ -2442,6 +2442,14 @@ static int stac92xx_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, · 636 unmodified lines
24422442 stream_tag, format, substream);
24432443 }
24442444
2445+static int stac92xx_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
2446+ struct hda_codec *codec,
2447+ struct snd_pcm_substream *substream)
2448+{
2449+ struct sigmatel_spec *spec = codec->spec;
2450+ return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout);
2451+}
2452+
24452453
24462454 /*
24472455 * Analog capture callbacks
@@ -2486,7 +2494,8 @@ static struct hda_pcm_stream stac92xx_pcm_digital_playback = { · 38 unmodified lines
24862494 .ops = {
24872495 .open = stac92xx_dig_playback_pcm_open,
24882496 .close = stac92xx_dig_playback_pcm_close,
2489− .prepare = stac92xx_dig_playback_pcm_prepare
2497+ .prepare = stac92xx_dig_playback_pcm_prepare,
2498+ .cleanup = stac92xx_dig_playback_pcm_cleanup
24902499 },
24912500 };
24922501
sound/soc/codecs/tlv320aic3x.c+7−4
@@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, · 164 unmodified lines
165165 struct snd_ctl_elem_value *ucontrol)
166166 {
167167 struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
168− int reg = kcontrol->private_value & 0xff;
169− int shift = (kcontrol->private_value >> 8) & 0x0f;
170− int mask = (kcontrol->private_value >> 16) & 0xff;
171− int invert = (kcontrol->private_value >> 24) & 0x01;
168+ struct soc_mixer_control *mc =
169+ (struct soc_mixer_control *)kcontrol->private_value;
170+ unsigned int reg = mc->reg;
171+ unsigned int shift = mc->shift;
172+ int max = mc->max;
173+ unsigned int mask = (1 << fls(max)) - 1;
174+ unsigned int invert = mc->invert;
172175 unsigned short val, val_mask;
173176 int ret;
174177 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, · 175 unmodified lines
176176 struct snd_ctl_elem_value *ucontrol)
177177 {
178178 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
179− int reg = kcontrol->private_value & 0xff;
179+ struct soc_mixer_control *mc =
180+ (struct soc_mixer_control *)kcontrol->private_value;
181+ int reg = mc->reg;
180182 int ret;
181183 u16 val;
182184
sound/soc/omap/sdp3430.c+2−2
@@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = { · 90 unmodified lines
9191 };
9292
9393 /* Audio machine driver */
94−static struct snd_soc_machine snd_soc_machine_sdp3430 = {
94+static struct snd_soc_card snd_soc_sdp3430 = {
9595 .name = "SDP3430",
9696 .platform = &omap_soc_platform,
9797 .dai_link = &sdp3430_dai,
@@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = { · 2 unmodified lines
100100
101101 /* Audio subsystem */
102102 static struct snd_soc_device sdp3430_snd_devdata = {
103− .machine = &snd_soc_machine_sdp3430,
103+ .card = &snd_soc_sdp3430,
104104 .codec_dev = &soc_codec_dev_twl4030,
105105 };
106106
sound/soc/soc-core.c+4−1
@@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev) · 1384 unmodified lines
13851385
13861386 mutex_lock(&codec->mutex);
13871387 #ifdef CONFIG_SND_SOC_AC97_BUS
1388− if (ac97) {
1388+ /* Only instantiate AC97 if not already done by the adaptor
1389+ * for the generic AC97 subsystem.
1390+ */
1391+ if (ac97 && strcmp(codec->name, "AC97") != 0) {
13891392 ret = soc_ac97_dev_register(codec);
13901393 if (ret < 0) {
13911394 printk(KERN_ERR "asoc: AC97 device register failed\n");