Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232097
b: refs/heads/master
c: 12174aa
h: refs/heads/master
i:
  232095: e96d277
v: v3
  • Loading branch information
Thomas Gleixner committed Jan 21, 2011
1 parent 86534d7 commit 9dd89ba
Show file tree
Hide file tree
Showing 63 changed files with 538 additions and 533 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cfd74486eace27a0899b30529d01bc1a09a5b973
refs/heads/master: 12174aac376f2c9390c51e66995d38c9e5e94eff
45 changes: 24 additions & 21 deletions trunk/Documentation/sound/alsa/soc/codec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,42 @@ ASoC Codec driver breakdown

1 - Codec DAI and PCM configuration
-----------------------------------
Each codec driver must have a struct snd_soc_dai_driver to define its DAI and
Each codec driver must have a struct snd_soc_codec_dai to define its DAI and
PCM capabilities and operations. This struct is exported so that it can be
registered with the core by your machine driver.

e.g.

static struct snd_soc_dai_ops wm8731_dai_ops = {
.prepare = wm8731_pcm_prepare,
.hw_params = wm8731_hw_params,
.shutdown = wm8731_shutdown,
.digital_mute = wm8731_mute,
.set_sysclk = wm8731_set_dai_sysclk,
.set_fmt = wm8731_set_dai_fmt,
};

struct snd_soc_dai_driver wm8731_dai = {
.name = "wm8731-hifi",
struct snd_soc_codec_dai wm8731_dai = {
.name = "WM8731",
/* playback capabilities */
.playback = {
.stream_name = "Playback",
.channels_min = 1,
.channels_max = 2,
.rates = WM8731_RATES,
.formats = WM8731_FORMATS,},
/* capture capabilities */
.capture = {
.stream_name = "Capture",
.channels_min = 1,
.channels_max = 2,
.rates = WM8731_RATES,
.formats = WM8731_FORMATS,},
.ops = &wm8731_dai_ops,
.symmetric_rates = 1,
/* pcm operations - see section 4 below */
.ops = {
.prepare = wm8731_pcm_prepare,
.hw_params = wm8731_hw_params,
.shutdown = wm8731_shutdown,
},
/* DAI operations - see DAI.txt */
.dai_ops = {
.digital_mute = wm8731_mute,
.set_sysclk = wm8731_set_dai_sysclk,
.set_fmt = wm8731_set_dai_fmt,
}
};
EXPORT_SYMBOL_GPL(wm8731_dai);


2 - Codec control IO
Expand Down Expand Up @@ -182,14 +186,13 @@ when the mute is applied or freed.

i.e.

static int wm8974_mute(struct snd_soc_dai *dai, int mute)
static int wm8974_mute(struct snd_soc_codec *codec,
struct snd_soc_codec_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
u16 mute_reg = snd_soc_read(codec, WM8974_DAC) & 0xffbf;

if (mute)
snd_soc_write(codec, WM8974_DAC, mute_reg | 0x40);
u16 mute_reg = wm8974_read_reg_cache(codec, WM8974_DAC) & 0xffbf;
if(mute)
wm8974_write(codec, WM8974_DAC, mute_reg | 0x40);
else
snd_soc_write(codec, WM8974_DAC, mute_reg);
wm8974_write(codec, WM8974_DAC, mute_reg);
return 0;
}
38 changes: 29 additions & 9 deletions trunk/Documentation/sound/alsa/soc/machine.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ the following struct:-
struct snd_soc_card {
char *name;

...

int (*probe)(struct platform_device *pdev);
int (*remove)(struct platform_device *pdev);

Expand All @@ -24,13 +22,12 @@ struct snd_soc_card {
int (*resume_pre)(struct platform_device *pdev);
int (*resume_post)(struct platform_device *pdev);

...
/* machine stream operations */
struct snd_soc_ops *ops;

/* CPU <--> Codec DAI links */
struct snd_soc_dai_link *dai_link;
int num_links;

...
};

probe()/remove()
Expand All @@ -45,6 +42,11 @@ of any machine audio tasks that have to be done before or after the codec, DAIs
and DMA is suspended and resumed. Optional.


Machine operations
------------------
The machine specific audio operations can be set here. Again this is optional.


Machine DAI Configuration
-------------------------
The machine DAI configuration glues all the codec and CPU DAIs together. It can
Expand All @@ -59,10 +61,8 @@ struct snd_soc_dai_link is used to set up each DAI in your machine. e.g.
static struct snd_soc_dai_link corgi_dai = {
.name = "WM8731",
.stream_name = "WM8731",
.cpu_dai_name = "pxa-is2-dai",
.codec_dai_name = "wm8731-hifi",
.platform_name = "pxa-pcm-audio",
.codec_name = "wm8713-codec.0-001a",
.cpu_dai = &pxa_i2s_dai,
.codec_dai = &wm8731_dai,
.init = corgi_wm8731_init,
.ops = &corgi_ops,
};
Expand All @@ -77,6 +77,26 @@ static struct snd_soc_card snd_soc_corgi = {
};


Machine Audio Subsystem
-----------------------

The machine soc device glues the platform, machine and codec driver together.
Private data can also be set here. e.g.

/* corgi audio private data */
static struct wm8731_setup_data corgi_wm8731_setup = {
.i2c_address = 0x1b,
};

/* corgi audio subsystem */
static struct snd_soc_device corgi_snd_devdata = {
.machine = &snd_soc_corgi,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm8731,
.codec_data = &corgi_wm8731_setup,
};


Machine Power Map
-----------------

Expand Down
12 changes: 2 additions & 10 deletions trunk/Documentation/sound/alsa/soc/platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ struct snd_soc_ops {
int (*trigger)(struct snd_pcm_substream *, int);
};

The platform driver exports its DMA functionality via struct
snd_soc_platform_driver:-
The platform driver exports its DMA functionality via struct snd_soc_platform:-

struct snd_soc_platform_driver {
struct snd_soc_platform {
char *name;

int (*probe)(struct platform_device *pdev);
Expand All @@ -35,13 +34,6 @@ struct snd_soc_platform_driver {
int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *);
void (*pcm_free)(struct snd_pcm *);

/*
* For platform caused delay reporting.
* Optional.
*/
snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *,
struct snd_soc_dai *);

/* platform stream ops */
struct snd_pcm_ops *pcm_ops;
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3150,7 +3150,7 @@ S: Orphan
F: drivers/video/imsttfb.c

INFINIBAND SUBSYSTEM
M: Roland Dreier <roland@kernel.org>
M: Roland Dreier <rolandd@cisco.com>
M: Sean Hefty <sean.hefty@intel.com>
M: Hal Rosenstock <hal.rosenstock@gmail.com>
L: linux-rdma@vger.kernel.org
Expand Down
33 changes: 16 additions & 17 deletions trunk/arch/h8300/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,46 +38,45 @@ static inline int is_ext_irq(unsigned int irq)
return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS));
}

static void h8300_enable_irq(unsigned int irq)
static void h8300_enable_irq(struct irq_data *data)
{
if (is_ext_irq(irq))
IER_REGS |= 1 << (irq - EXT_IRQ0);
if (is_ext_irq(data->irq))
IER_REGS |= 1 << (data->irq - EXT_IRQ0);
}

static void h8300_disable_irq(unsigned int irq)
static void h8300_disable_irq(struct irq_data *data)
{
if (is_ext_irq(irq))
IER_REGS &= ~(1 << (irq - EXT_IRQ0));
if (is_ext_irq(data->irq))
IER_REGS &= ~(1 << (data->irq - EXT_IRQ0));
}

static void h8300_end_irq(unsigned int irq)
{
}

static unsigned int h8300_startup_irq(unsigned int irq)
static unsigned int h8300_startup_irq(struct irq_data *data)
{
if (is_ext_irq(irq))
return h8300_enable_irq_pin(irq);
if (is_ext_irq(data->irq))
return h8300_enable_irq_pin(data->irq);
else
return 0;
}

static void h8300_shutdown_irq(unsigned int irq)
static void h8300_shutdown_irq(struct irq_data *data)
{
if (is_ext_irq(irq))
h8300_disable_irq_pin(irq);
if (is_ext_irq(data->irq))
h8300_disable_irq_pin(data->irq);
}

/*
* h8300 interrupt controller implementation
*/
struct irq_chip h8300irq_chip = {
.name = "H8300-INTC",
.startup = h8300_startup_irq,
.shutdown = h8300_shutdown_irq,
.enable = h8300_enable_irq,
.disable = h8300_disable_irq,
.ack = NULL,
.irq_startup = h8300_startup_irq,
.irq_shutdown = h8300_shutdown_irq,
.irq_enable = h8300_enable_irq,
.irq_disable = h8300_disable_irq,
.end = h8300_end_irq,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ INSTALL := install
extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y))
wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))
dts-installed := $(patsubst $(obj)/dts/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(obj)/dts/*.dts))

all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed)

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/boot/dts/mpc8308rdb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
#address-cells = <1>;
#size-cells = <1>;
device_type = "soc";
compatible = "fsl,mpc8308-immr", "simple-bus";
compatible = "fsl,mpc8315-immr", "simple-bus";
ranges = <0 0xe0000000 0x00100000>;
reg = <0xe0000000 0x00000200>;
bus-frequency = <0>;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/boot/dts/p1022ds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,13 @@
ranges = <0x0 0xc100 0x200>;
cell-index = <1>;
dma00: dma-channel@0 {
compatible = "fsl,ssi-dma-channel";
compatible = "fsl,eloplus-dma-channel";
reg = <0x0 0x80>;
cell-index = <0>;
interrupts = <76 2>;
};
dma01: dma-channel@80 {
compatible = "fsl,ssi-dma-channel";
compatible = "fsl,eloplus-dma-channel";
reg = <0x80 0x80>;
cell-index = <1>;
interrupts = <77 2>;
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/powerpc/configs/pseries_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CONFIG_PPC64=y
CONFIG_ALTIVEC=y
CONFIG_VSX=y
CONFIG_SMP=y
CONFIG_NR_CPUS=1024
CONFIG_NR_CPUS=128
CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
Expand Down Expand Up @@ -45,8 +45,6 @@ CONFIG_KEXEC=y
CONFIG_IRQ_ALL_CPUS=y
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_PPC_64K_PAGES=y
CONFIG_PPC_SUBPAGE_PROT=y
CONFIG_SCHED_SMT=y
CONFIG_HOTPLUG_PCI=m
CONFIG_HOTPLUG_PCI_RPA=m
Expand Down Expand Up @@ -186,7 +184,6 @@ CONFIG_ACENIC_OMIT_TIGON_I=y
CONFIG_E1000=y
CONFIG_E1000E=y
CONFIG_TIGON3=y
CONFIG_BNX2=m
CONFIG_CHELSIO_T1=m
CONFIG_CHELSIO_T3=m
CONFIG_EHEA=y
Expand Down Expand Up @@ -314,7 +311,9 @@ CONFIG_DEBUG_KERNEL=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_LATENCYTOP=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_IRQSOFF_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_DEBUG_STACK_USAGE=y
Expand Down
27 changes: 12 additions & 15 deletions trunk/arch/powerpc/include/asm/feature-fixups.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,18 @@ label##2: \
.align 2; \
label##3:

#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
label##4: \
.popsection; \
.pushsection sect,"a"; \
.align 3; \
label##5: \
FTR_ENTRY_LONG msk; \
FTR_ENTRY_LONG val; \
FTR_ENTRY_OFFSET label##1b-label##5b; \
FTR_ENTRY_OFFSET label##2b-label##5b; \
FTR_ENTRY_OFFSET label##3b-label##5b; \
FTR_ENTRY_OFFSET label##4b-label##5b; \
.ifgt (label##4b-label##3b)-(label##2b-label##1b); \
.error "Feature section else case larger than body"; \
.endif; \
#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
label##4: \
.popsection; \
.pushsection sect,"a"; \
.align 3; \
label##5: \
FTR_ENTRY_LONG msk; \
FTR_ENTRY_LONG val; \
FTR_ENTRY_OFFSET label##1b-label##5b; \
FTR_ENTRY_OFFSET label##2b-label##5b; \
FTR_ENTRY_OFFSET label##3b-label##5b; \
FTR_ENTRY_OFFSET label##4b-label##5b; \
.popsection;


Expand Down
21 changes: 6 additions & 15 deletions trunk/arch/powerpc/include/asm/immap_qe.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,22 +467,13 @@ struct qe_immap {
extern struct qe_immap __iomem *qe_immr;
extern phys_addr_t get_qe_base(void);

/*
* Returns the offset within the QE address space of the given pointer.
*
* Note that the QE does not support 36-bit physical addresses, so if
* get_qe_base() returns a number above 4GB, the caller will probably fail.
*/
static inline phys_addr_t immrbar_virt_to_phys(void *address)
static inline unsigned long immrbar_virt_to_phys(void *address)
{
void *q = (void *)qe_immr;

/* Is it a MURAM address? */
if ((address >= q) && (address < (q + QE_IMMAP_SIZE)))
return get_qe_base() + (address - q);

/* It's an address returned by kmalloc */
return virt_to_phys(address);
if ( ((u32)address >= (u32)qe_immr) &&
((u32)address < ((u32)qe_immr + QE_IMMAP_SIZE)) )
return (unsigned long)(address - (u32)qe_immr +
(u32)get_qe_base());
return (unsigned long)virt_to_phys(address);
}

#endif /* __KERNEL__ */
Expand Down
Loading

0 comments on commit 9dd89ba

Please sign in to comment.