From 9a4f20fcbd9cd89d8e4cfcaece81802c19d467ae Mon Sep 17 00:00:00 2001 From: Risto Suominen Date: Wed, 16 Apr 2008 13:15:38 +0200 Subject: [ALSA] snd-powermac: enable headphone detection Enable port change interrupt while initialising AWACS, Screamer, and Burgundy chipsets. Signed-off-by: Risto Suominen Signed-off-by: Takashi Iwai --- sound/ppc/pmac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/ppc/pmac.c') diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 613a565e04d..6f68ac9982e 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -1300,9 +1300,9 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) snd_pmac_sound_feature(chip, 1); - /* reset */ - if (chip->model == PMAC_AWACS) - out_le32(&chip->awacs->control, 0x11); + /* reset & enable interrupts */ + if (chip->model <= PMAC_BURGUNDY) + out_le32(&chip->awacs->control, chip->control_mask); /* Powerbooks have odd ways of enabling inputs such as an expansion-bay CD or sound from an internal modem -- cgit v1.2.3 From 946cda7d64b81053beac5d31148996f3e379e89e Mon Sep 17 00:00:00 2001 From: Risto Suominen Date: Wed, 16 Apr 2008 13:16:05 +0200 Subject: [ALSA] snd-powermac: style pmac.c Coding style corrections for pmac.c. Signed-off-by: Risto Suominen Signed-off-by: Takashi Iwai --- sound/ppc/pmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/ppc/pmac.c') diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 6f68ac9982e..a38c0c790d2 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -214,7 +214,7 @@ static int snd_pmac_pcm_prepare(struct snd_pmac *chip, struct pmac_stream *rec, int rate_index; long offset; struct pmac_stream *astr; - + rec->dma_size = snd_pcm_lib_buffer_bytes(subs); rec->period_size = snd_pcm_lib_period_bytes(subs); rec->nperiods = rec->dma_size / rec->period_size; @@ -643,7 +643,7 @@ static int snd_pmac_pcm_close(struct snd_pmac *chip, struct pmac_stream *rec, /* reset constraints */ astr->cur_freqs = chip->freqs_ok; astr->cur_formats = chip->formats_ok; - + return 0; } -- cgit v1.2.3