https://github.com/torvalds/linux
Revision f1a745710f001e8c2eec6d525396083e1f4c389a authored by Linus Torvalds on 04 July 2009, 16:46:13 UTC, committed by Linus Torvalds on 04 July 2009, 16:46:13 UTC
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: do not set DEVNAME for OSS devices
  ALSA: hda - Add sanity check in PCM open callback
  ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
  ALSA: hda - Avoid invalid formats and rates with shared SPDIF
  ALSA: hda - Improve ASUS eeePC 1000 mixer
  ALSA: hda - Add GPIO1 control at muting with HP laptops
  ALSA: usx2y - reparent sound device
  ALSA: snd_usb_caiaq: reparent sound device
  sound: virtuoso: fix Xonar D1/DX silence after resume
  ASoC: Only disable pxa2xx-i2s clocks if we enabled them
  ALSA: hda - Add quirk for HP 6930p
  ALSA: hda - Add missing static to patch_ca0110()
  ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
  ASoC: remove BROKEN from Efika and pcm030 fabric drivers
  ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig
2 parent s 29f3177 + 7ce1695
Raw File
Tip revision: f1a745710f001e8c2eec6d525396083e1f4c389a authored by Linus Torvalds on 04 July 2009, 16:46:13 UTC
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Tip revision: f1a7457
bin2c.c
/*
 * Unloved program to convert a binary on stdin to a C include on stdout
 *
 * Jan 1999 Matt Mackall <mpm@selenic.com>
 *
 * This software may be used and distributed according to the terms
 * of the GNU General Public License, incorporated herein by reference.
 */

#include <stdio.h>

int main(int argc, char *argv[])
{
	int ch, total=0;

	if (argc > 1)
		printf("const char %s[] %s=\n",
			argv[1], argc > 2 ? argv[2] : "");

	do {
		printf("\t\"");
		while ((ch = getchar()) != EOF)
		{
			total++;
			printf("\\x%02x",ch);
			if (total % 16 == 0)
				break;
		}
		printf("\"\n");
	} while (ch != EOF);

	if (argc > 1)
		printf("\t;\n\nconst int %s_size = %d;\n", argv[1], total);

	return 0;
}
back to top