Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b51ebdc4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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
parents fb5ae64f 99cbb861
Loading
Loading
Loading
Loading
+23 −51
Original line number Original line Diff line number Diff line
@@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table {
 */
 */
#define LOCL_STARTAUDIO		1
#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
 *	Some convenience macros to simplify programming of the
 *	/dev/sequencer interface
 *	/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()
#define SEQ_DECLAREBUF()		SEQ_USE_EXTBUF()


void seqbuf_dump(void);	/* This function must be provided by programs */
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___
#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_GMINSTR(dev, instr)
#define SEQ_LOAD_GMDRUM(dev, drum)
#define SEQ_LOAD_GMDRUM(dev, drum)


#define _SEQ_EXTERN extern
#define SEQ_USE_EXTBUF() \
#define SEQ_USE_EXTBUF() \
		extern unsigned char _seqbuf[]; \
		_SEQ_EXTERN unsigned char _seqbuf[]; \
		extern int _seqbuflen;extern int _seqbufptr
		_SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr


#ifndef USE_SIMPLE_MACROS
#ifndef USE_SIMPLE_MACROS
/* Sample seqbuf_dump() implementation:
/* 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 */
#define _SEQ_NEEDBUF(len)	/* empty */
#endif
#endif
#endif /* !OSSLIB */


#define SEQ_VOLUME_MODE(dev, mode)	{_SEQ_NEEDBUF(8);\
#define SEQ_VOLUME_MODE(dev, mode)	{_SEQ_NEEDBUF(8);\
					_seqbuf[_seqbufptr] = SEQ_EXTENDED;\
					_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)
		_CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)


#define SEQ_SET_PATCH SEQ_PGM_CHANGE
#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)
		_CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
#endif


#define SEQ_CONTROL(dev, chn, controller, value) \
#define SEQ_CONTROL(dev, chn, controller, value) \
		_CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, 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.
 * 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 (_seqbufptr) SEQ_DUMPBUF();\
		 if (write(seqfd, (char*)(patchx), len)==-1) \
		 if (write(seqfd, (char*)(patchx), len)==-1) \
		    perror("Write patch: /dev/sequencer");}
		    perror("Write patch: /dev/sequencer");}
#define SEQ_WRPATCH2(patchx, len) \
#define SEQ_WRPATCH2(patchx, len) \
		(SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
		(SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
#endif


#endif
#endif
#endif
#endif
+2 −1
Original line number Original line Diff line number Diff line
@@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)
	mtp_card->card = card;
	mtp_card->card = card;
	mtp_card->irq = -1;
	mtp_card->irq = -1;
	mtp_card->share_irq = 0;
	mtp_card->share_irq = 0;
	mtp_card->inmidiport = 0xffffffff;
	mtp_card->inmidistate = 0;
	mtp_card->inmidistate = 0;
	mtp_card->outmidihwport = 0xffffffff;
	mtp_card->outmidihwport = 0xffffffff;
	init_timer(&mtp_card->timer);
	init_timer(&mtp_card->timer);
@@ -719,6 +718,8 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)
	if (err < 0)
	if (err < 0)
		goto __error;
		goto __error;


	mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;

	err = snd_mtpav_get_ISA(mtp_card);
	err = snd_mtpav_get_ISA(mtp_card);
	if (err < 0)
	if (err < 0)
		goto __error;
		goto __error;
+10 −0
Original line number Original line Diff line number Diff line
@@ -3088,6 +3088,16 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
}
}
EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare);
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
 * release the digital out
 */
 */
+1 −1
Original line number Original line Diff line number Diff line
@@ -175,7 +175,7 @@ static int reconfig_codec(struct hda_codec *codec)
	err = snd_hda_codec_build_controls(codec);
	err = snd_hda_codec_build_controls(codec);
	if (err < 0)
	if (err < 0)
		return err;
		return err;
	return 0;
	return snd_card_register(codec->bus->card);
}
}


/*
/*
+2 −0
Original line number Original line Diff line number Diff line
@@ -251,6 +251,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
				  unsigned int stream_tag,
				  unsigned int stream_tag,
				  unsigned int format,
				  unsigned int format,
				  struct snd_pcm_substream *substream);
				  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,
int snd_hda_multi_out_analog_open(struct hda_codec *codec,
				  struct hda_multi_out *mout,
				  struct hda_multi_out *mout,
				  struct snd_pcm_substream *substream,
				  struct snd_pcm_substream *substream,
Loading