fmr2               41 drivers/media/radio/radio-sf16fmr2.c static struct fmr2 *fmr2_cards[FMR2_MAX];
fmr2               62 drivers/media/radio/radio-sf16fmr2.c 	struct fmr2 *fmr2 = tea->private_data;
fmr2               70 drivers/media/radio/radio-sf16fmr2.c 	outb(bits, fmr2->io);
fmr2               75 drivers/media/radio/radio-sf16fmr2.c 	struct fmr2 *fmr2 = tea->private_data;
fmr2               76 drivers/media/radio/radio-sf16fmr2.c 	u8 bits = inb(fmr2->io);
fmr2              116 drivers/media/radio/radio-sf16fmr2.c static void tc9154a_set_pins(struct fmr2 *fmr2, u8 pins)
fmr2              118 drivers/media/radio/radio-sf16fmr2.c 	if (!fmr2->tea.mute)
fmr2              121 drivers/media/radio/radio-sf16fmr2.c 	outb(pins, fmr2->io);
fmr2              124 drivers/media/radio/radio-sf16fmr2.c static void tc9154a_set_attenuation(struct fmr2 *fmr2, int att, u32 channel)
fmr2              135 drivers/media/radio/radio-sf16fmr2.c 		tc9154a_set_pins(fmr2, bit);
fmr2              137 drivers/media/radio/radio-sf16fmr2.c 		tc9154a_set_pins(fmr2, bit | PT_CK);
fmr2              139 drivers/media/radio/radio-sf16fmr2.c 		tc9154a_set_pins(fmr2, bit);
fmr2              144 drivers/media/radio/radio-sf16fmr2.c 	tc9154a_set_pins(fmr2, PT_ST);
fmr2              146 drivers/media/radio/radio-sf16fmr2.c 	tc9154a_set_pins(fmr2, 0);
fmr2              152 drivers/media/radio/radio-sf16fmr2.c 	struct fmr2 *fmr2 = tea->private_data;
fmr2              158 drivers/media/radio/radio-sf16fmr2.c 		balance = fmr2->balance->cur.val;
fmr2              162 drivers/media/radio/radio-sf16fmr2.c 		volume = fmr2->volume->cur.val;
fmr2              174 drivers/media/radio/radio-sf16fmr2.c 	tc9154a_set_attenuation(fmr2, abs(left - 68), TC9154A_CHANNEL_LEFT);
fmr2              175 drivers/media/radio/radio-sf16fmr2.c 	tc9154a_set_attenuation(fmr2, abs(right - 68), TC9154A_CHANNEL_RIGHT);
fmr2              186 drivers/media/radio/radio-sf16fmr2.c 	struct fmr2 *fmr2 = tea->private_data;
fmr2              189 drivers/media/radio/radio-sf16fmr2.c 	if (!fmr2->is_fmd2 && inb(fmr2->io) & FMR2_HASVOL) {
fmr2              190 drivers/media/radio/radio-sf16fmr2.c 		fmr2->volume = v4l2_ctrl_new_std(&tea->ctrl_handler, &fmr2_ctrl_ops, V4L2_CID_AUDIO_VOLUME, 0, 68, 2, 56);
fmr2              191 drivers/media/radio/radio-sf16fmr2.c 		fmr2->balance = v4l2_ctrl_new_std(&tea->ctrl_handler, &fmr2_ctrl_ops, V4L2_CID_AUDIO_BALANCE, -68, 68, 2, 0);
fmr2              207 drivers/media/radio/radio-sf16fmr2.c static int fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io)
fmr2              210 drivers/media/radio/radio-sf16fmr2.c 	char *card_name = fmr2->is_fmd2 ? "SF16-FMD2" : "SF16-FMR2";
fmr2              217 drivers/media/radio/radio-sf16fmr2.c 	strscpy(fmr2->v4l2_dev.name, "radio-sf16fmr2",
fmr2              218 drivers/media/radio/radio-sf16fmr2.c 		sizeof(fmr2->v4l2_dev.name)),
fmr2              219 drivers/media/radio/radio-sf16fmr2.c 	fmr2->io = io;
fmr2              221 drivers/media/radio/radio-sf16fmr2.c 	if (!request_region(fmr2->io, 2, fmr2->v4l2_dev.name)) {
fmr2              222 drivers/media/radio/radio-sf16fmr2.c 		printk(KERN_ERR "radio-sf16fmr2: I/O port 0x%x already in use\n", fmr2->io);
fmr2              226 drivers/media/radio/radio-sf16fmr2.c 	dev_set_drvdata(pdev, fmr2);
fmr2              227 drivers/media/radio/radio-sf16fmr2.c 	err = v4l2_device_register(pdev, &fmr2->v4l2_dev);
fmr2              229 drivers/media/radio/radio-sf16fmr2.c 		v4l2_err(&fmr2->v4l2_dev, "Could not register v4l2_device\n");
fmr2              230 drivers/media/radio/radio-sf16fmr2.c 		release_region(fmr2->io, 2);
fmr2              233 drivers/media/radio/radio-sf16fmr2.c 	fmr2->tea.v4l2_dev = &fmr2->v4l2_dev;
fmr2              234 drivers/media/radio/radio-sf16fmr2.c 	fmr2->tea.private_data = fmr2;
fmr2              235 drivers/media/radio/radio-sf16fmr2.c 	fmr2->tea.radio_nr = radio_nr[num_fmr2_cards];
fmr2              236 drivers/media/radio/radio-sf16fmr2.c 	fmr2->tea.ops = &fmr2_tea_ops;
fmr2              237 drivers/media/radio/radio-sf16fmr2.c 	fmr2->tea.ext_init = fmr2_tea_ext_init;
fmr2              238 drivers/media/radio/radio-sf16fmr2.c 	strscpy(fmr2->tea.card, card_name, sizeof(fmr2->tea.card));
fmr2              239 drivers/media/radio/radio-sf16fmr2.c 	snprintf(fmr2->tea.bus_info, sizeof(fmr2->tea.bus_info), "%s:%s",
fmr2              240 drivers/media/radio/radio-sf16fmr2.c 			fmr2->is_fmd2 ? "PnP" : "ISA", dev_name(pdev));
fmr2              242 drivers/media/radio/radio-sf16fmr2.c 	if (snd_tea575x_init(&fmr2->tea, THIS_MODULE)) {
fmr2              244 drivers/media/radio/radio-sf16fmr2.c 		release_region(fmr2->io, 2);
fmr2              249 drivers/media/radio/radio-sf16fmr2.c 			card_name, fmr2->io);
fmr2              255 drivers/media/radio/radio-sf16fmr2.c 	struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL);
fmr2              256 drivers/media/radio/radio-sf16fmr2.c 	if (!fmr2)
fmr2              259 drivers/media/radio/radio-sf16fmr2.c 	if (fmr2_probe(fmr2, pdev, FMR2_PORT)) {
fmr2              260 drivers/media/radio/radio-sf16fmr2.c 		kfree(fmr2);
fmr2              263 drivers/media/radio/radio-sf16fmr2.c 	dev_set_drvdata(pdev, fmr2);
fmr2              264 drivers/media/radio/radio-sf16fmr2.c 	fmr2_cards[num_fmr2_cards++] = fmr2;
fmr2              272 drivers/media/radio/radio-sf16fmr2.c 	struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL);
fmr2              273 drivers/media/radio/radio-sf16fmr2.c 	if (!fmr2)
fmr2              276 drivers/media/radio/radio-sf16fmr2.c 	fmr2->is_fmd2 = true;
fmr2              277 drivers/media/radio/radio-sf16fmr2.c 	ret = fmr2_probe(fmr2, &pdev->dev, pnp_port_start(pdev, 0));
fmr2              279 drivers/media/radio/radio-sf16fmr2.c 		kfree(fmr2);
fmr2              282 drivers/media/radio/radio-sf16fmr2.c 	pnp_set_drvdata(pdev, fmr2);
fmr2              283 drivers/media/radio/radio-sf16fmr2.c 	fmr2_cards[num_fmr2_cards++] = fmr2;
fmr2              288 drivers/media/radio/radio-sf16fmr2.c static void fmr2_remove(struct fmr2 *fmr2)
fmr2              290 drivers/media/radio/radio-sf16fmr2.c 	snd_tea575x_exit(&fmr2->tea);
fmr2              291 drivers/media/radio/radio-sf16fmr2.c 	release_region(fmr2->io, 2);
fmr2              292 drivers/media/radio/radio-sf16fmr2.c 	v4l2_device_unregister(&fmr2->v4l2_dev);
fmr2              293 drivers/media/radio/radio-sf16fmr2.c 	kfree(fmr2);