Skip to content

Commit

Permalink
[media] Revert "[media] sound/usb: Use Media Controller API to share …
Browse files Browse the repository at this point in the history
…media resources"

Unfortunately, this patch caused several regressions at au0828 and
snd-usb-audio, like this one:
	https://bugzilla.kernel.org/show_bug.cgi?id=115561

It also showed several troubles at the MC core that handles pretty
poorly the memory protections and data lifetime management.

So, better to revert it and fix the core before reapplying this
change.

This reverts commit aebb2b8 ("[media] sound/usb: Use Media
Controller API to share media resources")'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
mchehab committed Mar 31, 2016
1 parent e8e3039 commit c89178f
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 448 deletions.
4 changes: 0 additions & 4 deletions sound/usb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,13 @@ config SND_USB_AUDIO
select SND_RAWMIDI
select SND_PCM
select BITREVERSE
select SND_USB_AUDIO_USE_MEDIA_CONTROLLER if MEDIA_CONTROLLER && (MEDIA_SUPPORT=y || MEDIA_SUPPORT=SND_USB_AUDIO)
help
Say Y here to include support for USB audio and USB MIDI
devices.

To compile this driver as a module, choose M here: the module
will be called snd-usb-audio.

config SND_USB_AUDIO_USE_MEDIA_CONTROLLER
bool

config SND_USB_UA101
tristate "Edirol UA-101/UA-1000 driver"
select SND_PCM
Expand Down
2 changes: 0 additions & 2 deletions sound/usb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ snd-usb-audio-objs := card.o \
quirks.o \
stream.o

snd-usb-audio-$(CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER) += media.o

snd-usbmidi-lib-objs := midi.o

# Toplevel Module Dependency
Expand Down
14 changes: 0 additions & 14 deletions sound/usb/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
#include "format.h"
#include "power.h"
#include "stream.h"
#include "media.h"

MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
MODULE_DESCRIPTION("USB Audio");
Expand Down Expand Up @@ -612,11 +611,6 @@ static int usb_audio_probe(struct usb_interface *intf,
if (err < 0)
goto __error;

if (quirk->media_device) {
/* don't want to fail when media_snd_device_create() fails */
media_snd_device_create(chip, intf);
}

usb_chip[chip->index] = chip;
chip->num_interfaces++;
usb_set_intfdata(intf, chip);
Expand Down Expand Up @@ -673,14 +667,6 @@ static void usb_audio_disconnect(struct usb_interface *intf)
list_for_each(p, &chip->midi_list) {
snd_usbmidi_disconnect(p);
}
/*
* Nice to check quirk && quirk->media_device
* need some special handlings. Doesn't look like
* we have access to quirk here
* Acceses mixer_list
*/
media_snd_device_delete(chip);

/* release mixer resources */
list_for_each_entry(mixer, &chip->mixer_list, list) {
snd_usb_mixer_disconnect(mixer);
Expand Down
3 changes: 0 additions & 3 deletions sound/usb/card.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ struct snd_usb_endpoint {
struct list_head list;
};

struct media_ctl;

struct snd_usb_substream {
struct snd_usb_stream *stream;
struct usb_device *dev;
Expand Down Expand Up @@ -158,7 +156,6 @@ struct snd_usb_substream {
} dsd_dop;

bool trigger_tstamp_pending_update; /* trigger timestamp being updated from initial estimate */
struct media_ctl *media_ctl;
};

struct snd_usb_stream {
Expand Down
318 changes: 0 additions & 318 deletions sound/usb/media.c

This file was deleted.

Loading

0 comments on commit c89178f

Please sign in to comment.